[Mono-dev] Crash with sgen on x86_64-apple-darwin

David Mitchell dmitchell at logos.com
Tue Nov 1 18:13:04 EDT 2011


I've been experimenting with running Mono built for x86_64 on OS X. I've been largely successful using Boehm GC, but today I tried running an app with —gc=sgen, and I got an immediate crash (if there's output early in the program, I may get a line or two), even with the simplest programs.

My arguments to autogen.sh looked something like this:

./autogen.sh --with-xen_opt=no --prefix=$MONO_INSTALL_DIRECTORY --with-mcs-docs=no --disable-nls --build=x86_64-apple-darwin

And my super-simple C# program looks like this:

using System;

internal static class Program
{
private static void Main()
{
Console.WriteLine("hi");
}
}

Can anyone else replicate my result? Does anyone have an idea for a fix?

— Dave

P.S. - Here's the stacktrace I get:

Stacktrace:


Native stacktrace:

0   mono-sgen                           0x0000000100081994 mono_handle_native_sigsegv + 276
1   mono-sgen                           0x00000001000036ea mono_sigsegv_signal_handler + 202
2   libSystem.B.dylib                   0x00007fff826641ba _sigtramp + 26
3   ???                                 0x000000000000006b 0x0 + 107
4   mono-sgen                           0x00000001001bc5dd mono_sgen_suspend_thread + 173
5   mono-sgen                           0x00000001001bc74d mono_sgen_thread_handshake + 157
6   mono-sgen                           0x0000000100198f41 stop_world + 273
7   mono-sgen                           0x00000001001a2e84 mono_gc_collect + 52
8   mono-sgen                           0x000000010010d14d mono_domain_finalize + 77
9   mono-sgen                           0x0000000100001a6a mini_cleanup + 42
10  mono-sgen                           0x000000010005d04d mono_main + 8189
11  mono-sgen                           0x0000000100000e04 start + 52
12  ???                                 0x0000000000000003 0x0 + 3

Debug info from gdb:

Cannot access memory at address 0x0
Attaching to process 43936.
Reading symbols for shared libraries . done
Reading symbols for shared libraries .......... done
0x00007fff8260e464 in read ()
  2                         0x00007fff82603db6 in semaphore_wait_trap ()
* 1 "com.apple.main-thread" 0x00007fff8260e464 in read ()

Thread 2 (process 43936):
#0  0x00007fff82603db6 in semaphore_wait_trap ()
#1  0x0000000100203818 in mono_sem_wait (sem=) at mono-semaphore.c:115
#2  0x000000010010c362 in finalizer_thread (unused=0x1d03) at gc.c:1073
#3  0x00000001001c91fe in start_wrapper_internal [inlined] () at /Users/dmitchell/External/mono/mono/metadata/threads.c:571
#4  0x00000001001c91fe in start_wrapper (data=0x100532830) at threads.c:619
#5  0x00000001001f8cc3 in thread_start_routine (args=0x10087abf8) at wthreads.c:290
#6  0x0000000100205216 in inner_start_thread (arg=0x1005322d0) at mono-threads-posix.c:49
#7  0x00007fff8263cfd6 in _pthread_start ()
#8  0x00007fff8263ce89 in thread_start ()

Thread 1 (process 43936):
#0  0x00007fff8260e464 in read ()
#1  0x0000000100081af2 in mono_handle_native_sigsegv (signal=43936, ctx=0x7fff5fbfe3f0) at mini-exceptions.c:2256
#2  0x00000001000036ea in mono_sigsegv_signal_handler (_dummy=11, info=0x7fff5fbfec90, context=0x7fff5fbfecf8) at mini.c:5904
#3  <signal handler called>
#4  0x00000001001fd7f6 in mono_mach_arch_get_tls_value_from_thread (thread=0x102a01000, key=4294967295) at mach-support-amd64.c:94
#5  0x00000001001bc5dd in mono_sgen_suspend_thread (info=0x102b00000) at sgen-os-mach.c:77
#6  0x00000001001bc74d in mono_sgen_thread_handshake (suspend=1606414816) at sgen-os-mach.c:127
#7  0x0000000100198f41 in stop_world () at sgen-gc.c:6133
#8  0x00000001001a2e84 in mono_gc_collect (generation=1) at sgen-gc.c:6369
#9  0x000000010010d14d in mono_domain_finalize (domain=0x10050a820, timeout=2000) at gc.c:366
#10 0x0000000100001a6a in print_jit_stats [inlined] () at /Users/dmitchell/External/mono/mono/mini/mini.c:6702
#11 0x0000000100001a6a in mini_cleanup (domain=0x10050a820) at mini.c:6706
#12 0x000000010005d04d in mono_main (argc=1606415312, argv=0x7fff5fbff3d0) at driver.c:1905
#13 0x0000000100000e04 in start ()

=================================================================
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.
=================================================================

Abort trap

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20111101/acbac239/attachment.html 


More information about the Mono-devel-list mailing list