[Mono-list] Looking for mono expert to help debug a hanging process
Edward Ned Harvey (mono)
edward.harvey.mono at clevertrove.com
Tue Nov 10 00:56:57 UTC 2015
> From: mono-list-bounces at lists.ximian.com [mailto:mono-list-
> bounces at lists.ximian.com] On Behalf Of River Satya
> We have a c# binary running under mono on Ubuntu 14.04 which hangs
> When it hangs, SIGQUIT does not generate a thread dump, and all threads,
> including one heartbeat thread that does very little but pulse the logs once a
> minute, seem to stop.
First and foremost, make sure you're running the latest version of mono. What version are you on?
You should also be aware, that Xamarin has a list of 3rd party contractors for support work like this. You should be able to find that on their website.
Sounds like (probably) a deadlock. But a deadlock between some other threads shouldn't affect your heartbeat thread - unless your heartbeat thread is dependent on something. How is your heartbeat thread written?
For example, if you have a heartbeat thread that uses a Timer, the Timer needs to raise an async event from the threadpool, so if the threadpool is drained by some other threads, then your Timer event might not occur. But if you created a managed instance of System.Threading.Thread, and then launched it into a while(true) loop, that uses System.Threading.Thread.Sleep(), you can be assured you don't have a dependency on the threadpool. But if you accidentally drop reference to your heartbeat thread, some time later it will be collected by the GC (while it's still running) which is no bueno. If the heartbeat thread is using any locking, that's a possible issue. If it's writing to some log resource, or file, which is shared by other threads, that's a possible issue.
More information about the Mono-list