-
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
lwIP: hangs due to sema change after a while #7035
Comments
Strange... we have it running stably since a while. The only difference is that we use #6441 which has not been merged in yet. Can you apply the patch and confirm if it is still happening? |
Yapp, still hanging :-/. Might also be, that due to my hacky handling in those tests I leave the stack's mutexes in an unclean state, but since I really don't touch them and just manipulate the neighbor cache, I doubt that. |
(also curious that only |
Thanks for trying it. It's actually a bit strange... from the debug traces I couldn't see anything. However, running it [slowly] with the debugger just works fine. I'm looking into it, but don't understand why is not happening with IPv6 or the other ones |
Analysis of the issue. There are 4 threads running:
The deadlock happens because we want to send "main" (pid 2) from "tcpip_thread" (pid 4) a message that we are done ( I guess that it used to work becase semaphores were using Btw: I tried to run as well the problematic tests case without the previous test cases and IPv6 also fails of them suceeds. So there is a dependency with the previous cases, is that expected? Logs for IPv4 (full log):
Logs for IPv6 (full log):
I don't fully understand the purpose and interaction of all tests and won't have time to look at it deeply within the comming days... maybe you see something that I didn't consider so far. |
It might be relevant for this: we ran into priority inversion issues with lwIP, this is something that will have to be tackled at some point in RIOT :-( |
Like #7461 e.g.? |
Seems like it was an issue in lwIP after all, since I can't reproduce it in master anymore and 41eb295 is the first one where it worked. |
Try
tests/lwip_sock_ip
tests with bothLWIP_IPV4=1
set as environment variable. The test will predictably hang attest_sock_ip_send4__socketed_no_local_no_netif()
. I can't really say why this is, but some bisecting revealed that this is due to the changes recently done tosema
(which is used by lwIP): before #6155 was merged the tests ran through, after it an assertion wasn't met. This however was fixed in #6696 but afterwards the tests hangs.The text was updated successfully, but these errors were encountered: