Bug 25435 - Precise scanning causes SIGABRT after fresh Debian installation
Summary: Precise scanning causes SIGABRT after fresh Debian installation
Alias: None
Product: Runtime
Classification: Mono
Component: GC ()
Version: 2.10.x
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-12-16 12:10 UTC by Zoltán Tóth
Modified: 2014-12-18 18:11 UTC (History)
4 users (show)

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:

Description Zoltán Tóth 2014-12-16 12:10:23 UTC
On my Debian Wheezy AMD64 operating system I "aptitude purge"-ed everything mono-related. Then I put Xamarin Debian repo at the start of my apt sources list. I installed monodevelop [with all its dependencies: mono-runtime, ...].

Now this works fine:
$ MONO_GC_PARAMS=stack-mark=conservative
$ monodevelop 

But this causes a SIGABRT:
$ MONO_GC_PARAMS=stack-mark=precise
$ monodevelop 
* Assertion at mini-gc.c:2036, condition `cfg->frame_reg == cfg->cfa_reg' not met


Native stacktrace:

	monodevelop() [0x4b3f7c]
	/lib/x86_64-linux-gnu/libpthread.so.0(+0xf0a0) [0x7f23393850a0]
	/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f233901c165]
	/lib/x86_64-linux-gnu/libc.so.6(abort+0x180) [0x7f233901f3e0]
	monodevelop() [0x636e59]
	monodevelop() [0x637067]
	monodevelop() [0x6371b6]
	monodevelop() [0x4d07be]
	monodevelop() [0x4258ad]
	monodevelop() [0x42711f]
	monodevelop() [0x427aab]
	monodevelop() [0x4280dc]
	monodevelop(mono_runtime_invoke+0x4b) [0x5abd0b]
	monodevelop() [0x5305e8]
	monodevelop() [0x59bfc1]
	monodevelop(mono_runtime_init+0x183) [0x59d423]
	monodevelop() [0x424536]
	monodevelop(mono_main+0x35d) [0x48969d]
	/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f2339008ead]
	monodevelop() [0x41bb39]

Debug info from gdb:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f2339384c4e in waitpid () from /lib/x86_64-linux-gnu/libpthread.so.0
  Id   Target Id         Frame 
* 1    Thread 0x7f2339e23780 (LWP 16687) "mono-sgen" 0x00007f2339384c4e in waitpid () from /lib/x86_64-linux-gnu/libpthread.so.0

Thread 1 (Thread 0x7f2339e23780 (LWP 16687)):
#0  0x00007f2339384c4e in waitpid () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00000000004b4009 in mono_handle_native_sigsegv (signal=<optimized out>, ctx=<optimized out>) at mini-exceptions.c:2323
#2  <signal handler called>
#3  0x00007f233901c165 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00007f233901f3e0 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x0000000000636e59 in monoeg_log_default_handler (log_domain=<optimized out>, log_level=<optimized out>, message=<optimized out>, unused_data=<optimized out>) at goutput.c:232
#6  monoeg_log_default_handler (log_domain=<optimized out>, log_level=G_LOG_LEVEL_ERROR, message=<optimized out>, unused_data=<optimized out>) at goutput.c:220
#7  0x0000000000637067 in monoeg_g_logv (log_domain=log_domain@entry=0x0, log_level=log_level@entry=G_LOG_LEVEL_ERROR, format=format@entry=0x640f18 "* Assertion at %s:%d, condition `%s' not met\n", args=args@entry=0x7fff2af73db8) at goutput.c:113
#8  0x00000000006371b6 in monoeg_assertion_message (format=format@entry=0x640f18 "* Assertion at %s:%d, condition `%s' not met\n") at goutput.c:133
#9  0x00000000004d07be in compute_frame_size (cfg=0x1959b70) at mini-gc.c:2036
#10 mini_gc_create_gc_map (cfg=cfg@entry=0x1959b70) at mini-gc.c:2443
#11 0x00000000004258ad in mini_method_compile (method=0x1956b48, opts=opts@entry=370239999, domain=domain@entry=0x18ed470, flags=flags@entry=JIT_FLAG_RUN_CCTORS, parts=parts@entry=0) at mini.c:5733
#12 0x000000000042711f in mono_jit_compile_method_inner (jit_ex=0x7fff2af741e8, opt=370239999, target_domain=0x18ed470, method=0x1956b48) at mini.c:6027
#13 mono_jit_compile_method_with_opt (method=method@entry=0x1956b48, opt=370239999, ex=ex@entry=0x7fff2af741e8) at mini.c:6299
#14 0x0000000000427aab in mono_jit_compile_method (method=0x1956b48) at mini.c:6336
#15 0x00000000004280dc in mono_jit_runtime_invoke (method=0x1956920, obj=0x7f2338000818, params=0x7fff2af743f0, exc=0x0) at mini.c:6665
#16 0x00000000005abd0b in mono_runtime_invoke (method=0x1956920, obj=obj@entry=0x7f2338000818, params=params@entry=0x7fff2af743f0, exc=exc@entry=0x0) at object.c:2831
#17 0x00000000005305e8 in create_exception_two_strings (klass=0x1955d80, a1=0x7f23380007e0, a2=a2@entry=0x0) at exception.c:139
#18 0x0000000000530795 in mono_exception_from_name_two_strings (image=<optimized out>, name_space=name_space@entry=0x640274 "System", name=name@entry=0x65355b "OutOfMemoryException", a1=<optimized out>, a2=a2@entry=0x0) at exception.c:162
#19 0x000000000059bfc1 in create_domain_objects (domain=domain@entry=0x18ed470) at appdomain.c:180
#20 0x000000000059d423 in mono_runtime_init (domain=domain@entry=0x18ed470, start_cb=start_cb@entry=0x41cf40 <mono_thread_start_cb>, attach_cb=attach_cb@entry=0x41d180 <mono_thread_attach_cb>) at appdomain.c:264
#21 0x0000000000424536 in mini_init (filename=0x7fff2af7525d "/usr/lib/monodevelop/bin/MonoDevelop.exe", runtime_version=runtime_version@entry=0x0) at mini.c:7497
#22 0x000000000048969d in mono_main (argc=2, argv=<optimized out>) at driver.c:1912
#23 0x00007f2339008ead in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#24 0x000000000041bb39 in _start ()

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 1 Zoltán Tóth 2014-12-16 14:49:37 UTC
I just tried on Debian Jessie, and I get a similar SIGABRT message on it too.
Comment 2 Zoltan Varga 2014-12-16 17:10:05 UTC
That functionality is not ready for prime time.
Comment 3 Zoltan Varga 2014-12-18 18:11:11 UTC
This is fixed in master, we no longer assert, but print a warning and continue.