[Gc] Stopping the world on Darwin

Dick Porter dick at ximian.com
Fri Jun 18 02:10:05 PDT 2004


We've been seeing deadlocks when running mono on darwin.  It turns out
that the world wasn't stopping - the test for the thread run state was
never being satisfied.

On our test machine (Darwin macmono.boston.ximian.com 7.4.0 Darwin
Kernel Version 7.4.0: Wed May 12 16:58:24 PDT 2004;
root:xnu/xnu-517.7.7.obj~7/RELEASE_PPC  Power Macintosh powerpc) the
thread_info() state is always TH_STATE_WAITING, never TH_STATE_RUNNING. 
Even when thread_suspend() has been called, the state doesn't seem to
change.  However, the suspend_count does seem to work.

A patch against 6.3alpha6 is attached, along with the simple test
program I used (which is slightly more complex than it might be, because
at first I was thinking it was a pthread_cond_timedwait() interaction.)

- Dick


-------------- next part --------------
A non-text attachment was scrubbed...
Name: stop.diff
Type: text/x-patch
Size: 834 bytes
Desc: not available
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20040618/ad1d2145/stop.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timewait.c
Type: text/x-c
Size: 2153 bytes
Desc: not available
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20040618/ad1d2145/timewait.bin


More information about the Gc mailing list