Bug 17185 - * Assertion: should not be reached at debugger-agent.c:6040
Summary: * Assertion: should not be reached at debugger-agent.c:6040
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: Debugger ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2014-01-11 07:08 UTC by Marek Safar
Modified: 2014-01-13 11:14 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 GitHub or Developer Community 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:
RESOLVED FIXED

Description Marek Safar 2014-01-11 07:08:19 UTC
* Assertion: should not be reached at debugger-agent.c:6040

Stacktrace:


Native stacktrace:

	0   mono                                0x001dc028 mono_handle_native_sigsegv + 456
	1   mono                                0x00292a3b sigabrt_signal_handler + 171
	2   libsystem_platform.dylib            0x92ef1deb _sigtramp + 43
	3   ???                                 0xffffffff 0x0 + 4294967295
	4   libsystem_c.dylib                   0x9a412340 abort + 155
	5   mono                                0x004d1f22 monoeg_g_logv + 322
	6   mono                                0x004d1fc7 monoeg_assertion_message + 71
	7   mono                                0x00225548 set_var + 712
	8   mono                                0x00223c29 frame_commands + 2937
	9   mono                                0x0021e80c debugger_thread + 2044
	10  mono                                0x004abdcb thread_start_routine + 299
	11  mono                                0x004ca475 inner_start_thread + 197
	12  libsystem_pthread.dylib             0x95b7a5fb _pthread_body + 144
	13  libsystem_pthread.dylib             0x95b7a485 _pthread_struct_init + 0
	14  libsystem_pthread.dylib             0x95b7fcf2 thread_start + 34

Debug info from gdb:

Process 30365 stopped
* thread #1: tid = 0x2607f4, 0x94f707ca libsystem_kernel.dylib`__psynch_cvwait + 10, queue = 'com.apple.main-thread, stop reason = signal SIGSTOP
  thread #2: tid = 0x2607f6, 0x94f6bfb6 libsystem_kernel.dylib`semaphore_wait_trap + 10
  thread #3: tid = 0x2607f7, 0x94f70ff2 libsystem_kernel.dylib`__wait4 + 10
