[riot-notifications] [RIOT-OS/RIOT] gcoap server breaks or becomes very unresponsive (sock_async related?) (#14034)

MichelRottleuthner notifications at github.com
Mon May 11 10:26:52 CEST 2020

Thanks a lot @kb2ma!
I confirm that the fix solves the problem with gcoap becoming unresponsive. I also didn't see any stuck messages being pushed out with delay anymore.
I'll also test this fix in my other application I mentioned where the COAP endpoint became unresponsive just after some time even without heavy load.

I bet @miri64 knows better than me if this workaround is the best solution.
If the implementation of the UDP layer behaves like you describe, then even with iterating and draining the whole queue within the callback this won't be completely solved. There would still be the racy case where a new UDP message arrives just before returning from the handler, but after the decision was made to return. Wouldn't that imply the UDP layer must ensure firing another event if there is still data left after the callback returned?
The while-condition in your fix (`while (type & SOCK_ASYNC_MSG_RECV)`) looks a bit strange to me. The type is handed by value and not updated within the loop, right?. Shouldn't it depend on whether there is still data available from the sock, or something like that?

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200511/aa01191a/attachment-0001.htm>

More information about the notifications mailing list