Bug 3838 - Soft debugger hangs MD on Windows
Summary: Soft debugger hangs MD on Windows
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: Trunk
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2012-03-09 15:56 UTC by Mikayla Hutchinson [MSFT]
Modified: 2013-03-19 07:36 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Mikayla Hutchinson [MSFT] 2012-03-09 15:56:53 UTC
Debugging using sdb on Windows. The target sdb agent deadlocked, so was forcibly killed. When the host MD was closed down, it deadlocked. Apparently one of the surviving SDB threads was deadlocked and keeping it alive:

Unflagged		5108	34	Worker Thread	<No Name>	Mono.Debugger.Soft.TcpConnection.TransportReceive	Normal
[Managed to Native Transition]	 
System.dll!System.Net.Sockets.Socket.Receive(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) + 0xc6 bytes	 
System.dll!System.Net.Sockets.Socket.Receive(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags) + 0x20 bytes	 
Mono.Debugger.Soft.dll!Mono.Debugger.Soft.TcpConnection.TransportReceive(byte[] buf, int buf_offset, int len) Line 2257 + 0x1e bytes	 
Mono.Debugger.Soft.dll!Mono.Debugger.Soft.Connection.Receive(byte[] buf, int buf_offset, int len) Line 1027 + 0x1c bytes	 
Mono.Debugger.Soft.dll!Mono.Debugger.Soft.Connection.ReadPacket() Line 1084 + 0x13 bytes	 
Mono.Debugger.Soft.dll!Mono.Debugger.Soft.Connection.ReceivePacket() Line 1149 + 0xc bytes	 
Mono.Debugger.Soft.dll!Mono.Debugger.Soft.Connection.receiver_thread_main() Line 1131 + 0x9 bytes	 
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) + 0x63 bytes	 
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) + 0xb0 bytes	 
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x2c bytes	 
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x44 bytes	 
[Native to Managed Transition]	 

Unflagged		4108	35	Worker Thread	SDB output reader	Mono.Debugging.Soft.SoftDebuggerSession.ReadOutput	Normal
[Managed to Native Transition]	 
mscorlib.dll!System.IO.FileStream.ReadFileNative(Microsoft.Win32.SafeHandles.SafeFileHandle handle, byte[] bytes, int offset, int count, System.Threading.NativeOverlapped* overlapped, out int hr) + 0x87 bytes	 
mscorlib.dll!System.IO.FileStream.ReadCore(byte[] buffer, int offset, int count) + 0xb2 bytes	 
mscorlib.dll!System.IO.FileStream.Read(byte[] array, int offset, int count) + 0xce bytes	 
mscorlib.dll!System.IO.StreamReader.ReadBuffer(char[] userBuffer, int userOffset, int desiredChars, out bool readToUserBuffer) + 0xe8 bytes	 
mscorlib.dll!System.IO.StreamReader.Read(char[] buffer, int index, int count) + 0x77 bytes	 
Mono.Debugging.Soft.dll!Mono.Debugging.Soft.SoftDebuggerSession.ReadOutput(System.IO.StreamReader reader, bool isError) Line 503 + 0x16 bytes	 
Mono.Debugging.Soft.dll!Mono.Debugging.Soft.SoftDebuggerSession.ConnectOutput.AnonymousMethod__12() Line 486 + 0x26 bytes	 
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) + 0x63 bytes	 
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) + 0xb0 bytes	 
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x2c bytes	 
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x44 bytes	 
[Native to Managed Transition]	 

Unflagged		1052	36	Worker Thread	SDB error reader	Mono.Debugging.Soft.SoftDebuggerSession.ReadOutput	Normal
[Managed to Native Transition]	 
mscorlib.dll!System.IO.FileStream.ReadFileNative(Microsoft.Win32.SafeHandles.SafeFileHandle handle, byte[] bytes, int offset, int count, System.Threading.NativeOverlapped* overlapped, out int hr) + 0x87 bytes	 
mscorlib.dll!System.IO.FileStream.ReadCore(byte[] buffer, int offset, int count) + 0xb2 bytes	 
mscorlib.dll!System.IO.FileStream.Read(byte[] array, int offset, int count) + 0xce bytes	 
mscorlib.dll!System.IO.StreamReader.ReadBuffer(char[] userBuffer, int userOffset, int desiredChars, out bool readToUserBuffer) + 0xe8 bytes	 
mscorlib.dll!System.IO.StreamReader.Read(char[] buffer, int index, int count) + 0x77 bytes	 
Mono.Debugging.Soft.dll!Mono.Debugging.Soft.SoftDebuggerSession.ReadOutput(System.IO.StreamReader reader, bool isError) Line 503 + 0x16 bytes	 
Mono.Debugging.Soft.dll!Mono.Debugging.Soft.SoftDebuggerSession.ConnectOutput.AnonymousMethod__12() Line 486 + 0x26 bytes	 
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) + 0x63 bytes	 
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) + 0xb0 bytes	 
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x2c bytes	 
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x44 bytes	 
[Native to Managed Transition]	 

