[Mono-bugs] [Bug 65379][Nor] Changed - race condition in thread exit code
Tue, 7 Sep 2004 11:22:13 -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 email@example.com.
--- shadow/65379 2004-09-06 08:14:24.000000000 -0400
+++ shadow/65379.tmp.31272 2004-09-07 11:22:13.000000000 -0400
@@ -1,14 +1,14 @@
Product: Mono: Runtime
@@ -25,6 +25,17 @@
mono_thread_detach () indirectly calls WaitForSingleObjectExt () which
calls GetCurrentThread (), which doesn't find the thread in thread_hash
since it is already removed, so it calls thread_attach (), which allocates
a new handle and puts it into thread_hash. Later, when mono_thread_manage
tries to wait for this thread to die, it waits on the new handle, which of
course is never signalled, so the runtime hangs.
+------- Additional Comments From firstname.lastname@example.org 2004-09-07 11:22 -------
+I think Gonzalo added the mono_thread_detach() calls; I don't think
+they should be there.
+(IIRC, it was something to do with threads exiting without unwinding
+back to the start function, and Gonzalo wanting the active threads
+hash table to be updated immediately. I explained at the time that
+the wait_for_tids() function should cope with signalled threads, and
+if it doesn't the bug is there instead...)