Skip to content

Random crash in MonoTouchFixtures.CoreAnimation.LayerTest.TestBug26532 #24595

@rolfbjarne

Description

@rolfbjarne

Crashing thread:

hread 41 Crashed:
0   libobjc.A.dylib               	    0x7ff802539d8b objc_msgSend + 11
1   monotouchtest                 	       0x1026788c5 xamarin_gc_toggleref_callback + 53 (runtime.m:747)
2   monotouchtest                 	       0x10268216e xamarin_coreclr_reference_tracking_is_referenced_callback + 30 (coreclr-bridge.m:306)
3   monotouchtest                 	       0x102852504 ObjCMarshalNative::IsTrackedReference(Object*, bool*) + 100 (interoplibinterface_objc.cpp:141)
4   monotouchtest                 	       0x102808bc7 GCToEEInterface::RefCountedHandleCallbacks(Object*) + 39 (gcenv.ee.cpp:177)
5   monotouchtest                 	       0x10284a7df PromoteRefCounted(Object**, unsigned long*, unsigned long, unsigned long) + 79 (objecthandle.cpp:98)
6   monotouchtest                 	       0x1028490ae ScanConsecutiveHandlesWithoutUserData(Object**, Object**, ScanCallbackInfo*, unsigned long*) + 63 (handletablescan.cpp:442) [inlined]
7   monotouchtest                 	       0x1028490ae BlockScanBlocksWithoutUserData(TableSegment*, unsigned int, unsigned int, ScanCallbackInfo*) + 126 (handletablescan.cpp:554)
8   monotouchtest                 	       0x10284a05c SegmentScanByTypeChain(TableSegment*, unsigned int, void (*)(TableSegment*, unsigned int, unsigned int, ScanCallbackInfo*), ScanCallbackInfo*) + 56 (handletablescan.cpp:1632) [inlined]
9   monotouchtest                 	       0x10284a05c TableScanHandles(HandleTable*, unsigned int const*, unsigned int, TableSegment* (*)(HandleTable*, TableSegment*, CrstHolderWithState*), void (*)(TableSegment*, unsigned int, unsigned int, ScanCallbackInfo*), ScanCallbackInfo*, CrstHolderWithState*) + 396 (handletablescan.cpp:1749)
10  monotouchtest                 	       0x102845ef3 HndScanHandlesForGC(HandleTable*, void (*)(Object**, unsigned long*, unsigned long, unsigned long), unsigned long, unsigned long, unsigned int const*, unsigned int, unsigned int, unsigned int, unsigned int) + 371 (handletable.cpp:794)
11  monotouchtest                 	       0x10284b84d Ref_TraceNormalRoots(unsigned int, unsigned int, ScanContext*, void (*)(Object**, ScanContext*, unsigned int)) + 1405 (objecthandle.cpp:1171)
12  monotouchtest                 	       0x1028236cb WKS::gc_heap::mark_phase(int) + 1659 (gc.cpp:30142)
13  monotouchtest                 	       0x1028203a4 WKS::gc_heap::gc1() + 804 (gc.cpp:22587)
14  monotouchtest                 	       0x10282b1ff WKS::gc_heap::garbage_collect(int) + 1839
15  monotouchtest                 	       0x10281c126 WKS::GCHeap::GarbageCollectGeneration(unsigned int, gc_reason) + 998 (gc.cpp:51582)
16  monotouchtest                 	       0x1028427f6 WKS::GCHeap::GarbageCollectTry(int, int, int) + 13 (gc.cpp:50773) [inlined]
17  monotouchtest                 	       0x1028427f6 WKS::GCHeap::GarbageCollect(int, bool, int) + 422 (gc.cpp:50703)
18  monotouchtest                 	       0x102806b60 RhCollect + 80 (GCHelpers.cpp:124)
19  monotouchtest                 	       0x10352e7cb monotouchtest_MonoTouchFixtures_CoreAnimation_LayerTest___c__DisplayClass9_0___TestBug26532_b__0 + 171 (LayerTest.cs:122)
20  monotouchtest                 	       0x102c16d41 S_P_CoreLib_System_Threading_Thread_StartHelper__Callback + 161 (Thread.cs:45)
21  monotouchtest                 	       0x102b9f0a9 S_P_CoreLib_System_Threading_ExecutionContext__RunInternal + 137 (ExecutionContext.cs:194)
22  monotouchtest                 	       0x102b9c7cf S_P_CoreLib_System_Threading_Thread__StartThread + 335 (Thread.NativeAot.cs:440)
23  monotouchtest                 	       0x102b9cac9 <deduplicated_symbol> + 25
24  libsystem_pthread.dylib       	       0x108b6a857 thread_start + 15

main thread is running the test:

