[Mono-bugs] [Bug 337383] Runtime assertion when pressing C-c on simple app.
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Nov 8 08:47:32 EST 2007
https://bugzilla.novell.com/show_bug.cgi?id=337383#c1
Mark Probst <mprobst at novell.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mprobst at novell.com
--- Comment #1 from Mark Probst <mprobst at novell.com> 2007-11-08 06:47:32 MST ---
This is a race condition between one thread which deletes a thread's synch_cs
critical section and another thread which tries to lock it.
How to reproduce it in gdb:
handle SIG35 noprint
run test.exe
<hit ctrl-c to interrupt it>
signal SIGINT
This is the native stacktrace at the point of the assertion failure:
#0 mono_thread_set_state (thread=0x5fb00, state=ThreadState_Background) at
threads.c:3352
#1 0x080ee2fe in ves_icall_System_Threading_Thread_SetState (this=0x5fb00,
state=4) at threads.c:1779
#2 0x080f226f in async_invoke_io_thread (data=0x2dea0) at threadpool.c:239
#3 0x080ebf0b in start_wrapper (data=0x83db550) at threads.c:550
#4 0x08152a63 in thread_start_routine (args=0xb7799158) at threads.c:264
#5 0x08172b2a in GC_start_routine ()
#6 0xb7e2831b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#7 0xb7d8a57e in clone () from /lib/tls/i686/cmov/libc.so.6
The synch_cs is deleted in
ves_icall_System_Threading_Thread_Thread_free_internal(). Here's the managed
stack trace at the point where the synch_cs is deleted:
at (wrapper managed-to-native) System.Threading.Thread.Thread_free_internal
(intptr) <0x00004>
at (wrapper managed-to-native) System.Threading.Thread.Thread_free_internal
(intptr) <0xffffffff>
at System.Threading.Thread.Finalize () <0x00041>
at (wrapper runtime-invoke)
System.Collections.Generic.GenericEqualityComparer`1.runtime_invoke_void
(object,intptr,intptr,intptr) <0xffffffff>
I haven't figured out yet what causes the race condition but I can offer a
quick hack which makes it much less likely for it to cause trouble (see
attachment).
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list