Unflagged		7060	37	Worker Thread	SDB event handler	Mono.Debugger.Soft.Connection.SendReceive	Normal
[In a sleep, wait, or join]	 
mscorlib.dll!System.Threading.Monitor.Wait(object obj, int millisecondsTimeout, bool exitContext) + 0x18 bytes	 
mscorlib.dll!System.Threading.Monitor.Wait(object obj) + 0xa bytes	 
Mono.Debugger.Soft.dll!Mono.Debugger.Soft.Connection.SendReceive(Mono.Debugger.Soft.Connection.CommandSet command_set, int command, Mono.Debugger.Soft.Connection.PacketWriter packet) Line 1419 + 0xb bytes	 
Mono.Debugger.Soft.dll!Mono.Debugger.Soft.Connection.Thread_GetFrameInfo(long id, int start_frame, int length) Line 1788 + 0x6b bytes	 
Mono.Debugger.Soft.dll!Mono.Debugger.Soft.ThreadMirror.GetFrames() Line 19 + 0x24 bytes	 
Mono.Debugging.Soft.dll!Mono.Debugging.Soft.SoftDebuggerBacktrace.SoftDebuggerBacktrace(Mono.Debugging.Soft.SoftDebuggerSession session, Mono.Debugger.Soft.ThreadMirror thread) Line 63 + 0x11 bytes	 
Mono.Debugging.Soft.dll!Mono.Debugging.Soft.SoftDebuggerSession.GetThreadBacktrace(Mono.Debugger.Soft.ThreadMirror thread) Line 682 + 0x1b bytes	 
Mono.Debugging.Soft.dll!Mono.Debugging.Soft.SoftDebuggerSession.HandleBreakEventSet(Mono.Debugger.Soft.Event[] es, bool dequeuing) Line 1242 + 0x18 bytes	 
Mono.Debugging.Soft.dll!Mono.Debugging.Soft.SoftDebuggerSession.HandleEventSet(Mono.Debugger.Soft.EventSet es) Line 1128 + 0x22 bytes	 
Mono.Debugging.Soft.dll!Mono.Debugging.Soft.SoftDebuggerSession.EventHandler() Line 1065 + 0xb bytes	 
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) + 0x63 bytes	 
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) + 0xb0 bytes	 
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x2c bytes	 
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x44 bytes	 
[Native to Managed Transition]	 

Unflagged		6176	38	Worker Thread	Worker Thread	Mono.Debugger.Soft.Connection.SendReceive	Normal
[In a sleep, wait, or join]	 
mscorlib.dll!System.Threading.Monitor.Wait(object obj, int millisecondsTimeout, bool exitContext) + 0x18 bytes	 
mscorlib.dll!System.Threading.Monitor.Wait(object obj) + 0xa bytes	 
Mono.Debugger.Soft.dll!Mono.Debugger.Soft.Connection.SendReceive(Mono.Debugger.Soft.Connection.CommandSet command_set, int command, Mono.Debugger.Soft.Connection.PacketWriter packet) Line 1419 + 0xb bytes	 
Mono.Debugger.Soft.dll!Mono.Debugger.Soft.Connection.SendReceive(Mono.Debugger.Soft.Connection.CommandSet command_set, int command) Line 1426 + 0x10 bytes	 
Mono.Debugger.Soft.dll!Mono.Debugger.Soft.Connection.VM_Suspend() Line 1518 + 0xf bytes	 
Mono.Debugger.Soft.dll!Mono.Debugger.Soft.VirtualMachine.Suspend() Line 119 + 0xe bytes	 
Mono.Debugging.Soft.dll!Mono.Debugging.Soft.SoftDebuggerSession.OnStop() Line 1931 + 0x11 bytes	 
Mono.Debugging.dll!Mono.Debugging.Client.DebuggerSession.Stop.AnonymousMethod__35() Line 709 + 0xb bytes	 
Mono.Debugging.dll!Mono.Debugging.Client.DebuggerSession.Dispatch.AnonymousMethod__5() Line 272 + 0xe bytes	 
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(object state) + 0x2d bytes	 
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) + 0xb0 bytes	 
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() + 0x5a bytes	 
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() + 0x147 bytes	 
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() + 0x2d bytes	 
[Native to Managed Transition]	 

