Bug 54227 - * Assertion: should not be reached at class-accessors.c:73
Summary: * Assertion: should not be reached at class-accessors.c:73
Status: CONFIRMED
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: master
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2017-03-29 15:21 UTC by Jonathan Pryor
Modified: 2017-07-13 21:09 UTC (History)
4 users (show)

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


Attachments

Description Jonathan Pryor 2017-03-29 15:21:21 UTC
I created a PR against Java.Interop which simply bumped the cecil ref:

https://github.com/xamarin/java.interop/pull/138

When the PR builders built this PR, all the tests passed, but I also saw this message in the output:

* Assertion: should not be reached at class-accessors.c:73

https://jenkins.mono-project.com/job/Java.Interop-pr-builder/119/consoleText

> * Assertion: should not be reached at class-accessors.c:73
> 
> Stacktrace:
> 
>   at <unknown> <0xffffffff>
>   at System.Threading.ExecutionContextSwitcher.Undo () [0x0002e] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:380
>   at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x0007a] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:961
>   at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:904
>   at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) [0x0002b] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:893
>   at System.Threading.ThreadHelper.ThreadStart () [0x00008] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/threading/thread.cs:105
>   at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004f] in <cdb49daae5d54303830ed0b62146c323>:0
> 
> Native stacktrace:
> 
> 	0   mono64                              0x000000010aae44d6 mono_handle_native_crash + 278
> 	1   libsystem_platform.dylib            0x00007fff95d8a52a _sigtramp + 26
> 	2   mono64                              0x000000010ae0566d my_charset + 3085
> 	3   libsystem_c.dylib                   0x00007fff961176df abort + 129
> 	4   mono64                              0x000000010acb92eb mono_log_write_logfile + 363
> 	5   mono64                              0x000000010acd0b10 monoeg_assertion_message + 192
> 	6   mono64                              0x000000010ab7f882 mono_class_get_flags + 114
> 	7   mono64                              0x000000010ab6f320 mono_class_setup_fields + 32
> 	8   mono64                              0x000000010ab6fdb5 mono_class_init + 629
> 	9   mono64                              0x000000010ab7b3df mono_class_is_subclass_of + 31
> 	10  libjava-interop.dylib               0x000000012b04f968 get_gc_bridge_index + 120
> 	11  libjava-interop.dylib               0x000000012b04f2ac gc_bridge_class_kind + 60
> 	12  mono64                              0x000000010ac6a5c8 class_kind + 24
> 	13  mono64                              0x000000010ac6c59d mono_gc_get_vtable_bits + 29
> 	14  mono64                              0x000000010ac36507 mono_class_vtable_full + 695
> 	15  mono64                              0x000000010ac387d7 mono_class_vtable + 23
> 	16  mono64                              0x000000010aa5cd58 mono_method_to_ir + 91144
> 	17  mono64                              0x000000010aa42855 inline_method + 1093
> 	18  mono64                              0x000000010aa706f1 mono_method_to_ir + 171425
> 	19  mono64                              0x000000010aa32bc4 mini_method_compile + 3508
> 	20  mono64                              0x000000010aa3618c mono_jit_compile_method_inner + 652
> 	21  mono64                              0x000000010aa391e6 mono_jit_compile_method_with_opt + 710
> 	22  mono64                              0x000000010aae6ab1 common_call_trampoline + 1137
> 	23  mono64                              0x000000010aae6609 mono_magic_trampoline + 73
> 	24  ???                                 0x000000010b0c539e 0x0 + 4480324510
> 	25  ???                                 0x000000012b6cd3a0 0x0 + 5023519648
> 	26  ???                                 0x000000010de99d79 0x0 + 4528381305
> 	27  mono64                              0x000000010aa3ceb5 mono_jit_runtime_invoke + 2261
> 	28  mono64                              0x000000010ac39d38 do_runtime_invoke + 88
> 	29  mono64                              0x000000010ac05ad6 start_wrapper + 566
> 	30  mono64                              0x000000010acc6221 inner_start_thread + 193
> 	31  libsystem_pthread.dylib             0x00007fff9824299d _pthread_body + 131
> 	32  libsystem_pthread.dylib             0x00007fff9824291a _pthread_body + 0
> 	33  libsystem_pthread.dylib             0x00007fff98240351 thread_start + 13

https://jenkins.mono-project.com/job/Java.Interop-pr-builder/120/consoleText

