-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no memory left in handle_packet_fragment - when there still is plenty of memory left #299
Comments
still happens with |
Hi, what ist the datagram_size passed to handle_packet_fragment(...) ? Best regards, |
but it looks like the memory is really used up, I'm also getting 0 from calloc elsewhere in this condition, so heap doesn't show proper values. The timeout for keeping IP fragments is set to 15s, so broken parts are kept for quite some time, using up all the memory it seems.
In the "no memory left" case, the timeout info is never shown again. There are also several other data aborts originating in lowpan.c functions, indicating that something™ is going wrong while processing fragmented packets. |
heap fragmentation maybe? |
There are several strange things about the custom list implementation in lowpan.c: e.g. in What happens when temp_buf points to head and gets freed - head will now still point to the old, invalid location. That would explain why it leaks memory and occasionally crashes.
after collect_garbage()
I guess the original intention was that new fragments are always added to the head, so only the tail expires, but looking at https://github.com/RIOT-OS/RIOT/blob/master/sys/net/sixlowpan/lowpan.c#L422 shows that this is not true. |
Also, line 422 will overwrite the pointer to current_buf as temp_buf is the previous entry of current_buf - is this really what is intended? |
still runs out of memory and heap shows there would be free memory with the new list. |
@benpicco is this currently happening? |
Yes, the memory does indeed run out, I'm still trying to figure out why. |
I've traced all calls to m/calloc and free with print_malloc, turns out the memory is indeed exhausted by what looks like a memory leak in rfc5444_reader.c I'll create a new issue for |
on msba2, I occasionally receive these error messages
The text was updated successfully, but these errors were encountered: