[En-Nut-Discussion] TCP/IP Stack crashes

Bernard Fouché bernard.fouche at kuantic.com
Fri Jan 13 12:23:34 CET 2006


Just a 2cts idea about what's can cause such a crash in NutOs 3.9.9:

Any broadcast packet will make a new arp cache entry (net/arpin.c) since 
there is not yet filtering code (a comment says it's "TODO").

The arpcache.c code will malloc() memory for the cache entry without any 
limitation (the cache size is not limited for instance to N entries), so 
the heap will grow with any received broadcast packet. MAX_ARPAGE is 9 
minutes..

If I read the code correctly, an Ethernut in a network with many host 
broadcasting often will suck heap memory because of the arp cache 
management. So flooding the network with broadcast packets from one host 
or two won't show the bug.. Maybe you need 50 hosts or more. Memory 
usage from the Ethernut application is also to be considered. Eventually 
the heap will collide with the stack (I did not search NutOs code about 
what's going on if this happens)

If you add code in the application to list the arp cache (ifn->arpTable, 
see code for ArpCacheLookup() in net/arpcache.c) to the serial port and 
see a growing list, that may be the cause of the crash.

Cheers,

    Bernard

Harald Kipp wrote:

> Thorsten,
>
> At 22:25 12.01.2006 +0100, you wrote:
>
>> Sorry Harald, not yet. I have not much time for it over the week, 
>> it's not
>> my real business, only hobby. So I only have the evenings and weekend 
>> for
>> it.
>
>
> I'm aware, that this kind of problem tracking is extremely difficult
> and time consuming. Nobody expects you to spend all your free time on
> it. :-)
>
> Together with a customer we will set up another long term stress test
> shortly. I'll try to add some broadcast showers.
>
> Many thanks so far,
> Harald
>
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>




More information about the En-Nut-Discussion mailing list