[Mono-dev] Socket with ProtocolType.Udp hangs occasionally in ReceiveFrom()

David Evans devans at pacificbiosciences.com
Thu Mar 3 20:33:13 UTC 2016

Hi All,

I'm seeing a rare hang in Socket.ReceiveFrom() where the receive timeout isn't respected. What's also odd is then on the server side once this wedge occurs the server gets the same packet that had been sent to it over and over and it keeps responding to it endlessly - but the client never returns from ReceiveFrom(). This is in a test sending packets over localhost between two threads.

Then, if I switch to use Socket.Connect(), Socket.Send(), and Socket.Receive() instead the problem doesn't occur. Appears to only get me if I use the SendTo/ReceiveFrom variants, which I gather are more commonly used for UDP sockets.

I filed a bug with a test app to reproduce it, but wanted to mention it in case anyone else has run into this already or can point out if I'm doing something incorrectly:

Reproduced this with mono,, and on Ubuntu 14.04.1


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20160303/4cf0325b/attachment.html>

More information about the Mono-devel-list mailing list