Bug 1540 - Debugger occasionally crashes on break
Summary: Debugger occasionally crashes on break
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Runtime
Classification: Mono
Component: Debugger (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2011-10-17 17:41 UTC by Marek Safar
Modified: 2017-07-11 21:12 UTC (History)
3 users (show)

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


Attachments

Description Marek Safar 2011-10-17 17:41:37 UTC
Stacktrace:


Native stacktrace:

	/home/marek/mono/bin/mono() [0x4952a1]
	/home/marek/mono/bin/mono() [0x4e727f]
	/home/marek/mono/bin/mono() [0x418a49]
	/lib/x86_64-linux-gnu/libpthread.so.0(+0xfc60) [0x2acedbc9cc60]
	/home/marek/mono/bin/mono() [0x4e6d9f]
	/home/marek/mono/bin/mono() [0x493296]
	/home/marek/mono/bin/mono() [0x493fc3]
	/home/marek/mono/bin/mono() [0x494191]
	/home/marek/mono/bin/mono() [0x4b28d9]
	/home/marek/mono/bin/mono() [0x4b565a]
	/home/marek/mono/bin/mono() [0x4bda76]
	/home/marek/mono/bin/mono() [0x5b79b3]
	/home/marek/mono/bin/mono() [0x5c89e9]
	/home/marek/mono/bin/mono() [0x5e27d9]
	/lib/x86_64-linux-gnu/libpthread.so.0(+0x6d8c) [0x2acedbc93d8c]
	/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x2acedbf9104d]

Debug info from gdb:

Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