Thread 0::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x108fa06f6 __psynch_cvwait + 10
1   libsystem_pthread.dylib       	       0x108b6f335 _pthread_cond_wait + 1039
2   monotouchtest                 	       0x102c1c61c S_P_CoreLib_System_Threading_WaitSubsystem_ThreadWaitInfo__Wait + 412 (WaitSubsystem.ThreadWaitInfo.Unix.cs:332)
3   monotouchtest                 	       0x102ba8bcc S_P_CoreLib_System_Threading_WaitSubsystem__Wait + 124 (WaitSubsystem.HandleManager.Unix.cs:35)
4   monotouchtest                 	       0x102b9d2b1 S_P_CoreLib_System_Threading_Thread__JoinInternal + 145 (Thread.Unix.cs:68)
5   monotouchtest                 	       0x10352dfec monotouchtest_MonoTouchFixtures_CoreAnimation_LayerTest__TestBug26532 + 140 (LayerTest.cs:136)
6   monotouchtest                 	       0x103831c33 Internal_CompilerGenerated__Module___<DynamicInvoke>None<S_P_CoreLib_System_Void> + 35
7   monotouchtest                 	       0x102bdba43 S_P_CoreLib_System_Reflection_DynamicInvokeInfo__Invoke + 243 (DynamicInvokeInfo.cs:230)
8   monotouchtest                 	       0x102c3232f S_P_Reflection_Execution_Internal_Reflection_Execution_MethodInvokers_InstanceMethodInvoker__Invoke + 79 (InstanceMethodInvoker.cs:58)
9   monotouchtest                 	       0x102c03958 S_P_CoreLib_Internal_Reflection_Core_Execution_MethodBaseInvoker__Invoke + 72 (MethodBaseInvoker.cs:30)
10  monotouchtest                 	       0x102be3410 S_P_CoreLib_System_Reflection_Runtime_MethodInfos_RuntimeMethodInfo__Invoke + 112 (RuntimeMethodInfo.cs:166)
11  monotouchtest                 	       0x10358e8a8 nunit_framework_NUnit_Framework_Internal_Reflect__InvokeMethod_0 + 40
12  monotouchtest                 	       0x1035a12ce nunit_framework_NUnit_Framework_Internal_Commands_TestMethodCommand__Execute + 30
13  monotouchtest                 	       0x10359cea2 nunit_framework_NUnit_Framework_Internal_Execution_SimpleWorkItem__PerformWork + 34
14  monotouchtest                 	       0x10359e929 nunit_framework_NUnit_Framework_Internal_Execution_WorkItem__RunOnCurrentThread + 297
15  monotouchtest                 	       0x10359a389 nunit_framework_NUnit_Framework_Internal_Execution_CompositeWorkItem__RunChildren + 521
16  monotouchtest                 	       0x10359e91f nunit_framework_NUnit_Framework_Internal_Execution_WorkItem__RunOnCurrentThread + 287
17  monotouchtest                 	       0x10359a389 nunit_framework_NUnit_Framework_Internal_Execution_CompositeWorkItem__RunChildren + 521
18  monotouchtest                 	       0x10359e91f nunit_framework_NUnit_Framework_Internal_Execution_WorkItem__RunOnCurrentThread + 287
19  monotouchtest                 	       0x10359a389 nunit_framework_NUnit_Framework_Internal_Execution_CompositeWorkItem__RunChildren + 521
20  monotouchtest                 	       0x10359e91f nunit_framework_NUnit_Framework_Internal_Execution_WorkItem__RunOnCurrentThread + 287
21  monotouchtest                 	       0x10359a389 nunit_framework_NUnit_Framework_Internal_Execution_CompositeWorkItem__RunChildren + 521
22  monotouchtest                 	       0x10359e91f nunit_framework_NUnit_Framework_Internal_Execution_WorkItem__RunOnCurrentThread + 287
23  monotouchtest                 	       0x102d37b07 Touch_Client_MonoTouch_NUnit_UI_BaseTouchRunner__Run_0 + 487 (TouchRunner.cs:640)
24  monotouchtest                 	       0x102d364f5 Touch_Client_MonoTouch_NUnit_UI_BaseTouchRunner__Run + 53 (TouchRunner.cs:268)
25  monotouchtest                 	       0x102d37e4f Touch_Client_MonoTouch_NUnit_UI_BaseTouchRunner___AutoRun_b__49_0 + 47 (TouchRunner.cs:228)
26  monotouchtest                 	       0x102987ac4 Microsoft_iOS_Foundation_NSAsyncActionDispatcher__Apply + 36 (NSAction.cs:138)
27  monotouchtest                 	       0x102987b9f <deduplicated_symbol> + 95
28  monotouchtest                 	       0x1027ed23c -[__MonoMac_NSAsyncActionDispatcher xamarinApplySelector] + 76 (registrar.mm:138285)
[...]

Full crash report: https://gist.github.com/rolfbjarne/fb33c956faf068149c9c705dd4957792

Currently I've only seen this test variation crash like this:

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsAnything related to tests

    Type

    No fields configured for Bug.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions