[Mono-bugs] [Bug 60576][Maj] Changed - Bad interaction - Mono, Gentoo (nptl) & Muine
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 23 Sep 2004 19:29:00 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by ed@catmur.co.uk.
http://bugzilla.ximian.com/show_bug.cgi?id=60576
--- shadow/60576 2004-09-12 18:18:34.000000000 -0400
+++ shadow/60576.tmp.23722 2004-09-23 19:29:00.000000000 -0400
@@ -513,6 +513,116 @@
At this point in time, all threads are in a wait state.
An interesting thing I found out is that if you set a breakpoint in
the libgc code that prints the message, it will be continuously hit
once the app has frozen. And in some cases I even saw the garbage
collector repeatedly trying to collect the same identical heap.
+
+------- Additional Comments From ed@catmur.co.uk 2004-09-23 19:29 -------
+In case I get hit by a meteorite, here's what I've got:
+
+First off, debugging this in gdb is difficult - things don't behave
+the same way; I had to resort to printf() debugging.
+Comment out the #if DEBUG_THREADS at libgc/pthread_stop_world.c: 305
+and 120.
+
+Modulo extra debug statements, here's what you get:
+
+starting thread
+81 threads
+starting thread
+82 threads
+starting thread
+83 threads
+starting thread
+84 threads
+GC_collect_or_expand 997: 0 0 0 63118
+GC_collect_or_expand 1000
+Initiating full world-stop collection 2 after 252472 allocd bytes
+Stopping the world from 0xb6847bb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6c49bb0
+Sending suspend signal to 0xb6c49bb0
+Sending suspend signal to 0xb6a48bb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6a48bb0
+Sending suspend signal to 0xb6c49bb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6a48bb0
+Sending suspend signal to 0xb6c49bb0
+Sending suspend signal to 0xb6a48bb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6a48bb0
+Sending suspend signal to 0xb6a48bb0
+Sending suspend signal to 0xb6a48bb0
+Sending suspend signal to 0xb6c49bb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6c49bb0
+Sending suspend signal to 0xb6c49bb0
+Sending suspend signal to 0xb6c49bb0
+Sending suspend signal to 0xb6c49bb0
+Sending suspend signal to 0xb6c49bb0
+Sending suspend signal to 0xb704bbb0
+Sending suspend signal to 0xb6a48bb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6c49bb0
+Sending suspend signal to 0xb704bbb0
+Sending suspend signal to 0xb6a48bb0
+Sending suspend signal to 0xb704bbb0
+Sending suspend signal to 0xb704bbb0
+Sending suspend signal to 0xb6c49bb0
+Sending suspend signal to 0xb6c49bb0
+Sending suspend signal to 0xb6a48bb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb704bbb0
+Sending suspend signal to 0xb704bbb0
+Sending suspend signal to 0xb704bbb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb704bbb0
+Sending suspend signal to 0xb704bbb0
+Sending suspend signal to 0xb6c49bb0
+Sending suspend signal to 0xb6a48bb0
+Sending suspend signal to 0xb6a48bb0
+Sending suspend signal to 0xb6c49bb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb704bbb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb6e4abb0
+Sending suspend signal to 0xb704bbb0
+Sending suspend signal to 0xb724cbb0
+Sending suspend signal to 0xb7453bb0
+Suspending 0xb7453bb0
+Suspending 0xb724cbb0
+Sending suspend signal to 0xb7bdb6e0
+Suspending 0xb7bdb6e0
+Got to line 338
+Got to line 371
+GC_suspend_ack_sem value is 3 (0 of 32 threads)
+GC_suspend_ack_sem value is 2 (1 of 32 threads)
+GC_suspend_ack_sem value is 1 (2 of 32 threads)
+GC_suspend_ack_sem value is 0 (3 of 32 threads)
+Suspending 0xb6e4abb0
+GC_suspend_ack_sem value is 0 (4 of 32 threads)
+
+Yes: GC_suspend_all is suspending the same thread multiple times, so
+waiting on the semaphore too many times, so deadlocking. Work out why
+this is happening and you have the solution.
+
+Prizes, etc. And many thanks to Peter for the testcase.