(lldb) error: mono debug map object file '/Users/marek/git/mono/mono/mini/mono_sgen-main-sgen.o' has changed (actual time is 0x52d00fc2, debug map time is 0x52cfdf32) since this executable was linked, file will be ignored
* thread #1: tid = 0x2607f4, 0x94f707ca libsystem_kernel.dylib`__psynch_cvwait + 10, queue = 'com.apple.main-thread, stop reason = signal SIGSTOP
    frame #0: 0x94f707ca libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x95b7cd1d libsystem_pthread.dylib`_pthread_cond_wait + 728
    frame #2: 0x95b7ebd9 libsystem_pthread.dylib`pthread_cond_wait$UNIX2003 + 71
    frame #3: 0x00218a76 mono`suspend_current + 550 at debugger-agent.c:2894
    frame #4: 0x00219044 mono`invoke_method + 1076 at debugger-agent.c:6495
    frame #5: 0x00218be3 mono`suspend_current + 915 at debugger-agent.c:2913
    frame #6: 0x00219044 mono`invoke_method + 1076 at debugger-agent.c:6495
    frame #7: 0x00218be3 mono`suspend_current + 915 at debugger-agent.c:2913
    frame #8: 0x00219044 mono`invoke_method + 1076 at debugger-agent.c:6495
    frame #9: 0x00218be3 mono`suspend_current + 915 at debugger-agent.c:2913
    frame #10: 0x00219044 mono`invoke_method + 1076 at debugger-agent.c:6495
    frame #11: 0x00218be3 mono`suspend_current + 915 at debugger-agent.c:2913
    frame #12: 0x00213f27 mono`process_event(event=EVENT_KIND_STEP, arg=0x79281f5c, il_offset=0, ctx=0x7a1608b4, events=0x00000000, suspend_policy=2) + 2743 at debugger-agent.c:3736
    frame #13: 0x00214f69 mono`process_breakpoint_inner(tls=0x7a160750) + 1721 at debugger-agent.c:4647
    frame #14: 0x0021d945 mono`process_signal_event(func=0x002148b0) + 165 at debugger-agent.c:4666
    frame #15: 0x002127aa mono`process_breakpoint + 26 at debugger-agent.c:4678
    frame #16: 0x0078a474
    frame #17: 0x0078950c
    frame #18: 0x007893fc
    frame #19: 0x00789140
    frame #20: 0x00789392
    frame #21: 0x000ca646 mono`mono_jit_runtime_invoke + 2342
    frame #22: 0x003d6040 mono`mono_runtime_invoke(method=0x7aa6ae1c, obj=0x00000000, params=0xbff4d47c, exc=0x00000000) + 208 at object.c:2828
    frame #23: 0x003e21cf mono`mono_runtime_exec_main(method=0x7aa6ae1c, args=0x008007e8, exc=0x00000000) + 847 at object.c:4061
    frame #24: 0x003e1e77 mono`mono_runtime_run_main(method=0x7aa6ae1c, argc=0, argv=0xbff4d9e4, exc=0x00000000) + 1079 at object.c:3679
    frame #25: 0x00193ace mono`mono_jit_exec + 286
    frame #26: 0x001979f7 mono`main_thread_handler + 647
    frame #27: 0x00196360 mono`mono_main + 8960
    frame #28: 0x000b49c8 mono`mono_main_with_options + 1016
    frame #29: 0x000b45c0 mono`main + 64

  thread #2: tid = 0x2607f6, 0x94f6bfb6 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #0: 0x94f6bfb6 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x004c134f mono`mono_sem_wait(sem=0x005cfc40, alertable=1) + 31 at mono-semaphore.c:121
    frame #2: 0x003d0821 mono`finalizer_thread(unused=0x00000000) + 209 at gc.c:1073
    frame #3: 0x00393dfc mono`start_wrapper_internal(data=0x7a161910) + 1020 at threads.c:609
    frame #4: 0x00381af2 mono`start_wrapper(data=0x7a161910) + 34 at threads.c:654
    frame #5: 0x004abdcb mono`thread_start_routine(args=0x7aa5d1b8) + 299 at wthreads.c:294
    frame #6: 0x004ca475 mono`inner_start_thread(arg=0x7a161b70) + 197 at mono-threads-posix.c:49
    frame #7: 0x95b7a5fb libsystem_pthread.dylib`_pthread_body + 144
    frame #8: 0x95b7a485 libsystem_pthread.dylib`_pthread_start + 130

  thread #3: tid = 0x2607f7, 0x94f70ff2 libsystem_kernel.dylib`__wait4 + 10
    frame #0: 0x94f70ff2 libsystem_kernel.dylib`__wait4 + 10
    frame #1: 0x9a430f69 libsystem_c.dylib`waitpid$UNIX2003 + 48
    frame #2: 0x001dc1a3 mono`mono_handle_native_sigsegv(signal=6, ctx=0xb0202a0c) + 835 at mini-exceptions.c:2299
    frame #3: 0x00292a3b mono`sigabrt_signal_handler + 171
Executing commands in '/tmp/mono-gdb-commands.4W69T1'.
(lldb)  process attach --pid 30365
Process 30365 stopped
Executable module set to "/Library/Frameworks/Mono.framework/Versions/master/bin/mono".
Architecture set to: i486-apple-macosx.
(lldb)  script lldb.debugger.HandleCommand ("thread list")
(lldb)  script lldb.debugger.HandleCommand ("thread backtrace all")
(lldb)  detach
Detaching from process 30365
(lldb)  quit
error: Aborting reading of commands after command #4: 'quit' failed with <unknown error>.
Process 30365 detached
(lldb) 
=================================================================
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.
=================================================================

Abort trap: 6
Comment 1 Marek Safar 2014-01-11 07:13:44 UTC
Hover over `t' in System.Net.Http.Headers/AuthenticationHeaderValue.cs at line 112.

Code to trigger the call is var es = AuthenticationHeaderValue.Parse ("ss   p=3 , q = \"vvv\"");
Comment 2 Zoltan Varga 2014-01-11 09:58:58 UTC
AuthenticationHeaderValue.cs only has 111 lines in master. If I hover over the
var t =...
lines in TryParse (), it seems to work for me.
Comment 3 Marek Safar 2014-01-13 08:50:00 UTC
You need mono commit 2d0272d9c2e8a99741ea9520ab02d05d84bc4981
Comment 4 Zoltan Varga 2014-01-13 10:29:23 UTC
I can repro it now.
Comment 5 Zoltan Varga 2014-01-13 11:14:39 UTC
Fixed in master 74bc71da953d6f61177783066df543da4dbf5384.