> * Assertion: should not be reached at class-accessors.c:73
> 
> Stacktrace:
> 
>   at <unknown> <0xffffffff>
>   at System.Array.IndexOf<T_REF> (T_REF[],T_REF,int,int) [0x00030] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System/Array.cs:3048
>   at System.Collections.Generic.List`1<T_REF>.IndexOf (T_REF) [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/collections/generic/list.cs:622
>   at System.Collections.Generic.List`1<T_REF>.Remove (T_REF) [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/collections/generic/list.cs:831
>   at System.Net.Sockets.SafeSocketHandle.UnRegisterForBlockingSyscall () [0x00017] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/System.Net.Sockets/SafeSocketHandle.cs:131
>   at System.Net.Sockets.Socket.Accept_internal (System.Net.Sockets.SafeSocketHandle,int&,bool) [0x0001c] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/System.Net.Sockets/Socket.cs:743
>   at System.Net.Sockets.Socket.Accept () [0x00008] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/System.Net.Sockets/Socket.cs:523
>   at System.Net.Sockets.TcpListener.AcceptSocket () [0x0001e] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/System/net/System/Net/Sockets/TCPListener.cs:244
>   at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.WaitForConnections () [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs:214
>   at System.Threading.ThreadHelper.ThreadStart_Context (object) [0x00014] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/threading/thread.cs:68
>   at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00071] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:957
>   at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:904
>   at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) [0x0002b] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:893
>   at System.Threading.ThreadHelper.ThreadStart () [0x00008] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/threading/thread.cs:105
>   at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004f] in <cdb49daae5d54303830ed0b62146c323>:0
> 
> Native stacktrace:
> 
> 	0   mono64                              0x00000001015324d6 mono_handle_native_crash + 278
> 	1   libsystem_platform.dylib            0x00007fff95d8a52a _sigtramp + 26
> 	2   ???                                 0x0000000000000004 0x0 + 4
> 	3   libsystem_c.dylib                   0x00007fff961176df abort + 129
> 	4   mono64                              0x00000001017072eb mono_log_write_logfile + 363
> 	5   mono64                              0x000000010171eb10 monoeg_assertion_message + 192
> 	6   mono64                              0x00000001015cd882 mono_class_get_flags + 114
> 	7   mono64                              0x00000001015bd320 mono_class_setup_fields + 32
> 	8   mono64                              0x00000001015bddb5 mono_class_init + 629
> 	9   mono64                              0x00000001015c93df mono_class_is_subclass_of + 31
> 	10  libjava-interop.dylib               0x0000000121a99968 get_gc_bridge_index + 120
> 	11  libjava-interop.dylib               0x0000000121a992ac gc_bridge_class_kind + 60
> 	12  mono64                              0x00000001016b85c8 class_kind + 24
> 	13  mono64                              0x00000001016ba59d mono_gc_get_vtable_bits + 29
> 	14  mono64                              0x0000000101684507 mono_class_vtable_full + 695
> 	15  mono64                              0x00000001016867d7 mono_class_vtable + 23
> 	16  mono64                              0x000000010153f441 instantiate_info + 1905
> 	17  mono64                              0x000000010153c3a0 fill_runtime_generic_context + 560
> 	18  mono64                              0x0000000101535ae6 mono_rgctx_lazy_fetch_trampoline + 102
> 	19  ???                                 0x0000000101b1389e 0x0 + 4323358878
> 	20  ???                                 0x00000001048e6957 0x0 + 4371409239

The "normal" (non-PR-builder) build for that commit has no assertion failures:

https://jenkins.mono-project.com/view/Xamarin.Android/job/Java.Interop/121/
Comment 1 Jonathan Pryor 2017-03-29 15:33:00 UTC
The one constant in those two native traces is:

> 	10  libjava-interop.dylib               0x000000012b04f968 get_gc_bridge_index + 120

Which is presumably:

https://github.com/xamarin/java.interop/blob/9fbade1/src/java-interop/java-interop-gc-bridge-mono.c#L679-L697

Line 691 calls mono_class_is_subclass_of().

Presumably, *somehow*, we're calling this code before the class has been initialized? That really doesn't make sense to me, though; see:

https://github.com/xamarin/java.interop/blob/fcfa22b/src/Java.Runtime.Environment/Java.Interop/MonoRuntimeValueManager.cs#L39
https://github.com/xamarin/java.interop/blob/9fbade1/src/java-interop/java-interop-gc-bridge-mono.c#L311-L313

We call `java_interop_gc_bridge_register_bridgeable_type()`, providing e.g. typeof(JavaObject).TypeHandle, and MonoJavaGCBridgeInfo::klass is set to mono_class_from_mono_type() on the provided TypeHandle value. I would assume that when this happens, typeof(JavaObject) will have been initialized, so I don't understand why we'd hit `mono_class_init()` at all...

Additionally, these asserts are happening *after* NUnit writes out the `S U C C E S S` message, so I suspect that this is happening during process shutdown...which again makes no sense to me; why/how would we be hitting `get_gc_bridge_index()` during process *shutdown*?

Could this be a libjava-interop.dylib bug?
Comment 2 Jonathan Pryor 2017-03-29 16:23:13 UTC
I was able to see this during a local run:

> make V=1 run-all-tests > b.txt 2>&1

It produced a similar-yet-different stack trace:

> * Assertion: should not be reached at class-accessors.c:73
> 
> Stacktrace:
> 
>   at <unknown> <0xffffffff>
>   at System.Runtime.InteropServices.SafeHandle.DangerousReleaseInternal (bool) [0x000a3] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Runtime.InteropServices/SafeHandle.cs:227
>   at System.Runtime.InteropServices.SafeHandle.InternalDispose () [0x0000e] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Runtime.InteropServices/SafeHandle.cs:156
>   at System.Runtime.InteropServices.SafeHandle.Dispose (bool) [0x00003] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/interopservices/safehandle.cs:260
>   at System.Runtime.InteropServices.SafeHandle.Dispose () [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/interopservices/safehandle.cs:252
>   at System.Net.Sockets.Socket.Dispose (bool) [0x0003e] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/System.Net.Sockets/Socket.cs:2596
>   at System.Net.Sockets.Socket.Finalize () [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/System/net/System/Net/Sockets/Socket.cs:6401
>   at (wrapper runtime-invoke) object.runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr) [0x0001f] in <cdb49daae5d54303830ed0b62146c323>:0
> 
> Native stacktrace:
> 
> 	0   mono64                              0x000000010d34a4d6 mono_handle_native_crash + 278
> 	1   libsystem_platform.dylib            0x00007fffb6d4eb3a _sigtramp + 26
> 	2   ???                                 0x0000700002b784e0 0x0 + 123145347892448
> 	3   libsystem_c.dylib                   0x00007fffb6bd3420 abort + 129
> 	4   mono64                              0x000000010d51f2eb mono_log_write_logfile + 363
> 	5   mono64                              0x000000010d536b10 monoeg_assertion_message + 192
> 	6   mono64                              0x000000010d3e5882 mono_class_get_flags + 114
> 	7   mono64                              0x000000010d3d5320 mono_class_setup_fields + 32
> 	8   mono64                              0x000000010d3d5db5 mono_class_init + 629
> 	9   mono64                              0x000000010d3e13df mono_class_is_subclass_of + 31
> 	10  libjava-interop.dylib               0x000000014bb64968 get_gc_bridge_index + 120
> 	11  libjava-interop.dylib               0x000000014bb642ac gc_bridge_class_kind + 60
> 	12  mono64                              0x000000010d4d05c8 class_kind + 24
> 	13  mono64                              0x000000010d4d259d mono_gc_get_vtable_bits + 29
> 	14  mono64                              0x000000010d49c507 mono_class_vtable_full + 695
> 	15  mono64                              0x000000010d49e7d7 mono_class_vtable + 23
> 	16  mono64                              0x000000010d2cdb60 mono_method_to_ir + 135696
> 	17  mono64                              0x000000010d2a8855 inline_method + 1093
> 	18  mono64                              0x000000010d2d66f1 mono_method_to_ir + 171425
> 	19  mono64                              0x000000010d298bc4 mini_method_compile + 3508
> 	20  mono64                              0x000000010d29c18c mono_jit_compile_method_inner + 652
> 	21  mono64                              0x000000010d29f1e6 mono_jit_compile_method_with_opt + 710
> 	22  mono64                              0x000000010d34cab1 common_call_trampoline + 1137
> 	23  mono64                              0x000000010d34dbc8 mono_vcall_trampoline + 184
> 	24  ???                                 0x000000010d6fd79e 0x0 + 4520400798
> 	25  ???                                 0x0000000110aef472 0x0 + 4574868594
> 	26  ???                                 0x000000014c20bc0d 0x0 + 5572181005
> 	27  ???                                 0x00000001118a97c5 0x0 + 4589262789
> 	28  mono64                              0x000000010d496c18 mono_gc_run_finalize + 1000
> 	29  mono64                              0x000000010d4e28b1 sgen_gc_invoke_finalizers + 225
> 	30  mono64                              0x000000010d498894 finalizer_thread + 356
> 	31  mono64                              0x000000010d46b9f3 start_wrapper + 339
> 	32  mono64                              0x000000010d52c221 inner_start_thread + 193
> 	33  libsystem_pthread.dylib             0x00007fffb6d589af _pthread_body + 180
> 	34  libsystem_pthread.dylib             0x00007fffb6d588fb _pthread_body + 0
> 	35  libsystem_pthread.dylib             0x00007fffb6d58101 thread_start + 13

I also have lldb!

> (lldb) thread list
> Process 11716 stopped
> * thread #1: tid = 0x19d068, 0x00007fffb6c6639e libsystem_kernel.dylib`semaphore_timedwait_trap + 10, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
>   thread #2: tid = 0x19d069, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'SGen worker'
>   thread #3: tid = 0x19d06a, 0x00007fffb6c6e3ee libsystem_kernel.dylib`__wait4 + 10, name = 'Finalizer'
>   thread #4: tid = 0x19d06c, 0x00007fffb6c6e44e libsystem_kernel.dylib`__workq_kernreturn + 10
>   thread #5: tid = 0x19d079, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>   thread #6: tid = 0x19d07a, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>   thread #7: tid = 0x19d07b, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>   thread #8: tid = 0x19d07c, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>   thread #9: tid = 0x19d07d, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>   thread #10: tid = 0x19d07e, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>   thread #11: tid = 0x19d07f, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>   thread #12: tid = 0x19d080, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>   thread #13: tid = 0x19d081, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>   thread #14: tid = 0x19d082, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>   thread #15: tid = 0x19d083, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>   thread #16: tid = 0x19d084, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Java: Reference Handler'
>   thread #17: tid = 0x19d085, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Java: Finalizer'
>   thread #18: tid = 0x19d086, 0x00007fffb6c66386 libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'Java: Signal Dispatcher'
>   thread #19: tid = 0x19d087, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Java: C2 CompilerThread0'
>   thread #20: tid = 0x19d088, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Java: C2 CompilerThread1'
>   thread #21: tid = 0x19d089, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Java: C2 CompilerThread2'
>   thread #22: tid = 0x19d08a, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Java: C1 CompilerThread3'
>   thread #23: tid = 0x19d08b, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Java: Service Thread'
>   thread #24: tid = 0x19d08c, 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
> (lldb) thread backtrace all
> * thread #1, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
>   * frame #0: 0x00007fffb6c6639e libsystem_kernel.dylib`semaphore_timedwait_trap + 10
>     frame #1: 0x000000010d4974c0 mono64`mono_coop_sem_timedwait [inlined] mono_os_sem_timedwait(timeout_ms=<unavailable>) at mono-os-semaphore.h:124 [opt]
>     frame #2: 0x000000010d497421 mono64`mono_coop_sem_timedwait(sem=0x00007fa5af447890, timeout_ms=<unavailable>, flags=<unavailable>) at mono-coop-semaphore.h:54 [opt]
>     frame #3: 0x000000010d497025 mono64`mono_domain_finalize(domain=0x00007fa5af504dd0, timeout=4294967295) at gc.c:513 [opt]
>     frame #4: 0x000000010d2a388e mono64`mini_cleanup(domain=0x00007fa5af504dd0) at mini-runtime.c:4099 [opt]
>     frame #5: 0x000000010d313c36 mono64`mono_main(argc=<unavailable>, argv=<unavailable>) at driver.g.c:2219 [opt]
>     frame #6: 0x000000010d293f0a mono64`main [inlined] mono_main_with_options(argc=8, argc=8, argc=8, argv=0x00007fff5296e6c0, argv=0x00007fff5296e6c0, argv=0x00007fff5296e6c0) at main.c:45 [opt]
>     frame #7: 0x000000010d293ef9 mono64`main(argc=8, argv=0x00007fff5296e6c0) at main.c:338 [opt]
>     frame #8: 0x000000010d293864 mono64`start + 52
> 
>   thread #2, name = 'SGen worker'
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x000000010d516af5 mono64`thread_func [inlined] mono_os_cond_wait(mutex=0x000000010d669488) at mono-os-mutex.h:146 [opt]
>     frame #3: 0x000000010d516ae6 mono64`thread_func(thread_data=0x000000010d7c5108) at sgen-thread-pool.c:129 [opt]
>     frame #4: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #5: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #6: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #3, name = 'Finalizer'
>     frame #0: 0x00007fffb6c6e3ee libsystem_kernel.dylib`__wait4 + 10
>     frame #1: 0x000000010d34a56d mono64`mono_handle_native_crash(signal="SIGABRT", ctx=<unavailable>, info=<unavailable>) at mini-exceptions.c:2567 [opt]
>     frame #2: 0x00007fffb6d4eb3a libsystem_platform.dylib`_sigtramp + 26
>     frame #3: 0x00007fffb6c6dd43 libsystem_kernel.dylib`__pthread_kill + 11
>     frame #4: 0x00007fffb6d5b5bf libsystem_pthread.dylib`pthread_kill + 90
>     frame #5: 0x00007fffb6bd3420 libsystem_c.dylib`abort + 129
>     frame #6: 0x000000010d51f2eb mono64`mono_log_write_logfile(log_domain=<unavailable>, level=<unavailable>, hdr=<unavailable>, message=<unavailable>) at mono-log-common.c:137 [opt]
>     frame #7: 0x000000010d536b10 mono64`monoeg_assertion_message [inlined] monoeg_g_logv(log_domain=<unavailable>, log_level=G_LOG_LEVEL_ERROR) at goutput.c:115 [opt]
>     frame #8: 0x000000010d536acc mono64`monoeg_assertion_message(format=<unavailable>) at goutput.c:135 [opt]
>     frame #9: 0x000000010d3e5882 mono64`mono_class_get_flags(klass=<unavailable>) at class-accessors.c:73 [opt]
>     frame #10: 0x000000010d3d5320 mono64`mono_class_setup_fields(klass=0x00007fa5b1947c60) at class.c:1528 [opt]
>     frame #11: 0x000000010d3d5db5 mono64`mono_class_init(klass=0x00007fa5b1947c60) at class.c:4861 [opt]
>     frame #12: 0x000000010d3e13df mono64`mono_class_is_subclass_of(klass=0x00007fa5b2a71660, klassc=0x00007fa5b1947c60, check_interfaces=0) at class.c:7868 [opt]
>     frame #13: 0x000000014bb64968 libjava-interop.dylib`get_gc_bridge_index(bridge=0x00007fa5af78c2e0, klass=0x00007fa5b2a71660) at java-interop-gc-bridge-mono.c:691
>     frame #14: 0x000000014bb642ac libjava-interop.dylib`gc_bridge_class_kind(klass=0x00007fa5b2a71660) at java-interop-gc-bridge-mono.c:1123
>     frame #15: 0x000000010d4d05c8 mono64`class_kind(klass=0x00007fa5b2a71660) at sgen-tarjan-bridge.c:47 [opt]
>     frame #16: 0x000000010d4d259d mono64`mono_gc_get_vtable_bits(klass=0x00007fa5b2a71660) at sgen-mono.c:464 [opt]
>     frame #17: 0x000000010d49c507 mono64`mono_class_vtable_full [inlined] mono_class_create_runtime_vtable(domain=0x00007fa5af504dd0, klass=0x00007fa5b2a71660, error=0x0000700002b78ee8) at object.c:1976 [opt]
>     frame #18: 0x000000010d49c448 mono64`mono_class_vtable_full(domain=0x00007fa5af504dd0, klass=0x00007fa5b2a71660, error=0x0000700002b78ee8) at object.c:1804 [opt]
>     frame #19: 0x000000010d49e7d7 mono64`mono_class_vtable(domain=<unavailable>, klass=<unavailable>) at object.c:1770 [opt]
>     frame #20: 0x000000010d2cdb60 mono64`mono_method_to_ir [inlined] handle_ctor_call(cfg=<unavailable>, fsig=<unavailable>, ip=<unavailable>, inline_costs=<unavailable>) at method-to-ir.c:7337 [opt]
>     frame #21: 0x000000010d2cdae1 mono64`mono_method_to_ir(cfg=0x00007fa5b1936000, method=0x00007fa5b10c18b0, start_bblock=<unavailable>, end_bblock=<unavailable>, return_var=0x00007fa5b188ef28, inline_args=<unavailable>, inline_offset=<unavailable>, is_virtual_call=<unavailable>) at method-to-ir.c:10300 [opt]
>     frame #22: 0x000000010d2a8855 mono64`inline_method(cfg=0x00007fa5b1936000, cmethod=0x00007fa5b10c18b0, fsig=<unavailable>, sp=0x00007fa5b19ea7c8, ip=<unavailable>, real_offset=<unavailable>, inline_always=<unavailable>) at method-to-ir.c:6471 [opt]
>     frame #23: 0x000000010d2d66f1 mono64`mono_method_to_ir(cfg=0x00007fa5b1936000, method=0x00007fa5b283a900, start_bblock=<unavailable>, end_bblock=<unavailable>, return_var=0x0000000000000000, inline_args=<unavailable>, inline_offset=<unavailable>, is_virtual_call=<unavailable>) at method-to-ir.c:9042 [opt]
>     frame #24: 0x000000010d298bc4 mono64`mini_method_compile(method=0x00007fa5b283a900, opts=370239999, domain=0x00007fa5af504dd0, flags=JIT_FLAG_RUN_CCTORS, parts=0, aot_method_index=-1) at mini.c:3469 [opt]
>     frame #25: 0x000000010d29c18c mono64`mono_jit_compile_method_inner(method=0x00007fa5b283a900, target_domain=0x00007fa5af504dd0, opt=370239999, error=0x0000700002b7a820) at mini.c:4194 [opt]
>     frame #26: 0x000000010d29f1e6 mono64`mono_jit_compile_method_with_opt(method=<unavailable>, opt=<unavailable>, error=0x0000700002b7a820) at mini-runtime.c:1885 [opt]
>     frame #27: 0x000000010d34cab1 mono64`common_call_trampoline(regs=0x0000700002b7a8f8, code="H\x8be¯√…√æU", m=<unavailable>, vt=0x00007fa5b2832878, vtable_slot=0x00007fa5b28328e0, error=0x0000700002b7a820) at mini-trampolines.c:699 [opt]
>     frame #28: 0x000000010d34dbc8 mono64`mono_vcall_trampoline(regs=0x0000700002b7a8f8, code="H\x8be¯√…√æU", slot=<unavailable>, tramp=<unavailable>) at mini-trampolines.c:910 [opt]
>     frame #29: 0x000000010d6fd79e
>     frame #30: 0x0000000110aef472
>     frame #31: 0x000000014c20bc0d
>     frame #32: 0x00000001118a97c5
>     frame #33: 0x000000010d496c18 mono64`mono_gc_run_finalize(obj=<unavailable>, data=<unavailable>) at gc.c:331 [opt]
>     frame #34: 0x000000010d4e28b1 mono64`sgen_gc_invoke_finalizers at sgen-gc.c:2523 [opt]
>     frame #35: 0x000000010d498894 mono64`finalizer_thread [inlined] finalize_domain_objects at gc.c:868 [opt]
>     frame #36: 0x000000010d498822 mono64`finalizer_thread(unused=<unavailable>) at gc.c:919 [opt]
>     frame #37: 0x000000010d46b9f3 mono64`start_wrapper [inlined] start_wrapper_internal at threads.c:836 [opt]
>     frame #38: 0x000000010d46b8c5 mono64`start_wrapper(data=<unavailable>) at threads.c:888 [opt]
>     frame #39: 0x000000010d52c221 mono64`inner_start_thread(data=<unavailable>) at mono-threads.c:1165 [opt]
>     frame #40: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #41: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #42: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #4
>     frame #0: 0x00007fffb6c6e44e libsystem_kernel.dylib`__workq_kernreturn + 10
>     frame #1: 0x00007fffb6d58502 libsystem_pthread.dylib`_pthread_wqthread + 1023
>     frame #2: 0x00007fffb6d580f1 libsystem_pthread.dylib`start_wqthread + 13
> 
>   thread #5
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x0000000111dfac76 libjvm.dylib`os::PlatformEvent::park() + 192
>     frame #3: 0x0000000111dd7e32 libjvm.dylib`ParkCommon(ParkEvent*, long) + 42
>     frame #4: 0x0000000111dd8708 libjvm.dylib`Monitor::IWait(Thread*, long) + 168
>     frame #5: 0x0000000111dd8971 libjvm.dylib`Monitor::wait(bool, long, bool) + 375
>     frame #6: 0x0000000111beeb5a libjvm.dylib`GCTaskManager::get_task(unsigned int) + 56
>     frame #7: 0x0000000111befc27 libjvm.dylib`GCTaskThread::run() + 349
>     frame #8: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #9: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #10: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #11: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #6
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x0000000111dfac76 libjvm.dylib`os::PlatformEvent::park() + 192
>     frame #3: 0x0000000111dd7e32 libjvm.dylib`ParkCommon(ParkEvent*, long) + 42
>     frame #4: 0x0000000111dd8708 libjvm.dylib`Monitor::IWait(Thread*, long) + 168
>     frame #5: 0x0000000111dd8971 libjvm.dylib`Monitor::wait(bool, long, bool) + 375
>     frame #6: 0x0000000111beeb5a libjvm.dylib`GCTaskManager::get_task(unsigned int) + 56
>     frame #7: 0x0000000111befc27 libjvm.dylib`GCTaskThread::run() + 349
>     frame #8: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #9: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #10: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #11: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #7
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x0000000111dfac76 libjvm.dylib`os::PlatformEvent::park() + 192
>     frame #3: 0x0000000111dd7e32 libjvm.dylib`ParkCommon(ParkEvent*, long) + 42
>     frame #4: 0x0000000111dd8708 libjvm.dylib`Monitor::IWait(Thread*, long) + 168
>     frame #5: 0x0000000111dd8971 libjvm.dylib`Monitor::wait(bool, long, bool) + 375
>     frame #6: 0x0000000111beeb5a libjvm.dylib`GCTaskManager::get_task(unsigned int) + 56
>     frame #7: 0x0000000111befc27 libjvm.dylib`GCTaskThread::run() + 349
>     frame #8: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #9: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #10: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #11: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #8
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x0000000111dfac76 libjvm.dylib`os::PlatformEvent::park() + 192
>     frame #3: 0x0000000111dd7e32 libjvm.dylib`ParkCommon(ParkEvent*, long) + 42
>     frame #4: 0x0000000111dd8708 libjvm.dylib`Monitor::IWait(Thread*, long) + 168
>     frame #5: 0x0000000111dd8971 libjvm.dylib`Monitor::wait(bool, long, bool) + 375
>     frame #6: 0x0000000111beeb5a libjvm.dylib`GCTaskManager::get_task(unsigned int) + 56
>     frame #7: 0x0000000111befc27 libjvm.dylib`GCTaskThread::run() + 349
>     frame #8: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #9: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #10: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #11: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #9
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x0000000111dfac76 libjvm.dylib`os::PlatformEvent::park() + 192
>     frame #3: 0x0000000111dd7e32 libjvm.dylib`ParkCommon(ParkEvent*, long) + 42
>     frame #4: 0x0000000111dd8708 libjvm.dylib`Monitor::IWait(Thread*, long) + 168
>     frame #5: 0x0000000111dd8971 libjvm.dylib`Monitor::wait(bool, long, bool) + 375
>     frame #6: 0x0000000111beeb5a libjvm.dylib`GCTaskManager::get_task(unsigned int) + 56
>     frame #7: 0x0000000111befc27 libjvm.dylib`GCTaskThread::run() + 349
>     frame #8: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #9: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #10: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #11: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #10
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x0000000111dfac76 libjvm.dylib`os::PlatformEvent::park() + 192
>     frame #3: 0x0000000111dd7e32 libjvm.dylib`ParkCommon(ParkEvent*, long) + 42
>     frame #4: 0x0000000111dd8708 libjvm.dylib`Monitor::IWait(Thread*, long) + 168
>     frame #5: 0x0000000111dd8971 libjvm.dylib`Monitor::wait(bool, long, bool) + 375
>     frame #6: 0x0000000111beeb5a libjvm.dylib`GCTaskManager::get_task(unsigned int) + 56
>     frame #7: 0x0000000111befc27 libjvm.dylib`GCTaskThread::run() + 349
>     frame #8: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #9: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #10: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #11: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #11
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x0000000111dfac76 libjvm.dylib`os::PlatformEvent::park() + 192
>     frame #3: 0x0000000111dd7e32 libjvm.dylib`ParkCommon(ParkEvent*, long) + 42
>     frame #4: 0x0000000111dd8708 libjvm.dylib`Monitor::IWait(Thread*, long) + 168
>     frame #5: 0x0000000111dd8971 libjvm.dylib`Monitor::wait(bool, long, bool) + 375
>     frame #6: 0x0000000111beeb5a libjvm.dylib`GCTaskManager::get_task(unsigned int) + 56
>     frame #7: 0x0000000111befc27 libjvm.dylib`GCTaskThread::run() + 349
>     frame #8: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #9: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #10: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #11: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #12
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x0000000111dfac76 libjvm.dylib`os::PlatformEvent::park() + 192
>     frame #3: 0x0000000111dd7e32 libjvm.dylib`ParkCommon(ParkEvent*, long) + 42
>     frame #4: 0x0000000111dd8708 libjvm.dylib`Monitor::IWait(Thread*, long) + 168
>     frame #5: 0x0000000111dd8971 libjvm.dylib`Monitor::wait(bool, long, bool) + 375
>     frame #6: 0x0000000111beeb5a libjvm.dylib`GCTaskManager::get_task(unsigned int) + 56
>     frame #7: 0x0000000111befc27 libjvm.dylib`GCTaskThread::run() + 349
>     frame #8: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #9: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #10: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #11: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #13
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x0000000111dfac76 libjvm.dylib`os::PlatformEvent::park() + 192
>     frame #3: 0x0000000111dd7e32 libjvm.dylib`ParkCommon(ParkEvent*, long) + 42
>     frame #4: 0x0000000111dd8708 libjvm.dylib`Monitor::IWait(Thread*, long) + 168
>     frame #5: 0x0000000111dd8971 libjvm.dylib`Monitor::wait(bool, long, bool) + 375
>     frame #6: 0x0000000111beeb5a libjvm.dylib`GCTaskManager::get_task(unsigned int) + 56
>     frame #7: 0x0000000111befc27 libjvm.dylib`GCTaskThread::run() + 349
>     frame #8: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #9: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #10: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #11: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #14
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x0000000111dfac76 libjvm.dylib`os::PlatformEvent::park() + 192
>     frame #3: 0x0000000111dd7e32 libjvm.dylib`ParkCommon(ParkEvent*, long) + 42
>     frame #4: 0x0000000111dd8708 libjvm.dylib`Monitor::IWait(Thread*, long) + 168
>     frame #5: 0x0000000111dd8971 libjvm.dylib`Monitor::wait(bool, long, bool) + 375
>     frame #6: 0x0000000111beeb5a libjvm.dylib`GCTaskManager::get_task(unsigned int) + 56
>     frame #7: 0x0000000111befc27 libjvm.dylib`GCTaskThread::run() + 349
>     frame #8: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #9: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #10: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #11: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #15
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x0000000111dfbb60 libjvm.dylib`os::PlatformEvent::park(long) + 404
>     frame #3: 0x0000000111dd8708 libjvm.dylib`Monitor::IWait(Thread*, long) + 168
>     frame #4: 0x0000000111dd8971 libjvm.dylib`Monitor::wait(bool, long, bool) + 375
>     frame #5: 0x0000000111f2847c libjvm.dylib`VMThread::loop() + 444
>     frame #6: 0x0000000111f27f07 libjvm.dylib`VMThread::run() + 121
>     frame #7: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #8: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #9: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #10: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #16, name = 'Java: Reference Handler'
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x0000000111dfac76 libjvm.dylib`os::PlatformEvent::park() + 192
>     frame #3: 0x0000000111df2802 libjvm.dylib`ObjectMonitor::wait(long, bool, Thread*) + 748
>     frame #4: 0x0000000111eaa8f0 libjvm.dylib`ObjectSynchronizer::wait(Handle, long, Thread*) + 202
>     frame #5: 0x0000000111cc7c23 libjvm.dylib`JVM_MonitorWait + 156
>     frame #6: 0x000000011445a954
>     frame #7: 0x000000011444cc4d
>     frame #8: 0x000000011444cc4d
>     frame #9: 0x000000011444c420
>     frame #10: 0x00000001144457a7
>     frame #11: 0x0000000111c6639e libjvm.dylib`JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*) + 1710
>     frame #12: 0x0000000111c66b2c libjvm.dylib`JavaCalls::call_virtual(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*) + 356
>     frame #13: 0x0000000111c66cd8 libjvm.dylib`JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle, Symbol*, Symbol*, Thread*) + 74
>     frame #14: 0x0000000111cc1255 libjvm.dylib`thread_entry(JavaThread*, Thread*) + 124
>     frame #15: 0x0000000111edce03 libjvm.dylib`JavaThread::thread_main_inner() + 155
>     frame #16: 0x0000000111ede4fe libjvm.dylib`JavaThread::run() + 450
>     frame #17: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #18: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #19: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #20: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #17, name = 'Java: Finalizer'
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x0000000111dfac76 libjvm.dylib`os::PlatformEvent::park() + 192
>     frame #3: 0x0000000111df2802 libjvm.dylib`ObjectMonitor::wait(long, bool, Thread*) + 748
>     frame #4: 0x0000000111eaa8f0 libjvm.dylib`ObjectSynchronizer::wait(Handle, long, Thread*) + 202
>     frame #5: 0x0000000111cc7c23 libjvm.dylib`JVM_MonitorWait + 156
>     frame #6: 0x000000011445a954
>     frame #7: 0x000000011444cc4d
>     frame #8: 0x000000011444c9d0
>     frame #9: 0x000000011444c9d0
>     frame #10: 0x00000001144457a7
>     frame #11: 0x0000000111c6639e libjvm.dylib`JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*) + 1710
>     frame #12: 0x0000000111c66b2c libjvm.dylib`JavaCalls::call_virtual(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*) + 356
>     frame #13: 0x0000000111c66cd8 libjvm.dylib`JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle, Symbol*, Symbol*, Thread*) + 74
>     frame #14: 0x0000000111cc1255 libjvm.dylib`thread_entry(JavaThread*, Thread*) + 124
>     frame #15: 0x0000000111edce03 libjvm.dylib`JavaThread::thread_main_inner() + 155
>     frame #16: 0x0000000111ede4fe libjvm.dylib`JavaThread::run() + 450
>     frame #17: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #18: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #19: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #20: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #18, name = 'Java: Signal Dispatcher'
>     frame #0: 0x00007fffb6c66386 libsystem_kernel.dylib`semaphore_wait_trap + 10
>     frame #1: 0x0000000111dfd1c8 libjvm.dylib`check_pending_signals(bool) + 128
>     frame #2: 0x0000000111df9d0f libjvm.dylib`signal_thread_entry(JavaThread*, Thread*) + 57
>     frame #3: 0x0000000111edce03 libjvm.dylib`JavaThread::thread_main_inner() + 155
>     frame #4: 0x0000000111ede4fe libjvm.dylib`JavaThread::run() + 450
>     frame #5: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #6: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #7: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #8: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #19, name = 'Java: C2 CompilerThread0'
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x0000000111dfbb60 libjvm.dylib`os::PlatformEvent::park(long) + 404
>     frame #3: 0x0000000111dd8708 libjvm.dylib`Monitor::IWait(Thread*, long) + 168
>     frame #4: 0x0000000111dd88d8 libjvm.dylib`Monitor::wait(bool, long, bool) + 222
>     frame #5: 0x0000000111b32936 libjvm.dylib`CompileQueue::get() + 122
>     frame #6: 0x0000000111b32b58 libjvm.dylib`CompileBroker::compiler_thread_loop() + 376
>     frame #7: 0x0000000111edce03 libjvm.dylib`JavaThread::thread_main_inner() + 155
>     frame #8: 0x0000000111ede4fe libjvm.dylib`JavaThread::run() + 450
>     frame #9: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #10: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #11: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #12: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #20, name = 'Java: C2 CompilerThread1'
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x0000000111dfbb60 libjvm.dylib`os::PlatformEvent::park(long) + 404
>     frame #3: 0x0000000111dd8708 libjvm.dylib`Monitor::IWait(Thread*, long) + 168
>     frame #4: 0x0000000111dd88d8 libjvm.dylib`Monitor::wait(bool, long, bool) + 222
>     frame #5: 0x0000000111b32936 libjvm.dylib`CompileQueue::get() + 122
>     frame #6: 0x0000000111b32b58 libjvm.dylib`CompileBroker::compiler_thread_loop() + 376
>     frame #7: 0x0000000111edce03 libjvm.dylib`JavaThread::thread_main_inner() + 155
>     frame #8: 0x0000000111ede4fe libjvm.dylib`JavaThread::run() + 450
>     frame #9: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #10: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #11: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #12: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #21, name = 'Java: C2 CompilerThread2'
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x0000000111dfbb60 libjvm.dylib`os::PlatformEvent::park(long) + 404
>     frame #3: 0x0000000111dd8708 libjvm.dylib`Monitor::IWait(Thread*, long) + 168
>     frame #4: 0x0000000111dd88d8 libjvm.dylib`Monitor::wait(bool, long, bool) + 222
>     frame #5: 0x0000000111b32936 libjvm.dylib`CompileQueue::get() + 122
>     frame #6: 0x0000000111b32b58 libjvm.dylib`CompileBroker::compiler_thread_loop() + 376
>     frame #7: 0x0000000111edce03 libjvm.dylib`JavaThread::thread_main_inner() + 155
>     frame #8: 0x0000000111ede4fe libjvm.dylib`JavaThread::run() + 450
>     frame #9: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #10: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #11: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #12: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #22, name = 'Java: C1 CompilerThread3'
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x0000000111dfbb60 libjvm.dylib`os::PlatformEvent::park(long) + 404
>     frame #3: 0x0000000111dd8708 libjvm.dylib`Monitor::IWait(Thread*, long) + 168
>     frame #4: 0x0000000111dd88d8 libjvm.dylib`Monitor::wait(bool, long, bool) + 222
>     frame #5: 0x0000000111b32936 libjvm.dylib`CompileQueue::get() + 122
>     frame #6: 0x0000000111b32b58 libjvm.dylib`CompileBroker::compiler_thread_loop() + 376
>     frame #7: 0x0000000111edce03 libjvm.dylib`JavaThread::thread_main_inner() + 155
>     frame #8: 0x0000000111ede4fe libjvm.dylib`JavaThread::run() + 450
>     frame #9: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #10: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #11: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #12: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #23, name = 'Java: Service Thread'
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x0000000111dfac76 libjvm.dylib`os::PlatformEvent::park() + 192
>     frame #3: 0x0000000111dd7e32 libjvm.dylib`ParkCommon(ParkEvent*, long) + 42
>     frame #4: 0x0000000111dd8708 libjvm.dylib`Monitor::IWait(Thread*, long) + 168
>     frame #5: 0x0000000111dd8971 libjvm.dylib`Monitor::wait(bool, long, bool) + 375
>     frame #6: 0x0000000111e56396 libjvm.dylib`ServiceThread::service_thread_entry(JavaThread*, Thread*) + 132
>     frame #7: 0x0000000111edce03 libjvm.dylib`JavaThread::thread_main_inner() + 155
>     frame #8: 0x0000000111ede4fe libjvm.dylib`JavaThread::run() + 450
>     frame #9: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #10: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #11: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #12: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
> 
>   thread #24
>     frame #0: 0x00007fffb6c6dbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fffb6d5986e libsystem_pthread.dylib`_pthread_cond_wait + 712
>     frame #2: 0x0000000111dfbb60 libjvm.dylib`os::PlatformEvent::park(long) + 404
>     frame #3: 0x0000000111dd8708 libjvm.dylib`Monitor::IWait(Thread*, long) + 168
>     frame #4: 0x0000000111dd8971 libjvm.dylib`Monitor::wait(bool, long, bool) + 375
>     frame #5: 0x0000000111edd2e0 libjvm.dylib`WatcherThread::sleep() const + 126
>     frame #6: 0x0000000111ede173 libjvm.dylib`WatcherThread::run() + 243
>     frame #7: 0x0000000111dfeeda libjvm.dylib`java_start(Thread*) + 246
>     frame #8: 0x00007fffb6d589af libsystem_pthread.dylib`_pthread_body + 180
>     frame #9: 0x00007fffb6d588fb libsystem_pthread.dylib`_pthread_start + 286
>     frame #10: 0x00007fffb6d58101 libsystem_pthread.dylib`thread_start + 13
Comment 3 Jonathan Pryor 2017-03-29 16:27:24 UTC
Cursory analysis of Comment #2 suggests that the crash is happening on thread #3, the 'Finalizer' thread, as that's the thread with `mono_handle_native_crash()` in the callstack.

This suggests a process shutdown ordering issue to me.
Comment 4 Jonathan Pryor 2017-03-29 22:05:02 UTC
We've determined that this is a Java.Interop bug.

The issue is conceptually as followed:

1. AppDomain is created.

2. AppDomain loads Java.Interop, which calls `java_interop_gc_bridge_register_bridgeable_type()`

3. AppDomain is later unloaded, which unloads Java.Interop.dll. This invalidates the MonoClass* values held in java-interop-gc-bridge-mono.c.

4. "Later", Mono's GC calls libjava-interop.dylib`gc_bridge_class_kind, which attempts to use the (now invalid; see (3)) MonoClass* values.

5. We assert.

Java.Interop needs cleaning up to avoid this.

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