Mono.Debugger.Soft.VMDisconnectedException: Exception of type 'Mono.Debugger.Soft.VMDisconnectedException' was thrown.
  at Mono.Debugger.Soft.Connection.SendReceive (CommandSet command_set, Int32 command, Mono.Debugger.Soft.PacketWriter packet) [0x00114] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:1267 
  at Mono.Debugger.Soft.Connection.Type_GetFields (Int64 id, System.String[]& names, System.Int64[]& types, System.Int32[]& attrs) [0x00000] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:1693 
  at Mono.Debugger.Soft.TypeMirror.GetFields () [0x00012] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs:366 
  at Mono.Debugging.Soft.SoftDebuggerAdaptor.GetMember (Mono.Debugging.Evaluation.EvaluationContext ctx, System.Object t, System.Object co, System.String name) [0x0000c] in /home/marek/git/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerAdaptor.cs:380 
  at Mono.Debugging.Evaluation.ObjectValueAdaptor.GetMember (Mono.Debugging.Evaluation.EvaluationContext ctx, IObjectSource objectSource, System.Object t, System.Object co, System.String name) [0x00000] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ObjectValueAdaptor.cs:631 
  at Mono.Debugging.Evaluation.EvaluatorVisitor.VisitIdentifier (System.String name) [0x000bb] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryEvaluator.cs:555 
  at Mono.Debugging.Evaluation.EvaluatorVisitor.VisitIdentifierExpression (ICSharpCode.OldNRefactory.Ast.IdentifierExpression identifierExpression, System.Object data) [0x00000] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryEvaluator.cs:522 
  at ICSharpCode.OldNRefactory.Ast.IdentifierExpression.AcceptVisitor (IAstVisitor visitor, System.Object data) [0x00000] in /home/marek/git/monodevelop/main/contrib/NRefactory/Project/Src/Ast/Generated.cs:2284 
  at Mono.Debugging.Evaluation.EvaluatorVisitor.VisitIndexerExpression (ICSharpCode.OldNRefactory.Ast.IndexerExpression indexerExpression, System.Object data) [0x00000] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryEvaluator.cs:497 
  at ICSharpCode.OldNRefactory.Ast.IndexerExpression.AcceptVisitor (IAstVisitor visitor, System.Object data) [0x00000] in /home/marek/git/monodevelop/main/contrib/NRefactory/Project/Src/Ast/Generated.cs:2556 
  at Mono.Debugging.Evaluation.EvaluatorVisitor.VisitMemberReferenceExpression (ICSharpCode.OldNRefactory.Ast.MemberReferenceExpression memberReferenceExpression, System.Object data) [0x00000] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryEvaluator.cs:594 
  at ICSharpCode.OldNRefactory.Ast.MemberReferenceExpression.AcceptVisitor (IAstVisitor visitor, System.Object data) [0x00000] in /home/marek/git/monodevelop/main/contrib/NRefactory/Project/Src/Ast/Generated.cs:2840 
  at Mono.Debugging.Evaluation.NRefactoryEvaluator.Evaluate (Mono.Debugging.Evaluation.EvaluationContext ctx, System.String exp, System.Object expectedType, Boolean tryTypeOf) [0x00164] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryEvaluator.cs:89 Mono.Debugger.Soft.VMDisconnectedException: Exception of type 'Mono.Debugger.Soft.VMDisconnectedException' was thrown.
  at Mono.Debugger.Soft.Connection.SendReceive (CommandSet command_set, Int32 command, Mono.Debugger.Soft.PacketWriter packet) [0x00114] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:1267 
  at Mono.Debugger.Soft.Connection.Type_GetFields (Int64 id, System.String[]& names, System.Int64[]& types, System.Int32[]& attrs) [0x00000] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:1693 
  at Mono.Debugger.Soft.TypeMirror.GetFields () [0x00012] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs:366 
  at Mono.Debugging.Soft.SoftDebuggerAdaptor.GetMember (Mono.Debugging.Evaluation.EvaluationContext ctx, System.Object t, System.Object co, System.String name) [0x0000c] in /home/marek/git/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerAdaptor.cs:380 
  at Mono.Debugging.Evaluation.ObjectValueAdaptor.GetMember (Mono.Debugging.Evaluation.EvaluationContext ctx, IObjectSource objectSource, System.Object t, System.Object co, System.String name) [0x00000] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ObjectValueAdaptor.cs:631 
  at Mono.Debugging.Evaluation.EvaluatorVisitor.VisitIdentifier (System.String name) [0x000bb] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryEvaluator.cs:555 
  at Mono.Debugging.Evaluation.EvaluatorVisitor.VisitIdentifierExpression (ICSharpCode.OldNRefactory.Ast.IdentifierExpression identifierExpression, System.Object data) [0x00000] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryEvaluator.cs:522 
  at ICSharpCode.OldNRefactory.Ast.IdentifierExpression.AcceptVisitor (IAstVisitor visitor, System.Object data) [0x00000] in /home/marek/git/monodevelop/main/contrib/NRefactory/Project/Src/Ast/Generated.cs:2284 
  at Mono.Debugging.Evaluation.NRefactoryEvaluator.Evaluate (Mono.Debugging.Evaluation.EvaluationContext ctx, System.String exp, System.Object expectedType, Boolean tryTypeOf) [0x00164] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryEvaluator.cs:89 Mono.Debugger.Soft.VMDisconnectedException: Exception of type 'Mono.Debugger.Soft.VMDisconnectedException' was thrown.
  at Mono.Debugger.Soft.Connection.SendReceive (CommandSet command_set, Int32 command, Mono.Debugger.Soft.PacketWriter packet) [0x00114] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:1267 
  at Mono.Debugger.Soft.Connection.StackFrame_GetValues (Int64 thread_id, Int64 id, System.Int32[] pos) [0x00004] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:1849 
  at Mono.Debugger.Soft.StackFrame.GetValue (Mono.Debugger.Soft.LocalVariable var) [0x0002d] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/StackFrame.cs:103 
  at Mono.Debugging.Soft.VariableValueReference.get_Value () [0x0000c] in /home/marek/git/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/VariableValueReference.cs:67 
  at Mono.Debugging.Evaluation.ValueReference.OnCreateObjectValue (Mono.Debugging.Client.EvaluationOptions options) [0x00020] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs:131 
  at Mono.Debugging.Evaluation.ValueReference.CreateObjectValue (Mono.Debugging.Client.EvaluationOptions options) [0x00050] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs:106 Mono.Debugger.Soft.VMDisconnectedException: Exception of type 'Mono.Debugger.Soft.VMDisconnectedException' was thrown.
  at Mono.Debugger.Soft.Connection.SendReceive (CommandSet command_set, Int32 command, Mono.Debugger.Soft.PacketWriter packet) [0x00114] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:1267 
  at Mono.Debugger.Soft.Connection.Type_GetFields (Int64 id, System.String[]& names, System.Int64[]& types, System.Int32[]& attrs) [0x00000] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:1693 
  at Mono.Debugger.Soft.TypeMirror.GetFields () [0x00012] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs:366 
  at Mono.Debugging.Soft.SoftDebuggerAdaptor.GetMember (Mono.Debugging.Evaluation.EvaluationContext ctx, System.Object t, System.Object co, System.String name) [0x0000c] in /home/marek/git/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerAdaptor.cs:380 
  at Mono.Debugging.Evaluation.ObjectValueAdaptor.GetMember (Mono.Debugging.Evaluation.EvaluationContext ctx, IObjectSource objectSource, System.Object t, System.Object co, System.String name) [0x00000] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ObjectValueAdaptor.cs:631 
  at Mono.Debugging.Evaluation.EvaluatorVisitor.VisitIdentifier (System.String name) [0x000bb] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryEvaluator.cs:555 
  at Mono.Debugging.Evaluation.EvaluatorVisitor.VisitIdentifierExpression (ICSharpCode.OldNRefactory.Ast.IdentifierExpression identifierExpression, System.Object data) [0x00000] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryEvaluator.cs:522 
  at ICSharpCode.OldNRefactory.Ast.IdentifierExpression.AcceptVisitor (IAstVisitor visitor, System.Object data) [0x00000] in /home/marek/git/monodevelop/main/contrib/NRefactory/Project/Src/Ast/Generated.cs:2284 
  at Mono.Debugging.Evaluation.NRefactoryEvaluator.Evaluate (Mono.Debugging.Evaluation.EvaluationContext ctx, System.String exp, System.Object expectedType, Boolean tryTypeOf) [0x00164] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryEvaluator.cs:89 Mono.Debugger.Soft.VMDisconnectedException: Exception of type 'Mono.Debugger.Soft.VMDisconnectedException' was thrown.
  at Mono.Debugger.Soft.Connection.SendReceive (CommandSet command_set, Int32 command, Mono.Debugger.Soft.PacketWriter packet) [0x00114] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:1267 
  at Mono.Debugger.Soft.Connection.Type_GetFields (Int64 id, System.String[]& names, System.Int64[]& types, System.Int32[]& attrs) [0x00000] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:1693 
  at Mono.Debugger.Soft.TypeMirror.GetFields () [0x00012] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs:366 
  at Mono.Debugging.Soft.SoftDebuggerAdaptor.GetMember (Mono.Debugging.Evaluation.EvaluationContext ctx, System.Object t, System.Object co, System.String name) [0x0000c] in /home/marek/git/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerAdaptor.cs:380 
  at Mono.Debugging.Evaluation.ObjectValueAdaptor.GetMember (Mono.Debugging.Evaluation.EvaluationContext ctx, IObjectSource objectSource, System.Object t, System.Object co, System.String name) [0x00000] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ObjectValueAdaptor.cs:631 
  at Mono.Debugging.Evaluation.EvaluatorVisitor.VisitIdentifier (System.String name) [0x000bb] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryEvaluator.cs:555 
  at Mono.Debugging.Evaluation.EvaluatorVisitor.VisitIdentifierExpression (ICSharpCode.OldNRefactory.Ast.IdentifierExpression identifierExpression, System.Object data) [0x00000] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryEvaluator.cs:522 
  at ICSharpCode.OldNRefactory.Ast.IdentifierExpression.AcceptVisitor (IAstVisitor visitor, System.Object data) [0x00000] in /home/marek/git/monodevelop/main/contrib/NRefactory/Project/Src/Ast/Generated.cs:2284 
  at Mono.Debugging.Evaluation.NRefactoryEvaluator.Evaluate (Mono.Debugging.Evaluation.EvaluationContext ctx, System.String exp, System.Object expectedType, Boolean tryTypeOf) [0x00164] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryEvaluator.cs:89 Mono.Debugger.Soft.VMDisconnectedException: Exception of type 'Mono.Debugger.Soft.VMDisconnectedException' was thrown.
  at Mono.Debugger.Soft.Connection.SendReceive (CommandSet command_set, Int32 command, Mono.Debugger.Soft.PacketWriter packet) [0x00114] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:1267 
  at Mono.Debugger.Soft.Connection.StackFrame_GetValues (Int64 thread_id, Int64 id, System.Int32[] pos) [0x00004] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:1849 
  at Mono.Debugger.Soft.StackFrame.GetValue (Mono.Debugger.Soft.LocalVariable var) [0x0002d] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/StackFrame.cs:103 
  at Mono.Debugging.Soft.VariableValueReference.get_Value () [0x0000c] in /home/marek/git/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/VariableValueReference.cs:67 
  at Mono.Debugging.Evaluation.ValueReference.OnCreateObjectValue (Mono.Debugging.Client.EvaluationOptions options) [0x00020] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs:131 
  at Mono.Debugging.Evaluation.ValueReference.CreateObjectValue (Mono.Debugging.Client.EvaluationOptions options) [0x00050] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs:106 Mono.Debugger.Soft.VMDisconnectedException: Exception of type 'Mono.Debugger.Soft.VMDisconnectedException' was thrown.
  at Mono.Debugger.Soft.Connection.SendReceive (CommandSet command_set, Int32 command, Mono.Debugger.Soft.PacketWriter packet) [0x00114] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:1267 
  at Mono.Debugger.Soft.Connection.StackFrame_GetValues (Int64 thread_id, Int64 id, System.Int32[] pos) [0x00004] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:1849 
  at Mono.Debugger.Soft.StackFrame.GetValue (Mono.Debugger.Soft.LocalVariable var) [0x0002d] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/StackFrame.cs:103 
  at Mono.Debugging.Soft.VariableValueReference.get_Value () [0x0000c] in /home/marek/git/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/VariableValueReference.cs:67 
  at Mono.Debugging.Evaluation.ValueReference.OnCreateObjectValue (Mono.Debugging.Client.EvaluationOptions options) [0x00020] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs:131 
  at Mono.Debugging.Evaluation.ValueReference.CreateObjectValue (Mono.Debugging.Client.EvaluationOptions options) [0x00050] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs:106
