Skip to content

Runtime crashes on OSX running compiler unit tests #97186

Closed

Description

@jaredpar

Description

The runtime is crashing on OSX when running the compiler unit tests. There is no specific test that causes the crash but the crash is very consistent (approaching 100%).

Unfortunately, due to this being a OSX dump, the dump files are too large for us to upload a full dump. The best we can get is a mini dump and json report:

This is blocking our ability to test on OSX because there is no specific test to disable to work around the crash that we can see. The same tests pass just fine on Windows and Linux.

Reproduction Steps

Run the C# compiler tests in CI. Any build in this pipeline with the main branch filter will demonstrate the crash.

https://dnceng-public.visualstudio.com/public/_build?definitionId=95&_a=summary&branchFilter=319%2C319

Expected behavior

Unit tests pass

Actual behavior

Crashes with the following stack trace:

__wait4
PROCCreateCrashDump(std::__1::vector<char const*, std::__1::allocator<char const*>>&, char*, int, bool)
PROCCreateCrashDumpIfEnabled
invoke_previous_action(sigaction*, int, __siginfo*, void*, bool)
_sigtramp
WKS::gc_heap::mark_ro_segments()
WKS::gc_heap::mark_phase(int, int)
WKS::gc_heap::gc1()
WKS::gc_heap::garbage_collect(int)
WKS::GCHeap::GarbageCollectGeneration(unsigned int, gc_reason)
WKS::gc_heap::try_allocate_more_space(alloc_context*, unsigned long, unsigned int, int)
WKS::GCHeap::Alloc(gc_alloc_context*, unsigned long, unsigned int)
Alloc(unsigned long, GC_ALLOC_FLAGS)
AllocateObject(MethodTable*)
MethodTable::FastBox(void**)
JIT_Box(CORINFO_CLASS_STRUCT_*, void*)
Microsoft.CodeAnalysis.UnitTests.Collections.WrapStructural_SimpleInt.Equals(Microsoft.CodeAnalysis.UnitTests.Collections.SimpleInt, Microsoft.CodeAnalysis.UnitTests.Collections.SimpleInt)
System.Linq.Enumerable.Contains[[Microsoft.CodeAnalysis.UnitTests.Collections.SimpleInt, Microsoft.CodeAnalysis.UnitTests]](System.Collections.Generic.IEnumerable`1<Microsoft.CodeAnalysis.UnitTests.Collections.SimpleInt>, Microsoft.CodeAnalysis.UnitTests.Collections.SimpleInt, System.Collections.Generic.IEqualityComparer`1<Microsoft.CodeAnalysis.UnitTests.Collections.SimpleInt>)
Microsoft.CodeAnalysis.UnitTests.Collections.TestBase`1[[Microsoft.CodeAnalysis.UnitTests.Collections.SimpleInt, Microsoft.CodeAnalysis.UnitTests]].CreateSortedSet(System.Collections.Generic.IEnumerable`1<Microsoft.CodeAnalysis.UnitTests.Collections.SimpleInt>, Int32, Int32)
Microsoft.CodeAnalysis.UnitTests.Collections.TestBase`1[[Microsoft.CodeAnalysis.UnitTests.Collections.SimpleInt, Microsoft.CodeAnalysis.UnitTests]].CreateEnumerable(EnumerableType, System.Collections.Generic.IEnumerable`1<Microsoft.CodeAnalysis.UnitTests.Collections.SimpleInt>, Int32, Int32, Int32)
Microsoft.CodeAnalysis.UnitTests.Collections.ISet_Generic_Tests`1[[Microsoft.CodeAnalysis.UnitTests.Collections.SimpleInt, Microsoft.CodeAnalysis.UnitTests]].ISet_Generic_Overlaps(EnumerableType, Int32, Int32, Int32, Int32)
DynamicClass.InvokeStub_ISet_Generic_Tests`1.ISet_Generic_Overlaps(System.Object, System.Span`1<System.Object>)
System.Reflection.MethodBaseInvoker.InvokeWithManyArgs(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
Xunit.Sdk.TestInvoker`1[[System.__Canon, System.Private.CoreLib]].CallTestMethod(System.Object)
Xunit.Sdk.TestInvoker`1+<>c__DisplayClass48_1+<<InvokeTestMethodAsync>b__1>d[[System.__Canon, System.Private.CoreLib]].MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.TestInvoker`1+<>c__DisplayClass48_1+<<InvokeTestMethodAsync>b__1>d[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<<InvokeTestMethodAsync>b__1>d<System.__Canon> ByRef)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[Xunit.Sdk.TestInvoker`1+<>c__DisplayClass48_1+<<InvokeTestMethodAsync>b__1>d[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<<InvokeTestMethodAsync>b__1>d<System.__Canon> ByRef)
Xunit.Sdk.TestInvoker`1+<>c__DisplayClass48_1[[System.__Canon, System.Private.CoreLib]].<InvokeTestMethodAsync>b__1()
Xunit.Sdk.ExecutionTimer+<AggregateAsync>d__4.MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.ExecutionTimer+<AggregateAsync>d__4, xunit.execution.dotnet]](<AggregateAsync>d__4 ByRef)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[Xunit.Sdk.ExecutionTimer+<AggregateAsync>d__4, xunit.execution.dotnet]](<AggregateAsync>d__4 ByRef)
Xunit.Sdk.ExecutionTimer.AggregateAsync(System.Func`1<System.Threading.Tasks.Task>)
Xunit.Sdk.TestInvoker`1+<>c__DisplayClass48_1[[System.__Canon, System.Private.CoreLib]].<InvokeTestMethodAsync>b__0()
Xunit.Sdk.ExceptionAggregator+<RunAsync>d__9.MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.ExceptionAggregator+<RunAsync>d__9, xunit.core]](<RunAsync>d__9 ByRef)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[Xunit.Sdk.ExceptionAggregator+<RunAsync>d__9, xunit.core]](<RunAsync>d__9 ByRef)
Xunit.Sdk.ExceptionAggregator.RunAsync(System.Func`1<System.Threading.Tasks.Task>)
Xunit.Sdk.TestInvoker`1+<InvokeTestMethodAsync>d__48[[System.__Canon, System.Private.CoreLib]].MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.TestInvoker`1+<InvokeTestMethodAsync>d__48[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<InvokeTestMethodAsync>d__48<System.__Canon> ByRef)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Decimal, System.Private.CoreLib]].Start[[Xunit.Sdk.TestInvoker`1+<InvokeTestMethodAsync>d__48[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<InvokeTestMethodAsync>d__48<System.__Canon> ByRef)
Xunit.Sdk.TestInvoker`1[[System.__Canon, System.Private.CoreLib]].InvokeTestMethodAsync(System.Object)
Xunit.Sdk.XunitTestInvoker.InvokeTestMethodAsync(System.Object)
Xunit.Sdk.TestInvoker`1+<<RunAsync>b__47_0>d[[System.__Canon, System.Private.CoreLib]].MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.TestInvoker`1+<<RunAsync>b__47_0>d[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<<RunAsync>b__47_0>d<System.__Canon> ByRef)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Decimal, System.Private.CoreLib]].Start[[Xunit.Sdk.TestInvoker`1+<<RunAsync>b__47_0>d[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<<RunAsync>b__47_0>d<System.__Canon> ByRef)
Xunit.Sdk.TestInvoker`1[[System.__Canon, System.Private.CoreLib]].<RunAsync>b__47_0()
Xunit.Sdk.ExceptionAggregator+<RunAsync>d__10`1[[System.Decimal, System.Private.CoreLib]].MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.ExceptionAggregator+<RunAsync>d__10`1[[System.Decimal, System.Private.CoreLib]], xunit.core]](<RunAsync>d__10`1<System.Decimal> ByRef)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Decimal, System.Private.CoreLib]].Start[[Xunit.Sdk.ExceptionAggregator+<RunAsync>d__10`1[[System.Decimal, System.Private.CoreLib]], xunit.core]](<RunAsync>d__10`1<System.Decimal> ByRef)
Xunit.Sdk.ExceptionAggregator.RunAsync[[System.Decimal, System.Private.CoreLib]](System.Func`1<System.Threading.Tasks.Task`1<System.Decimal>>)
Xunit.Sdk.TestInvoker`1[[System.__Canon, System.Private.CoreLib]].RunAsync()
Xunit.Sdk.XunitTestRunner.InvokeTestMethodAsync(Xunit.Sdk.ExceptionAggregator)
Xunit.Sdk.XunitTestRunner+<InvokeTestAsync>d__4.MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.XunitTestRunner+<InvokeTestAsync>d__4, xunit.execution.dotnet]](<InvokeTestAsync>d__4 ByRef)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, System.Private.CoreLib]].Start[[Xunit.Sdk.XunitTestRunner+<InvokeTestAsync>d__4, xunit.execution.dotnet]](<InvokeTestAsync>d__4 ByRef)
Xunit.Sdk.XunitTestRunner.InvokeTestAsync(Xunit.Sdk.ExceptionAggregator)
Xunit.Sdk.TestRunner`1+<>c__DisplayClass43_0[[System.__Canon, System.Private.CoreLib]].<RunAsync>b__0()
Xunit.Sdk.ExceptionAggregator+<RunAsync>d__10`1[[System.__Canon, System.Private.CoreLib]].MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.ExceptionAggregator+<RunAsync>d__10`1[[System.__Canon, System.Private.CoreLib]], xunit.core]](<RunAsync>d__10`1<System.__Canon> ByRef)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, System.Private.CoreLib]].Start[[Xunit.Sdk.ExceptionAggregator+<RunAsync>d__10`1[[System.__Canon, System.Private.CoreLib]], xunit.core]](<RunAsync>d__10`1<System.__Canon> ByRef)
Xunit.Sdk.ExceptionAggregator.RunAsync[[System.__Canon, System.Private.CoreLib]](System.Func`1<System.Threading.Tasks.Task`1<System.__Canon>>)
Xunit.Sdk.TestRunner`1+<RunAsync>d__43[[System.__Canon, System.Private.CoreLib]].MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.TestRunner`1+<RunAsync>d__43[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunAsync>d__43<System.__Canon> ByRef)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, System.Private.CoreLib]].Start[[Xunit.Sdk.TestRunner`1+<RunAsync>d__43[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunAsync>d__43<System.__Canon> ByRef)
Xunit.Sdk.TestRunner`1[[System.__Canon, System.Private.CoreLib]].RunAsync()
Xunit.Sdk.XunitTestCaseRunner.RunTestAsync()
Xunit.Sdk.TestCaseRunner`1+<RunAsync>d__19[[System.__Canon, System.Private.CoreLib]].MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.TestCaseRunner`1+<RunAsync>d__19[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunAsync>d__19<System.__Canon> ByRef)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, System.Private.CoreLib]].Start[[Xunit.Sdk.TestCaseRunner`1+<RunAsync>d__19[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunAsync>d__19<System.__Canon> ByRef)
Xunit.Sdk.TestCaseRunner`1[[System.__Canon, System.Private.CoreLib]].RunAsync()
Xunit.Sdk.XunitTestCase.RunAsync(Xunit.Abstractions.IMessageSink, Xunit.Sdk.IMessageBus, System.Object[], Xunit.Sdk.ExceptionAggregator, System.Threading.CancellationTokenSource)
Xunit.Sdk.XunitTestMethodRunner.RunTestCaseAsync(Xunit.Sdk.IXunitTestCase)
Xunit.Sdk.TestMethodRunner`1+<RunTestCasesAsync>d__32[[System.__Canon, System.Private.CoreLib]].MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.TestMethodRunner`1+<RunTestCasesAsync>d__32[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunTestCasesAsync>d__32<System.__Canon> ByRef)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, System.Private.CoreLib]].Start[[Xunit.Sdk.TestMethodRunner`1+<RunTestCasesAsync>d__32[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunTestCasesAsync>d__32<System.__Canon> ByRef)
Xunit.Sdk.TestMethodRunner`1[[System.__Canon, System.Private.CoreLib]].RunTestCasesAsync()
Xunit.Sdk.TestMethodRunner`1+<RunAsync>d__31[[System.__Canon, System.Private.CoreLib]].MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.TestMethodRunner`1+<RunAsync>d__31[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunAsync>d__31<System.__Canon> ByRef)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, System.Private.CoreLib]].Start[[Xunit.Sdk.TestMethodRunner`1+<RunAsync>d__31[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunAsync>d__31<System.__Canon> ByRef)
Xunit.Sdk.TestMethodRunner`1[[System.__Canon, System.Private.CoreLib]].RunAsync()
Xunit.Sdk.XunitTestClassRunner.RunTestMethodAsync(Xunit.Abstractions.ITestMethod, Xunit.Abstractions.IReflectionMethodInfo, System.Collections.Generic.IEnumerable`1<Xunit.Sdk.IXunitTestCase>, System.Object[])
Xunit.Sdk.TestClassRunner`1+<RunTestMethodsAsync>d__38[[System.__Canon, System.Private.CoreLib]].MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.TestClassRunner`1+<RunTestMethodsAsync>d__38[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunTestMethodsAsync>d__38<System.__Canon> ByRef)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, System.Private.CoreLib]].Start[[Xunit.Sdk.TestClassRunner`1+<RunTestMethodsAsync>d__38[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunTestMethodsAsync>d__38<System.__Canon> ByRef)
Xunit.Sdk.TestClassRunner`1[[System.__Canon, System.Private.CoreLib]].RunTestMethodsAsync()
Xunit.Sdk.TestClassRunner`1+<RunAsync>d__37[[System.__Canon, System.Private.CoreLib]].MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.TestClassRunner`1+<RunAsync>d__37[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunAsync>d__37<System.__Canon> ByRef)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, System.Private.CoreLib]].Start[[Xunit.Sdk.TestClassRunner`1+<RunAsync>d__37[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunAsync>d__37<System.__Canon> ByRef)
Xunit.Sdk.TestClassRunner`1[[System.__Canon, System.Private.CoreLib]].RunAsync()
Xunit.Sdk.XunitTestCollectionRunner.RunTestClassAsync(Xunit.Abstractions.ITestClass, Xunit.Abstractions.IReflectionTypeInfo, System.Collections.Generic.IEnumerable`1<Xunit.Sdk.IXunitTestCase>)
Xunit.Sdk.TestCollectionRunner`1+<RunTestClassesAsync>d__28[[System.__Canon, System.Private.CoreLib]].MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.TestCollectionRunner`1+<RunTestClassesAsync>d__28[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunTestClassesAsync>d__28<System.__Canon> ByRef)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, System.Private.CoreLib]].Start[[Xunit.Sdk.TestCollectionRunner`1+<RunTestClassesAsync>d__28[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunTestClassesAsync>d__28<System.__Canon> ByRef)
Xunit.Sdk.TestCollectionRunner`1[[System.__Canon, System.Private.CoreLib]].RunTestClassesAsync()
Xunit.Sdk.TestCollectionRunner`1+<RunAsync>d__27[[System.__Canon, System.Private.CoreLib]].MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.TestCollectionRunner`1+<RunAsync>d__27[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunAsync>d__27<System.__Canon> ByRef)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, System.Private.CoreLib]].Start[[Xunit.Sdk.TestCollectionRunner`1+<RunAsync>d__27[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunAsync>d__27<System.__Canon> ByRef)
Xunit.Sdk.TestCollectionRunner`1[[System.__Canon, System.Private.CoreLib]].RunAsync()
Xunit.Sdk.XunitTestAssemblyRunner.RunTestCollectionAsync(Xunit.Sdk.IMessageBus, Xunit.Abstractions.ITestCollection, System.Collections.Generic.IEnumerable`1<Xunit.Sdk.IXunitTestCase>, System.Threading.CancellationTokenSource)
Xunit.Sdk.TestAssemblyRunner`1+<RunTestCollectionsAsync>d__42[[System.__Canon, System.Private.CoreLib]].MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.TestAssemblyRunner`1+<RunTestCollectionsAsync>d__42[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunTestCollectionsAsync>d__42<System.__Canon> ByRef)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, System.Private.CoreLib]].Start[[Xunit.Sdk.TestAssemblyRunner`1+<RunTestCollectionsAsync>d__42[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunTestCollectionsAsync>d__42<System.__Canon> ByRef)
Xunit.Sdk.TestAssemblyRunner`1[[System.__Canon, System.Private.CoreLib]].RunTestCollectionsAsync(Xunit.Sdk.IMessageBus, System.Threading.CancellationTokenSource)
Xunit.Sdk.XunitTestAssemblyRunner.<>n__0(Xunit.Sdk.IMessageBus, System.Threading.CancellationTokenSource)
Xunit.Sdk.XunitTestAssemblyRunner+<RunTestCollectionsAsync>d__14.MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.XunitTestAssemblyRunner+<RunTestCollectionsAsync>d__14, xunit.execution.dotnet]](<RunTestCollectionsAsync>d__14 ByRef)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, System.Private.CoreLib]].Start[[Xunit.Sdk.XunitTestAssemblyRunner+<RunTestCollectionsAsync>d__14, xunit.execution.dotnet]](<RunTestCollectionsAsync>d__14 ByRef)
Xunit.Sdk.XunitTestAssemblyRunner.RunTestCollectionsAsync(Xunit.Sdk.IMessageBus, System.Threading.CancellationTokenSource)
Xunit.Sdk.TestAssemblyRunner`1+<RunAsync>d__41[[System.__Canon, System.Private.CoreLib]].MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.TestAssemblyRunner`1+<RunAsync>d__41[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunAsync>d__41<System.__Canon> ByRef)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, System.Private.CoreLib]].Start[[Xunit.Sdk.TestAssemblyRunner`1+<RunAsync>d__41[[System.__Canon, System.Private.CoreLib]], xunit.execution.dotnet]](<RunAsync>d__41<System.__Canon> ByRef)
Xunit.Sdk.TestAssemblyRunner`1[[System.__Canon, System.Private.CoreLib]].RunAsync()
Xunit.Sdk.XunitTestFrameworkExecutor+<RunTestCases>d__8.MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Xunit.Sdk.XunitTestFrameworkExecutor+<RunTestCases>d__8, xunit.execution.dotnet]](<RunTestCases>d__8 ByRef)
System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[[Xunit.Sdk.XunitTestFrameworkExecutor+<RunTestCases>d__8, xunit.execution.dotnet]](<RunTestCases>d__8 ByRef)
Xunit.Sdk.XunitTestFrameworkExecutor.RunTestCases(System.Collections.Generic.IEnumerable`1<Xunit.Sdk.IXunitTestCase>, Xunit.Abstractions.IMessageSink, Xunit.Abstractions.ITestFrameworkExecutionOptions)
Xunit.Sdk.TestFrameworkExecutor`1[[System.__Canon, System.Private.CoreLib]].RunTests(System.Collections.Generic.IEnumerable`1<Xunit.Abstractions.ITestCase>, Xunit.Abstractions.IMessageSink, Xunit.Abstractions.ITestFrameworkExecutionOptions)
Xunit.Xunit2.RunTests(System.Collections.Generic.IEnumerable`1<Xunit.Abstractions.ITestCase>, Xunit.Abstractions.IMessageSink, Xunit.Abstractions.ITestFrameworkExecutionOptions)
Xunit.Runner.VisualStudio.VsTestRunner.RunTestsInAssembly(Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter.IRunContext, Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter.IFrameworkHandle, LoggerHelper, Xunit.Runner.VisualStudio.TestPlatformContext, Xunit.Runner.VisualStudio.RunSettings, Xunit.IMessageSinkWithTypes, Xunit.Runner.VisualStudio.AssemblyRunInfo)
Xunit.Runner.VisualStudio.VsTestRunner+<>c__DisplayClass20_0.<RunTests>b__4(Xunit.Runner.VisualStudio.AssemblyRunInfo)
System.Collections.Generic.List`1[[System.__Canon, System.Private.CoreLib]].ForEach(System.Action`1<System.__Canon>)
Xunit.Runner.VisualStudio.VsTestRunner.RunTests(Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter.IRunContext, Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter.IFrameworkHandle, LoggerHelper, Xunit.Runner.VisualStudio.TestPlatformContext, Xunit.Runner.VisualStudio.RunSettings, System.Func`1<System.Collections.Generic.List`1<Xunit.Runner.VisualStudio.AssemblyRunInfo>>)
Xunit.Runner.VisualStudio.VsTestRunner.Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter.ITestExecutor.RunTests(System.Collections.Generic.IEnumerable`1<System.String>, Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter.IRunContext, Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter.IFrameworkHandle)
Microsoft.VisualStudio.TestPlatform.Common.ExtensionDecorators.SerialTestRunDecorator.RunTests(System.Collections.Generic.IEnumerable`1<System.String>, Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter.IRunContext, Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter.IFrameworkHandle)
Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution.RunTestsWithSources.InvokeExecutor(Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.Utilities.LazyExtension`2<Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter.ITestExecutor,Microsoft.VisualStudio.TestPlatform.Common.Interfaces.ITestExecutorCapabilities>, System.Tuple`2<System.Uri,System.String>, Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Adapter.RunContext, Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter.IFrameworkHandle)
Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution.BaseRunTests.RunTestInternalWithExecutors(System.Collections.Generic.IEnumerable`1<System.Tuple`2<System.Uri,System.String>>, Int64)
Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution.BaseRunTests.RunTestsInternal()
Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution.BaseRunTests.RunTests()
Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution.ExecutionManager.StartTestRun(System.Collections.Generic.Dictionary`2<System.String,System.Collections.Generic.IEnumerable`1<System.String>>, System.String, System.String, Microsoft.VisualStudio.TestPlatform.ObjectModel.Engine.ClientProtocol.TestExecutionContext, Microsoft.VisualStudio.TestPlatform.ObjectModel.Engine.ITestCaseEventsHandler, Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.IInternalTestRunEventsHandler)
Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TestRequestHandler+<>c__DisplayClass45_4.<OnMessageReceived>b__3()
Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TestRequestHandler+<>c.<.ctor>b__31_2(System.Action)
Microsoft.VisualStudio.TestPlatform.Utilities.JobQueue`1[[System.__Canon, System.Private.CoreLib]].SafeProcessJob(System.__Canon)
Microsoft.VisualStudio.TestPlatform.Utilities.JobQueue`1[[System.__Canon, System.Private.CoreLib]].BackgroundJobProcessor(System.String)
Microsoft.VisualStudio.TestPlatform.Utilities.JobQueue`1[[System.__Canon, System.Private.CoreLib]].<.ctor>b__16_0()
System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef, System.Threading.Thread)
System.Threading.Thread.StartCallback()
DispatchCallSimple(unsigned long*, unsigned int, unsigned long long, unsigned int)
ThreadNative::KickOffThread_Worker(void*)
ManagedThreadBase_DispatchOuter(ManagedThreadCallState*)
ManagedThreadBase::KickOff(void (*)(void*), void*)
ThreadNative::KickOffThread(void*)
CorUnix::CPalThread::ThreadEntry(void*)
_pthread_start

Regression?

Yes this is a recent regression that came around the time of adopting the .NET 8 SDK GA

Known Workarounds

None

Configuration

Complicated

Other information

At the moment we are collecting OSX dumps with the following settings:

DOTNET_DbgEnableMiniDump=1
DOTNET_DbgMiniDumpName=/cores/crash.%d.%e.dmp
DOTNET_DbgMiniDumpType=1
DOTNET_EnableCrashReport=1

Happy to adjust this as need to help with the investigation.

Activity

  1. ghost added
    needs-area-label
    on Jan 18, 2024
  2. ghost added
    untriaged
    on Jan 18, 2024
  3. added
    os-macos
    and removed
    needs-area-label
    on Jan 18, 2024
  4. cshung commented on Jan 19, 2024

    @cshung
    Contributor

    I have got mac devices, is it possible to reproduce these locally?

  5. EgorBo commented on Jan 19, 2024

    @EgorBo
    Member

    GC Regions aren't enabled for OSX?

  6. jaredpar commented on Jan 19, 2024

    @jaredpar
    MemberAuthor

    I have got mac devices, is it possible to reproduce these locally?

    We tried running the tests locally on Macs and the issue did not reproduce. Unsure if it's specific to this hardware or some other factor. It reproduces very reliably in CI.

  7. cshung commented on Jan 19, 2024

    @cshung
    Contributor

    GC Regions aren't enabled for OSX?

    Yes, it is not enabled for OSX, because of the large dump issue.

  8. EgorBo commented on Jan 19, 2024

    @EgorBo
    Member

    Then maybe the issue can be reproduced on other platforms by disabling regions?

  9. cshung commented on Jan 19, 2024

    @cshung
    Contributor

    We certainly can disable region using DOTNET_GCName=clrgc, this should work on any platforms.

  10. cshung commented on Jan 19, 2024

    @cshung
    Contributor

    Do we know how to read the dump? When I tried to open the dump in Visual Studio, it complained wrong file format. When I tried to open it in WinDBG, it reported 25 threads, lm showed no modules. I tried to open it with lldb on osx, this time it shows 21 threads, but all thread back stack traces are just numbers.

    The crash report is more interesting, it does indicate mark_ro_segment is causing a trap

         {
          "is_managed" : "false",
          "module_address" : "0x7ff818c5a000",
          "stack_pointer" : "0x70000a07df40",
          "native_address" : "0x7ff818c5d5ed",
          "native_offset" : "0x1d",
          "native_image_offset" : "0x35ed",
          "unmanaged_name" : "_sigtramp",
          "native_module" : "libsystem_platform.dylib"
         },
         {
          "is_managed" : "false",
          "module_address" : "0x101394000",
          "stack_pointer" : "0x70000a07e490",
          "native_address" : "0x101676e05",
          "native_offset" : "0x2b5",
          "native_image_offset" : "0x2e2e05",
          "unmanaged_name" : "WKS::gc_heap::mark_ro_segments()",
          "native_module" : "libcoreclr.dylib"
         },
    

    The native_image_offset is potentially useful, it might led us to the instruction where it failed, but I am not sure how to proceed from there.

  11. jaredpar commented on Jan 19, 2024

    @jaredpar
    MemberAuthor

    Do we know how to read the dump? When I tried to open the dump in Visual Studio, it complained wrong file format.

    My understanding from chatting with @hoyosjs is that Mac dumps are only openable on Mac.

    We certainly can disable region using DOTNET_GCName=clrgc, this should work on any platforms.

    I queued up a PR that disables this for Linux. That should be fairly apples to apples with our Mac runs. If it does crash the dump should upload cause it doesn't have the same size issues that Mac's do.

  12. jaredpar commented on Jan 19, 2024

    @jaredpar
    MemberAuthor

    Got a complete run on Linux with DOTNET_GCName=libclrgc.so and everything passed.

  13. 52 remaining items

  14. mangod9 commented on Jun 28, 2024

    @mangod9
    Member

    I think the challenge has been lack of dumps from MacOS, hence @cshung had added some logging to diagnose, but if the issue is not reproing we cant investigate further (unless there is a way to move the toolset back to 8 and try to repro)

  15. agocke commented on Jun 28, 2024

    @agocke
    Member

    It seems like you could manually queue a run with that change.

  16. cshung commented on Jun 28, 2024

    @cshung
    Contributor

    I am more than happy to try to figure out what is wrong here.

    What I can do:

    1. Prepare a libclrgc.dylib that has the instrumentation allow me to figure out what is going on.
    2. Prepare a libclrgc.dylib that crashes on a GC, so we can test if we can get it to work or not.
    3. Figure out what is going on after I get back the log together with the faulting process.

    What I don't know how to:

    1. Queue a run with a modified libclrgc.dylib, and
    2. Find out the associated logs when a crash happened

    @jaredpar and I used to have a branch here where I can update and push a libclrgc.dylib and run, and through some web UI I was able to get back to log. Unfortunately, by the time we have got these setup, the crash no longer repros and there was nothing that we can do at that point. If we could get it to repro again that would be great.

    I don't know if it is feasible, but it would be great to be able to freeze the Roslyn code and the dotnet used for running so that the bug will hopefully not suddenly go away by itself.

  17. agocke commented on Jun 28, 2024

    @agocke
    Member

    Once you authenticate you can queue a run against any branch you want.
    image

    All you should need to do is take your commits so far, find a Roslyn commit before the SDK update that stopped the failure, reapply the commits on top of Roslyn at that point, then push that branch to dotnet/roslyn (not your fork). Then you will be able to queue a build from the UI.

  18. modified the milestones: 9.0.0, 10.0.0 on Aug 22, 2024
  19. modified the milestones: 10.0.0, Future on Jul 7, 2025
  20. janvorli commented on Jul 9, 2026

    @janvorli
    Member

    @jaredpar is this bug still relevant? I am going through the backlog trying to close issues that are obsolete.

  21. jaredpar commented on Jul 21, 2026

    @jaredpar
    MemberAuthor

    @janvorli this can be closed if you like.

  22. locked and limited conversation to collaborators on Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status
      No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions