[Mono-list] SIGQUIT output (locking needed?)

Joshua Tauberer jit at occams.info
Sat Jul 21 20:55:28 EDT 2007

I'm using 'kill -QUIT' to diagnose a problem with my mod_mono website 
(which has mono dump a stack trace for each thread) and I'm getting 
output that seems strange:

"" tid=0x0x6464b90 this=0x0xb02827d0:
   at (wrapper managed-to-native) System.IO.InotifyWatcher.ReadFromFD 
(intptr,byte[],intptr) <0x00004>
   at (wrapper managed-to-native) System.Threading.Thread.Sleep_internal 
(int) <0x00004>
   at (wrapper managed-to-native) System.Threading.Thread.Sleep_internal 
(int) <0xffffffff>
   at (wrapper managed-to-native) 
System.Object.__icall_wrapper_mono_array_new_specific (intptr,int) <0x00004>

According to this, __icall_wrapper_mono_array_new_specific is calling 
Thread.Sleep_Internal, and Thread.Sleep_Internal is in turn calling 
InotifyWatcher.ReadFromFD --- both of those calls are surely not the 
case. I also have

"" tid=0x0x6464b90 this=0x0xb02827d0:

lines without any stack trace following.

It seems like the stack traces of a few threads are being jumbled. 
Looking through the SIGQUIT handler, I don't see any obvious indication 
that the output is synchronized so the threads don't all go at the same 

If that's right, if someone points me to any easy locking primitives to 
use here I can write a patch (or I could make it so that each thread 
signals the next to dump its stack, rather than signaling them all at 
once), otherwise I'll post a bug report on bugzilla.

- Josh Tauberer


"Yields falsehood when preceded by its quotation!  Yields
falsehood when preceded by its quotation!" Achilles to
Tortoise (in "Gödel, Escher, Bach" by Douglas Hofstadter)

More information about the Mono-list mailing list