Unflagged	>	6500	39	Worker Thread	Worker Thread	Mono.Debugger.Soft.Connection.SendReceive	Normal
[In a sleep, wait, or join]	 
mscorlib.dll!System.Threading.Monitor.Wait(object obj, int millisecondsTimeout, bool exitContext) + 0x18 bytes	 
mscorlib.dll!System.Threading.Monitor.Wait(object obj) + 0xa bytes	 
Mono.Debugger.Soft.dll!Mono.Debugger.Soft.Connection.SendReceive(Mono.Debugger.Soft.Connection.CommandSet command_set, int command, Mono.Debugger.Soft.Connection.PacketWriter packet) Line 1419 + 0xb bytes	 
Mono.Debugger.Soft.dll!Mono.Debugger.Soft.Connection.VM_Exit(int exitCode) Line 1526 + 0x48 bytes	 
Mono.Debugger.Soft.dll!Mono.Debugger.Soft.VirtualMachine.Exit(int exitCode) Line 134 + 0x11 bytes	 
Mono.Debugging.Soft.dll!Mono.Debugging.Soft.SoftDebuggerSession.Dispose.AnonymousMethod__15() Line 553 + 0x12 bytes	 
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(object state) + 0x2d bytes	 
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) + 0xb0 bytes	 
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() + 0x5a bytes	 
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() + 0x147 bytes	 
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() + 0x2d bytes	 
[Native to Managed Transition]	 

Unflagged		5180	40	Worker Thread	Worker Thread	Mono.Debugging.Client.DebuggerSession.Dispatch.AnonymousMethod__5	Normal
[In a sleep, wait, or join]	 
mscorlib.dll!System.Threading.Monitor.Enter(object obj, ref bool lockTaken) + 0x14 bytes	 
Mono.Debugging.dll!Mono.Debugging.Client.DebuggerSession.Dispatch.AnonymousMethod__5() Line 271 + 0x17 bytes	 
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(object state) + 0x2d bytes	 
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) + 0xb0 bytes	 
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() + 0x5a bytes	 
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() + 0x147 bytes	 
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() + 0x2d bytes	 
[Native to Managed Transition]	 

Unflagged		4524	41	Worker Thread	Worker Thread	Mono.Debugging.Client.DebuggerSession.Dispatch.AnonymousMethod__5	Normal
[In a sleep, wait, or join]	 
mscorlib.dll!System.Threading.Monitor.Enter(object obj, ref bool lockTaken) + 0x14 bytes	 
Mono.Debugging.dll!Mono.Debugging.Client.DebuggerSession.Dispatch.AnonymousMethod__5() Line 271 + 0x17 bytes	 
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(object state) + 0x2d bytes	 
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) + 0xb0 bytes	 
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() + 0x5a bytes	 
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() + 0x147 bytes	 
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() + 0x2d bytes	 
[Native to Managed Transition]	 

Unflagged		6744	45	Worker Thread	<No Name>	[In a sleep, wait, or join]	Normal
[In a sleep, wait, or join]	 
mscorlib.dll!System.Threading.WaitHandle.WaitAny(System.Threading.WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) + 0x8b bytes	 
System.dll!System.Net.TimerThread.ThreadProc() + 0x376 bytes	 
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) + 0x63 bytes	 
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) + 0xb0 bytes	 
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x2c bytes	 
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x44 bytes	 
[Native to Managed Transition]
Comment 1 Jeffrey Stedfast 2013-03-08 19:20:51 UTC
this should be fixed now
Comment 2 Jatin 2013-03-19 07:36:41 UTC
Today with the latest builds:

Windows 7 and 8
MFA 4.6.01072
XS 4.0.2.22

And now the Mono Soft Debugger does not hang XS on Windows

Hence, closing this issue.