Skip to content

Instantly share code, notes, and snippets.

@chamons
Created November 17, 2016 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chamons/36ad7da86c393d940e62563071ca261d to your computer and use it in GitHub Desktop.
Save chamons/36ad7da86c393d940e62563071ca261d to your computer and use it in GitHub Desktop.
$ mono64 --aot=hybrid Xamarin.Mac.dll
Mono Ahead of Time compiler - compiling assembly /Users/donblas/Programming/mac-samples/NSOutlineViewAndTableView/NSOutlineViewAndTableViewExample/bin/Debug/NSOutlineViewAndTableViewExample.app/Contents/MonoBundle/Xamarin.Mac.dll
AOTID AF85212A-C867-D0ED-7EF2-D113D7F80DEC
Invalid type System.Collections.Generic.Queue`1<Foundation.NSData> for instance field System.Collections.Generic.Queue`1+Enumerator[Foundation.NSData]:_q
Invalid type System.Collections.Generic.Queue`1<Foundation.NSData> for instance field Foundation.NSUrlSessionHandler+NSUrlSessionDataTaskStream:data
Invalid type Foundation.NSUrlSessionHandler/NSUrlSessionDataTaskStream for instance field Foundation.NSUrlSessionHandler+NSUrlSessionDataTaskStream+<ReadAsync>c__async0:$this
Invalid type Foundation.NSDictionary for instance field Foundation.NSDictionary+<GetEnumerator>c__Iterator0:$this
Invalid type Foundation.NSMutableDictionary for instance field Security.SecRecord:_queryDict
Invalid type Foundation.NSMutableDictionary for instance field Foundation.NSMutableDictionary+<GetEnumerator>c__Iterator0:$this
Stacktrace:
Native stacktrace:
Debug info from gdb:
(lldb) command source -s 0 '/tmp/mono-gdb-commands.MzCAgx'
Executing commands in '/tmp/mono-gdb-commands.MzCAgx'.
(lldb) process attach --pid 79472
Process 79472 stopped
* thread #1: tid = 0x16fc563, 0x00007fff8e4c0582 libsystem_kernel.dylib`__wait4 + 10, name = 'tid_50f', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
frame #0: 0x00007fff8e4c0582 libsystem_kernel.dylib`__wait4 + 10
libsystem_kernel.dylib`__wait4:
-> 0x7fff8e4c0582 <+10>: jae 0x7fff8e4c058c ; <+20>
0x7fff8e4c0584 <+12>: movq %rax, %rdi
0x7fff8e4c0587 <+15>: jmp 0x7fff8e4ba7f2 ; cerror
0x7fff8e4c058c <+20>: retq
Executable module set to "/usr/local/bin/mono64".
Architecture set to: x86_64-apple-macosx.
(lldb) thread list
Process 79472 stopped
* thread #1: tid = 0x16fc563, 0x00007fff8e4c0582 libsystem_kernel.dylib`__wait4 + 10, name = 'tid_50f', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
thread #2: tid = 0x16fc564, 0x00007fff8e4bfdb6 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'SGen worker'
thread #3: tid = 0x16fc565, 0x00007fff8e4b9fae libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'Finalizer'
thread #4: tid = 0x16fc566, 0x00007fff8e4c05e2 libsystem_kernel.dylib`__workq_kernreturn + 10
thread #5: tid = 0x16fc567, 0x00007fff8e4c0efa libsystem_kernel.dylib`kevent_qos + 10, queue = 'com.apple.libdispatch-manager'
(lldb) thread backtrace all
* thread #1: tid = 0x16fc563, 0x00007fff8e4c0582 libsystem_kernel.dylib`__wait4 + 10, name = 'tid_50f', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x00007fff8e4c0582 libsystem_kernel.dylib`__wait4 + 10
frame #1: 0x000000010c83cb91 mono64`mono_handle_native_sigsegv(signal=<unavailable>, ctx=<unavailable>, info=<unavailable>) + 433 at mini-exceptions.c:2429 [opt]
frame #2: 0x000000010c89509a mono64`mono_arch_handle_altstack_exception(sigctx=0x000000010d190f48, siginfo=<unavailable>, fault_addr=<unavailable>, stack_ovf=0) + 90 at exceptions-amd64.c:795 [opt]
frame #3: 0x000000010c78b2b8 mono64`mono_sigsegv_signal_handler(_dummy=<unavailable>, _info=<unavailable>, context=<unavailable>) + 392 at mini-runtime.c:2884 [opt]
frame #4: 0x00007fff9130152a libsystem_platform.dylib`_sigtramp + 26
frame #5: 0x000000010c8b2eab mono64`mono_class_get_finalizer(klass=0x00007feb2c810428) + 187 at class.c:8637 [opt]
frame #6: 0x000000010c814cb8 mono64`mono_compile_assembly [inlined] emit_klass_info(token=<unavailable>) + 464 at aot-compiler.c:6267 [opt]
frame #7: 0x000000010c814ae8 mono64`mono_compile_assembly [inlined] emit_class_info + 72 at aot-compiler.c:9013 [opt]
frame #8: 0x000000010c814aa0 mono64`mono_compile_assembly(ass=<unavailable>, opts=<unavailable>, aot_options=<unavailable>) + 27888 at aot-compiler.c:10703 [opt]
frame #9: 0x000000010c807685 mono64`mono_main [inlined] main_thread_handler + 138 at driver.g.c:1098 [opt]
frame #10: 0x000000010c8075fb mono64`mono_main(argc=<unavailable>, argv=<unavailable>) + 7195 at driver.g.c:2171 [opt]
frame #11: 0x000000010c77f79a mono64`main [inlined] mono_main_with_options(argc=3, argc=3, argc=3, argv=0x00007fff53482a30, argv=0x00007fff53482a30, argv=0x00007fff53482a30) + 17 at main.c:45 [opt]
frame #12: 0x000000010c77f789 mono64`main(argc=3, argv=0x00007fff53482a30) + 1673 at main.c:338 [opt]
frame #13: 0x000000010c77f0f4 mono64`start + 52
thread #2: tid = 0x16fc564, 0x00007fff8e4bfdb6 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'SGen worker'
frame #0: 0x00007fff8e4bfdb6 libsystem_kernel.dylib`__psynch_cvwait + 10
frame #1: 0x00007fff84226728 libsystem_pthread.dylib`_pthread_cond_wait + 767
frame #2: 0x000000010caa21ce mono64`thread_func [inlined] mono_os_cond_wait(mutex=<unavailable>) + 5 at mono-os-mutex.h:150 [opt]
frame #3: 0x000000010caa21c9 mono64`thread_func(thread_data=0x0000000000000000) + 169 at sgen-thread-pool.c:110 [opt]
frame #4: 0x00007fff8422599d libsystem_pthread.dylib`_pthread_body + 131
frame #5: 0x00007fff8422591a libsystem_pthread.dylib`_pthread_start + 168
frame #6: 0x00007fff84223351 libsystem_pthread.dylib`thread_start + 13
thread #3: tid = 0x16fc565, 0x00007fff8e4b9fae libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'Finalizer'
frame #0: 0x00007fff8e4b9fae libsystem_kernel.dylib`semaphore_wait_trap + 10
frame #1: 0x000000010c960631 mono64`finalizer_thread [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_ALERTABLE) + 11 at mono-os-semaphore.h:90 [opt]
frame #2: 0x000000010c960626 mono64`finalizer_thread [inlined] mono_coop_sem_wait(flags=MONO_SEM_FLAGS_ALERTABLE) + 8 at mono-coop-semaphore.h:40 [opt]
frame #3: 0x000000010c96061e mono64`finalizer_thread(unused=<unavailable>) + 174 at gc.c:905 [opt]
frame #4: 0x000000010c9392d3 mono64`start_wrapper [inlined] start_wrapper_internal + 287 at threads.c:760 [opt]
frame #5: 0x000000010c9391b4 mono64`start_wrapper(data=<unavailable>) + 52 at threads.c:824 [opt]
frame #6: 0x000000010cac6f33 mono64`inner_start_thread(data=<unavailable>) + 355 at mono-threads.c:1181 [opt]
frame #7: 0x00007fff8422599d libsystem_pthread.dylib`_pthread_body + 131
frame #8: 0x00007fff8422591a libsystem_pthread.dylib`_pthread_start + 168
frame #9: 0x00007fff84223351 libsystem_pthread.dylib`thread_start + 13
thread #4: tid = 0x16fc566, 0x00007fff8e4c05e2 libsystem_kernel.dylib`__workq_kernreturn + 10
frame #0: 0x00007fff8e4c05e2 libsystem_kernel.dylib`__workq_kernreturn + 10
frame #1: 0x00007fff84225578 libsystem_pthread.dylib`_pthread_wqthread + 1283
frame #2: 0x00007fff84223341 libsystem_pthread.dylib`start_wqthread + 13
thread #5: tid = 0x16fc567, 0x00007fff8e4c0efa libsystem_kernel.dylib`kevent_qos + 10, queue = 'com.apple.libdispatch-manager'
frame #0: 0x00007fff8e4c0efa libsystem_kernel.dylib`kevent_qos + 10
frame #1: 0x00007fff962e8165 libdispatch.dylib`_dispatch_mgr_invoke + 216
frame #2: 0x00007fff962e7dcd libdispatch.dylib`_dispatch_mgr_thread + 52
(lldb) detach
=================================================================
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.
=================================================================
Process 79472 detached
(lldb) Abort trap: 6
donblas:~/Programming/mac-samples/NSOutlineViewAndTableView/NSOutlineViewAndTableViewExample/bin/Debug/NSOutlineViewAndTableViewExample.app/Contents/MonoBundle (xm_touchbar) $ mono64 --aot Xamarin.Mac.dll
Mono Ahead of Time compiler - compiling assembly /Users/donblas/Programming/mac-samples/NSOutlineViewAndTableView/NSOutlineViewAndTableViewExample/bin/Debug/NSOutlineViewAndTableViewExample.app/Contents/MonoBundle/Xamarin.Mac.dll
AOTID FF160911-2BE2-F061-5396-2A32A0790C96
Invalid type Foundation.NSDictionary for instance field Foundation.NSDictionary+<GetEnumerator>c__Iterator0:$this
Invalid type Foundation.NSMutableDictionary for instance field Security.SecRecord:_queryDict
Invalid type Foundation.NSMutableDictionary for instance field Foundation.NSMutableDictionary+<GetEnumerator>c__Iterator0:$this
(lldb) quit
Stacktrace:
Native stacktrace:
Debug info from gdb:
(lldb) command source -s 0 '/tmp/mono-gdb-commands.Xb5ajP'
Executing commands in '/tmp/mono-gdb-commands.Xb5ajP'.
(lldb) process attach --pid 79479
Process 79479 stopped
* thread #1: tid = 0x16fc64a, 0x00007fff8e4c0582 libsystem_kernel.dylib`__wait4 + 10, name = 'tid_50f', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
frame #0: 0x00007fff8e4c0582 libsystem_kernel.dylib`__wait4 + 10
libsystem_kernel.dylib`__wait4:
-> 0x7fff8e4c0582 <+10>: jae 0x7fff8e4c058c ; <+20>
0x7fff8e4c0584 <+12>: movq %rax, %rdi
0x7fff8e4c0587 <+15>: jmp 0x7fff8e4ba7f2 ; cerror
0x7fff8e4c058c <+20>: retq
Executable module set to "/usr/local/bin/mono64".
Architecture set to: x86_64-apple-macosx.
(lldb) thread list
Process 79479 stopped
* thread #1: tid = 0x16fc64a, 0x00007fff8e4c0582 libsystem_kernel.dylib`__wait4 + 10, name = 'tid_50f', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
thread #2: tid = 0x16fc64b, 0x00007fff8e4bfdb6 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'SGen worker'
thread #3: tid = 0x16fc64c, 0x00007fff8e4b9fae libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'Finalizer'
thread #4: tid = 0x16fc64d, 0x00007fff8e4c05e2 libsystem_kernel.dylib`__workq_kernreturn + 10
thread #5: tid = 0x16fc64e, 0x00007fff8e4c0efa libsystem_kernel.dylib`kevent_qos + 10, queue = 'com.apple.libdispatch-manager'
(lldb) thread backtrace all
* thread #1: tid = 0x16fc64a, 0x00007fff8e4c0582 libsystem_kernel.dylib`__wait4 + 10, name = 'tid_50f', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x00007fff8e4c0582 libsystem_kernel.dylib`__wait4 + 10
frame #1: 0x000000010ab39b91 mono64`mono_handle_native_sigsegv(signal=<unavailable>, ctx=<unavailable>, info=<unavailable>) + 433 at mini-exceptions.c:2429 [opt]
frame #2: 0x000000010ab9209a mono64`mono_arch_handle_altstack_exception(sigctx=0x000000010b3fdf48, siginfo=<unavailable>, fault_addr=<unavailable>, stack_ovf=0) + 90 at exceptions-amd64.c:795 [opt]
frame #3: 0x000000010aa882b8 mono64`mono_sigsegv_signal_handler(_dummy=<unavailable>, _info=<unavailable>, context=<unavailable>) + 392 at mini-runtime.c:2884 [opt]
frame #4: 0x00007fff9130152a libsystem_platform.dylib`_sigtramp + 26
frame #5: 0x000000010abafeab mono64`mono_class_get_finalizer(klass=0x00007fe6d5830828) + 187 at class.c:8637 [opt]
frame #6: 0x000000010ab11cb8 mono64`mono_compile_assembly [inlined] emit_klass_info(token=<unavailable>) + 464 at aot-compiler.c:6267 [opt]
frame #7: 0x000000010ab11ae8 mono64`mono_compile_assembly [inlined] emit_class_info + 72 at aot-compiler.c:9013 [opt]
frame #8: 0x000000010ab11aa0 mono64`mono_compile_assembly(ass=<unavailable>, opts=<unavailable>, aot_options=<unavailable>) + 27888 at aot-compiler.c:10703 [opt]
frame #9: 0x000000010ab04685 mono64`mono_main [inlined] main_thread_handler + 138 at driver.g.c:1098 [opt]
frame #10: 0x000000010ab045fb mono64`mono_main(argc=<unavailable>, argv=<unavailable>) + 7195 at driver.g.c:2171 [opt]
frame #11: 0x000000010aa7c79a mono64`main [inlined] mono_main_with_options(argc=3, argc=3, argc=3, argv=0x00007fff55185a38, argv=0x00007fff55185a38, argv=0x00007fff55185a38) + 17 at main.c:45 [opt]
frame #12: 0x000000010aa7c789 mono64`main(argc=3, argv=0x00007fff55185a38) + 1673 at main.c:338 [opt]
frame #13: 0x000000010aa7c0f4 mono64`start + 52
thread #2: tid = 0x16fc64b, 0x00007fff8e4bfdb6 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'SGen worker'
frame #0: 0x00007fff8e4bfdb6 libsystem_kernel.dylib`__psynch_cvwait + 10
frame #1: 0x00007fff84226728 libsystem_pthread.dylib`_pthread_cond_wait + 767
frame #2: 0x000000010ad9f1ce mono64`thread_func [inlined] mono_os_cond_wait(mutex=<unavailable>) + 5 at mono-os-mutex.h:150 [opt]
frame #3: 0x000000010ad9f1c9 mono64`thread_func(thread_data=0x0000000000000000) + 169 at sgen-thread-pool.c:110 [opt]
frame #4: 0x00007fff8422599d libsystem_pthread.dylib`_pthread_body + 131
frame #5: 0x00007fff8422591a libsystem_pthread.dylib`_pthread_start + 168
frame #6: 0x00007fff84223351 libsystem_pthread.dylib`thread_start + 13
thread #3: tid = 0x16fc64c, 0x00007fff8e4b9fae libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'Finalizer'
frame #0: 0x00007fff8e4b9fae libsystem_kernel.dylib`semaphore_wait_trap + 10
frame #1: 0x000000010ac5d631 mono64`finalizer_thread [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_ALERTABLE) + 11 at mono-os-semaphore.h:90 [opt]
frame #2: 0x000000010ac5d626 mono64`finalizer_thread [inlined] mono_coop_sem_wait(flags=MONO_SEM_FLAGS_ALERTABLE) + 8 at mono-coop-semaphore.h:40 [opt]
frame #3: 0x000000010ac5d61e mono64`finalizer_thread(unused=<unavailable>) + 174 at gc.c:905 [opt]
frame #4: 0x000000010ac362d3 mono64`start_wrapper [inlined] start_wrapper_internal + 287 at threads.c:760 [opt]
frame #5: 0x000000010ac361b4 mono64`start_wrapper(data=<unavailable>) + 52 at threads.c:824 [opt]
frame #6: 0x000000010adc3f33 mono64`inner_start_thread(data=<unavailable>) + 355 at mono-threads.c:1181 [opt]
frame #7: 0x00007fff8422599d libsystem_pthread.dylib`_pthread_body + 131
frame #8: 0x00007fff8422591a libsystem_pthread.dylib`_pthread_start + 168
frame #9: 0x00007fff84223351 libsystem_pthread.dylib`thread_start + 13
thread #4: tid = 0x16fc64d, 0x00007fff8e4c05e2 libsystem_kernel.dylib`__workq_kernreturn + 10
frame #0: 0x00007fff8e4c05e2 libsystem_kernel.dylib`__workq_kernreturn + 10
frame #1: 0x00007fff84225578 libsystem_pthread.dylib`_pthread_wqthread + 1283
frame #2: 0x00007fff84223341 libsystem_pthread.dylib`start_wqthread + 13
thread #5: tid = 0x16fc64e, 0x00007fff8e4c0efa libsystem_kernel.dylib`kevent_qos + 10, queue = 'com.apple.libdispatch-manager'
frame #0: 0x00007fff8e4c0efa libsystem_kernel.dylib`kevent_qos + 10
frame #1: 0x00007fff962e8165 libdispatch.dylib`_dispatch_mgr_invoke + 216
frame #2: 0x00007fff962e7dcd libdispatch.dylib`_dispatch_mgr_thread + 52
(lldb) detach
=================================================================
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.
=================================================================
Process 79479 detached
(lldb) Abort trap: 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment