[Mono-list] Hang on Environment.Exit if there is any socket_io

David Evans devans at pacificbiosciences.com
Fri Feb 3 20:40:03 UTC 2012

Hi All,

We're seeing a rare problem but frequent enough to be an issue for us, where during an Environment.Exit() call to quit our application we hang and generally there is one thread locked waiting for socket IO and we're hung waiting for all threads to stop. In one case it was our logger thread trying to write out logs so as a workaround we made sure to flush and close that file before we exit. But sometimes it is from some remoting services that the app provides that has open TCP connections, so next we'll start shutting those down explicitly before we Exit(). So there is some kind of deadlock that can occur it looks like when we Exit() with any pending IO.

Our app runs on linux. This occurs with both 2.6.4 and 2.10.6 (and we'll start testing with 2.10.8 soon)

Anyone seen this before and have an easier workaround? Bug already filed that you know of? I searched bugzilla on xamarin and didn't see anything, if no one responds as a known issue I'll file a bug.

Thanks much,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20120203/68bed111/attachment.html>

More information about the Mono-list mailing list