[Mono-bugs] [Bug 642780] New: Mono debugger thread crashes when app exits quickly
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Sep 30 03:02:26 EDT 2010
https://bugzilla.novell.com/show_bug.cgi?id=642780
https://bugzilla.novell.com/show_bug.cgi?id=642780#c0
Summary: Mono debugger thread crashes when app exits quickly
Classification: Mono
Product: Mono: Runtime
Version: SVN
Platform: PC
OS/Version: Windows 7
Status: NEW
Severity: Normal
Priority: P5 - None
Component: debug
AssignedTo: martin at novell.com
ReportedBy: daryl at rd.scei.sony.co.jp
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US)
AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3
If the user terminates the mono app when launched from the monodevelop
debugger, sometimes mono crashes. This appears to be the result of a race
condition where a mutex is destroyed before it is finished with.
There appears to be a race condition in debugger in the functions
mono_debugger_agent_cleanup() and debugger_thread(). The following routine does
not appear to wait until debugger_thread_exited == true. The mutex
"debugger_thread_exited_mutex" will remain in use unless debugger_thread_exited
== true.
mono_mutex_lock (&debugger_thread_exited_mutex);
if (!debugger_thread_exited) {
#ifdef HOST_WIN32
if (WAIT_TIMEOUT == WaitForSingleObject(debugger_thread_exited_cond, 0)) {
mono_mutex_unlock (&debugger_thread_exited_mutex);
Sleep(0);
mono_mutex_lock (&debugger_thread_exited_mutex);
}
#else
mono_cond_wait (&debugger_thread_exited_cond,
&debugger_thread_exited_mutex);
#endif
}
mono_mutex_unlock (&debugger_thread_exited_mutex);
Reproducible: Always
Steps to Reproduce:
1.Debug process in monodevelop
2.Immediately terminate C# program
Actual Results:
Exception should be generated due to debugger_thread trying to lock a deleted
mutex
Expected Results:
no exception should occur
--
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