Comment 1 Marek Safar 2011-10-17 17:48:51 UTC
Program which reproduces the issue

using System;
using System.Threading;
using System.Threading.Tasks;

public class Test
{
	public static int Main ()
	{
		var mre = new ManualResetEventSlim ();
		for (int i = 0; i < 9999999; ++i) {
			CountdownEvent evt = new CountdownEvent (2);
			CountdownEvent evtFinish = new CountdownEvent (2);

			ThreadPool.QueueUserWorkItem (delegate {
				try {
					evt.Signal ();
					Console.WriteLine ("A " + i);
					evt.Wait (10000);
					mre.Dispose ();
				} catch (Exception e) {
				}
				evtFinish.Signal ();
			});
			ThreadPool.QueueUserWorkItem (delegate {
				try {
					evt.Signal ();
					Console.WriteLine ("B " + i);
					evt.Wait (10000);
					mre.Set ();
				} catch (Exception e) {
				}
				evtFinish.Signal ();
			});

			bool bb = evtFinish.Wait (1000);
			
			int cc = evtFinish.CurrentCount;
			if ((i % 20) == 0) {
				Console.WriteLine ("aaaa");		// Set breakpoint here
			}	
		}

		return 0;
	}
}
Comment 2 Zoltan Varga 2011-10-20 16:14:13 UTC
Can't reproduce this. How often does this happen ?
Comment 3 Marek Safar 2011-10-20 17:41:44 UTC
With mono master quite often, 5 of 10 runs. I can give it another try tomorrow if you still cannot reproduce it
Comment 4 Zoltan Varga 2011-10-20 17:49:14 UTC
Could you run md with MONO_DEBUG=suspend-on-sigsegv, then when the crash happens, attach to the mono process with the --debugger-agent= arguments, and type
thread apply all bt
Comment 5 Marek Safar 2011-10-21 04:07:22 UTC
I am getting different crash with latest master

What is important is to have Thread debug tab visible


* Assertion at exceptions-amd64.c:655, condition `ext->debugger_invoke' not met

Stacktrace:


Native stacktrace:

	/home/marek/mono/bin/mono() [0x4952a1]
	/lib/x86_64-linux-gnu/libpthread.so.0(+0xfc60) [0x2b2cf7a88c60]
	/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x2b2cf7ccad05]
	/lib/x86_64-linux-gnu/libc.so.6(abort+0x186) [0x2b2cf7cceab6]
	/home/marek/mono/bin/mono() [0x5d613b]
	/home/marek/mono/bin/mono() [0x5d6273]
	/home/marek/mono/bin/mono() [0x4e6f5a]
	/home/marek/mono/bin/mono() [0x493296]
	/home/marek/mono/bin/mono() [0x493fc3]
	/home/marek/mono/bin/mono() [0x494191]
	/home/marek/mono/bin/mono() [0x4b28d9]
	/home/marek/mono/bin/mono() [0x4b572a]
	/home/marek/mono/bin/mono() [0x4bdb16]
	/home/marek/mono/bin/mono() [0x5b79a3]
	/home/marek/mono/bin/mono() [0x5c89d9]
	/home/marek/mono/bin/mono() [0x5e27c9]
	/lib/x86_64-linux-gnu/libpthread.so.0(+0x6d8c) [0x2b2cf7a7fd8c]
	/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x2b2cf7d7d04d]

Debug info from gdb:

Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================
Comment 6 Marek Safar 2011-10-21 04:22:51 UTC
I don't know whether I have do it correctly (don't know how to pass --debugger-agent) but you can do it yourself if you remove Thread.MemoryBarrier at line 94 in mcs/class/corlib/System.Threading/ManualResetEventSlim.cs otherwise it won't hit the breakpoint

this is the output

(gdb) thread apply all bt

Thread 14 (Thread 0x2af6e74e6700 (LWP 5342)):
#0  0x00002af6e66b2bac in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00000000005e2b4b in GC_wait_marker () at pthread_support.c:1868
#2  0x00000000005e7ab3 in GC_help_marker (my_mark_no=160) at mark.c:1116
#3  0x00000000005e1848 in GC_mark_thread (id=0x0) at pthread_support.c:552
#4  0x00002af6e66add8c in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00002af6e69ab04d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 13 (Thread 0x2af6e76e7700 (LWP 5343)):
#0  0x00002af6e66b2bac in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00000000005e2b4b in GC_wait_marker () at pthread_support.c:1868
#2  0x00000000005e7ab3 in GC_help_marker (my_mark_no=160) at mark.c:1116
#3  0x00000000005e1848 in GC_mark_thread (id=0x1) at pthread_support.c:552
#4  0x00002af6e66add8c in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00002af6e69ab04d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 12 (Thread 0x2af6e78e8700 (LWP 5344)):
#0  0x00002af6e66b2bac in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00000000005e2b4b in GC_wait_marker () at pthread_support.c:1868
#2  0x00000000005e7ab3 in GC_help_marker (my_mark_no=160) at mark.c:1116
#3  0x00000000005e1848 in GC_mark_thread (id=0x2) at pthread_support.c:552
#4  0x00002af6e66add8c in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00002af6e69ab04d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 11 (Thread 0x2af6e7ae9700 (LWP 5345)):
#0  0x00002af6e66b2bac in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00000000005e2b4b in GC_wait_marker () at pthread_support.c:1868
#2  0x00000000005e7ab3 in GC_help_marker (my_mark_no=160) at mark.c:1116
#3  0x00000000005e1848 in GC_mark_thread (id=0x3) at pthread_support.c:552
#4  0x00002af6e66add8c in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00002af6e69ab04d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x0000000000000000 in ?? ()

---Type <return> to continue, or q <return> to quit---
Thread 10 (Thread 0x2af6e7cea700 (LWP 5346)):
#0  0x00002af6e66b2bac in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00000000005e2b4b in GC_wait_marker () at pthread_support.c:1868
#2  0x00000000005e7ab3 in GC_help_marker (my_mark_no=160) at mark.c:1116
#3  0x00000000005e1848 in GC_mark_thread (id=0x4) at pthread_support.c:552
#4  0x00002af6e66add8c in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00002af6e69ab04d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 9 (Thread 0x2af6e7eeb700 (LWP 5347)):
#0  0x00002af6e66b2bac in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00000000005e2b4b in GC_wait_marker () at pthread_support.c:1868
#2  0x00000000005e7ab3 in GC_help_marker (my_mark_no=160) at mark.c:1116
#3  0x00000000005e1848 in GC_mark_thread (id=0x5) at pthread_support.c:552
#4  0x00002af6e66add8c in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00002af6e69ab04d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 8 (Thread 0x2af6e80ec700 (LWP 5348)):
#0  0x00002af6e66b2bac in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00000000005e2b4b in GC_wait_marker () at pthread_support.c:1868
#2  0x00000000005e7ab3 in GC_help_marker (my_mark_no=160) at mark.c:1116
#3  0x00000000005e1848 in GC_mark_thread (id=0x6) at pthread_support.c:552
#4  0x00002af6e66add8c in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00002af6e69ab04d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 7 (Thread 0x2aaaabad0700 (LWP 5350)):
#0  0x00002af6e66b4ea0 in sem_wait () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00000000005c3d58 in mono_sem_wait (sem=0x918560, alertable=1) at mono-semaphore.c:113
#2  0x00000000005a718b in finalizer_thread (unused=<value optimised out>) at gc.c:1073
#3  0x000000000050b6ec in start_wrapper_internal (data=0x14a0bb0) at threads.c:571
#4  start_wrapper (data=0x14a0bb0) at threads.c:619
#5  0x00000000005b79a3 in thread_start_routine (args=0x147daf8) at wthreads.c:290
#6  0x00000000005c89d9 in inner_start_thread (arg=0x1497810) at mono-threads-posix.c:49
#7  0x00000000005e27c9 in GC_start_routine (arg=0x2aaaaaedefc0) at pthread_support.c:1473
#8  0x00002af6e66add8c in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#9  0x00002af6e69ab04d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x2aaaabce1700 (LWP 5351)):
#0  0x000000000049538e in mono_handle_native_sigsegv (signal=6, ctx=<value optimised out>) at /usr/include/bits/stdio2.h:98
#1  <signal handler called>
#2  0x00002af6e68f8d05 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00002af6e68fcab6 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00000000005d613b in monoeg_g_logv (log_domain=<value optimised out>, log_level=G_LOG_LEVEL_ERROR, 
    format=<value optimised out>, args=<value optimised out>) at goutput.c:136
#5  0x00000000005d6273 in monoeg_assertion_message (format=<value optimised out>) at goutput.c:156
#6  0x00000000004e6f5a in mono_arch_find_jit_info (domain=0x8, jit_tls=0x152c9b0, ji=0x0, ctx=0x2aaaabce07b0, new_ctx=
    0x2aaaabce0720, lmf=0x2aaaabce0718, save_locations=0x2aaaabce0840, frame=0x2aaaabce0940) at exceptions-amd64.c:655
#7  0x0000000000493296 in mono_find_jit_info_ext (domain=0x2af6e8113cc0, jit_tls=<value optimised out>, 
    prev_ji=<value optimised out>, ctx=0x2aaaabce07b0, new_ctx=0x2aaaabce0720, trace=0x0, lmf=0x2aaaabce0718, save_locations=
    0x2aaaabce0840, frame=0x2aaaabce0940) at mini-exceptions.c:369
#8  0x0000000000493fc3 in mono_walk_stack_full (func=0x4b25c0 <process_frame>, start_ctx=<value optimised out>, domain=
    0x2af6e8113cc0, jit_tls=0x152c9b0, lmf=0x2aaab01ff7b8, unwind_options=<value optimised out>, user_data=0x2aaaabce0ac0)
    at mini-exceptions.c:752
#9  0x0000000000494191 in mono_walk_stack_with_state (func=0x4b25c0 <process_frame>, state=<value optimised out>, 
    unwind_options=<value optimised out>, user_data=<value optimised out>) at mini-exceptions.c:698
#10 0x00000000004b28d9 in compute_frame_info (thread=<value optimised out>, tls=0x151fec0) at debugger-agent.c:3015
#11 0x00000000004b572a in thread_commands (command=<value optimised out>, p=<value optimised out>, end=0x1583cfc "", buf=
    0x2aaaabce0bd0) at debugger-agent.c:7214
#12 0x00000000004bdb16 in debugger_thread (arg=<value optimised out>) at debugger-agent.c:7825
#13 0x00000000005b79a3 in thread_start_routine (args=0x147dbc0) at wthreads.c:290
#14 0x00000000005c89d9 in inner_start_thread (arg=0x149d9f0) at mono-threads-posix.c:49
#15 0x00000000005e27c9 in GC_start_routine (arg=0x2aaaaaedefc0) at pthread_support.c:1473
#16 0x00002af6e66add8c in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#17 0x00002af6e69ab04d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#18 0x0000000000000000 in ?? ()

Thread 5 (Thread 0x2aaaabd2b700 (LWP 5355)):
#0  0x00002af6e66b64bd in nanosleep () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00000000005b6d17 in SleepEx (ms=<value optimised out>, alertable=1) at wthreads.c:865
#2  0x00000000005192e8 in monitor_thread (unused=<value optimised out>) at threadpool.c:778
#3  0x000000000050b6ec in start_wrapper_internal (data=0x14ff920) at threads.c:571
---Type <return> to continue, or q <return> to quit--- 
#4  start_wrapper (data=0x14ff920) at threads.c:619
#5  0x00000000005b79a3 in thread_start_routine (args=0x147dd50) at wthreads.c:290
#6  0x00000000005c89d9 in inner_start_thread (arg=0x1506760) at mono-threads-posix.c:49
#7  0x00000000005e27c9 in GC_start_routine (arg=0x2aaaaaedefc0) at pthread_support.c:1473
#8  0x00002af6e66add8c in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#9  0x00002af6e69ab04d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x2aaaabf2c700 (LWP 5356)):
#0  0x00002af6e66b4f91 in sem_timedwait () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00000000005c3e55 in mono_sem_timedwait (sem=0x917508, timeout_ms=<value optimised out>, alertable=1) at mono-semaphore.c:76
#2  0x000000000051b84f in async_invoke_thread (data=0x0) at threadpool.c:1486
#3  0x000000000050b6ec in start_wrapper_internal (data=0x14c5fe0) at threads.c:571
#4  start_wrapper (data=0x14c5fe0) at threads.c:619
#5  0x00000000005b79a3 in thread_start_routine (args=0x147de18) at wthreads.c:290
#6  0x00000000005c89d9 in inner_start_thread (arg=0x1505ab0) at mono-threads-posix.c:49
#7  0x00000000005e27c9 in GC_start_routine (arg=0x2aaaaaedefc0) at pthread_support.c:1473
#8  0x00002af6e66add8c in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#9  0x00002af6e69ab04d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x2aaab0200700 (LWP 5357)):
#0  0x00002af6e66b4f91 in sem_timedwait () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00000000005c3e55 in mono_sem_timedwait (sem=0x917508, timeout_ms=<value optimised out>, alertable=1) at mono-semaphore.c:76
#2  0x000000000051b84f in async_invoke_thread (data=0x0) at threadpool.c:1486
#3  0x000000000050b6ec in start_wrapper_internal (data=0x152c800) at threads.c:571
#4  start_wrapper (data=0x152c800) at threads.c:619
#5  0x00000000005b79a3 in thread_start_routine (args=0x147e390) at wthreads.c:290
#6  0x00000000005c89d9 in inner_start_thread (arg=0x152c580) at mono-threads-posix.c:49
#7  0x00000000005e27c9 in GC_start_routine (arg=0x2aaaaaedefc0) at pthread_support.c:1473
#8  0x00002af6e66add8c in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#9  0x00002af6e69ab04d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x2aaab0471700 (LWP 5358)):
#0  0x00002af6e66b4f91 in sem_timedwait () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00000000005c3e55 in mono_sem_timedwait (sem=0x917508, timeout_ms=<value optimised out>, alertable=1) at mono-semaphore.c:76
---Type <return> to continue, or q <return> to quit---
#2  0x000000000051b84f in async_invoke_thread (data=0x0) at threadpool.c:1486
#3  0x000000000050b6ec in start_wrapper_internal (data=0x158e660) at threads.c:571
#4  start_wrapper (data=0x158e660) at threads.c:619
#5  0x00000000005b79a3 in thread_start_routine (args=0x1595a10) at wthreads.c:290
#6  0x00000000005c89d9 in inner_start_thread (arg=0x1585100) at mono-threads-posix.c:49
#7  0x00000000005e27c9 in GC_start_routine (arg=0x2aaab020afc0) at pthread_support.c:1473
#8  0x00002af6e66add8c in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#9  0x00002af6e69ab04d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x2af6e6c5a460 (LWP 5341)):
#0  0x00002af6e66b2bac in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00000000004b9157 in suspend_current () at debugger-agent.c:2663
#2  0x00000000004b9ce5 in process_event (event=<value optimised out>, arg=<value optimised out>, 
    il_offset=<value optimised out>, ctx=<value optimised out>, events=0x0, suspend_policy=<value optimised out>)
    at debugger-agent.c:3394
#3  0x00000000004bae7e in process_breakpoint_inner (tls=<value optimised out>) at debugger-agent.c:4226
#4  0x00000000004b2b63 in process_signal_event (func=0x4baa20 <process_breakpoint_inner>) at debugger-agent.c:4247
#5  0x0000000041cc9238 in ?? ()
#6  0x00002af6e8113cc0 in ?? ()
#7  0x00002aaab0232370 in ?? ()
#8  0x0000000000000002 in ?? ()
#9  0x00002aaab022e160 in ?? ()
#10 0x00002aaab0232370 in ?? ()
#11 0x0000000000000002 in ?? ()
#12 0x00002aaab022e140 in ?? ()
#13 0x00002aaab0232370 in ?? ()
#14 0x00002aaab0232370 in ?? ()
#15 0x00002aaab0232370 in ?? ()
#16 0x000000004076c000 in ?? ()
#17 0x0000000041cc8f60 in ?? ()
#18 0x0000000001412c90 in ?? ()
#19 0x0000000000000000 in ?? ()
Comment 7 Zoltan Varga 2011-10-21 07:24:34 UTC
Fixed in HEAD.
Comment 8 Zoltan Varga 2013-09-16 14:48:02 UTC
Reverted the fix for this (5ddbe31ee5c42f5e379cb077e3473667791bc15a), but can no longer reproduce this issue, with or without that commit. Its possible some other change fixed this.

Note You need to log in before you can comment on or make changes to this bug.