Open v-wenyuxu opened 2 months ago
Tagging subscribers to this area: @dotnet/gc See info in area-owners.md if you want to be subscribed.
Failed in: runtime-coreclr jitstressregs 20240818.1
Failed tests:
coreclr osx arm64 Checked jitstressregs0x2000 @ OSX.1200.ARM64.Open
- profiler/handles/handles/handles.sh
Error message:
Assert failure(PID 1564 [0x0000061c], Thread: 18210 [0x4722]): (g_fEEShutDown&ShutDown_Finalize1) && GetThread() == FinalizerThread::GetFinalizerThread()
File: /Users/runner/work/1/s/src/coreclr/vm/appdomain.cpp:3661
Image: /private/tmp/helix/working/B24F0A0D/p/corerun
waitpid() returned successfully (wstatus 00000000) WEXITSTATUS 0 WTERMSIG 0
Unhandled exception. System.Exception: Profiler tests are expected to contain the text 'PROFILER TEST PASSES' in the console output of the profilee app to indicate a passing test. Usually it is printed from the Shutdown() method of the profiler implementation. This text was not found in the output above. Profilee returned exit code 134.
at Profiler.Tests.ProfilerTestRunner.FailFastWithMessage(String error)
at Profiler.Tests.ProfilerTestRunner.Run(String profileePath, String testName, Guid profilerClsid, String profileeArguments, ProfileeOptions profileeOptions, Dictionary`2 envVars, String reverseServerName, Boolean loadAsNotification, Int32 notificationCopies)
at Profiler.Tests.HandlesTests.Main(String[] args)
waitpid() returned successfully (wstatus 00000000) WEXITSTATUS 0 WTERMSIG 0
/private/tmp/helix/working/B24F0A0D/w/A66808DF/e/profiler/handles/handles/handles.sh: line 446: 1563 Abort trap: 6 (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"
Return code: 1
Raw output file: /tmp/helix/working/B24F0A0D/w/A66808DF/uploads/Reports/profiler.handles/handles/handles.output.txt
Raw output:
BEGIN EXECUTION
/tmp/helix/working/B24F0A0D/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true handles.dll ''
Profiler path: /private/tmp/helix/working/B24F0A0D/w/A66808DF/e/profiler/handles/handles/libProfiler.dylib
Profilee STDOUT: Profiler.dll!DllGetClassObject
Profilee STDOUT: Profiler.dll!Profiler::Initialize
Profilee STDOUT: Handles started. Control-C to exit
Profilee STDOUT: Worker thread started
Profilee STDOUT: Allocating Weak
Profilee STDOUT: Allocating Strong
Profilee STDOUT: Allocating Pinned
Profilee STDOUT: weak = 1-W
Profilee STDOUT: strong = 2-S
Profilee STDOUT: weak = 3-P
Profilee STDOUT: Collection #1
Profilee STDOUT: HandlesProfiler::ObjectAllocated: weak handle created.
Profilee STDOUT: HandlesProfiler::ObjectAllocated: strong handle created.
Profilee STDOUT: HandlesProfiler::ObjectAllocated: pinned handle created.
Profilee STDOUT: HandlesProfiler::CheckIfAlive(weak): object not alive as expected.
Profilee STDOUT: HandlesProfiler::CheckIfAlive(strong): object alive as expected (Profiler.Tests.TestClassForStrongHandle)
Profilee STDOUT: HandlesProfiler::CheckIfAlive(pinned): object alive as expected (Profiler.Tests.TestClassForPinnedHandle)
Profilee STDOUT: Collection #2
Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#1): pinned handle object address did not changed as expected.
Profilee STDOUT: HandlesProfiler::CheckIfAlive(strong): object alive as expected (Profiler.Tests.TestClassForStrongHandle)
Profilee STDOUT: HandlesProfiler::CheckIfAlive(pinned): object alive as expected (Profiler.Tests.TestClassForPinnedHandle)
Profilee STDOUT: Collection #3
Profilee STDOUT: Test Passed
Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#2): strong handle destroyed.
Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#2): pinned handle destroyed.
Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#3): Checking handles:
Profilee STDOUT: HandlesProfiler::CheckIfAlive(strong): object not alive as expected.
Profilee STDOUT: HandlesProfiler::CheckIfAlive(pinned): object not alive as expected.
Profilee STDOUT: [createdump] Gathering state for process 1564
Profilee STDOUT: [createdump] Crashing thread 4722 signal 6 (0006)
Profilee STDOUT: [createdump] Writing crash report to file /cores/coredump.1564.dmp.crashreport.json
Profilee STDOUT: [createdump] Crash report successfully written
Profilee STDOUT: [crea
Stack trace:
at profiler_handles._handles_handles_._handles_handles_sh()
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
@VSadov this looks like some kind of assert during finalization, can you take a look?
Seems like something with RaiseShutdownEvents
sequence.
I wonder what part of this assert did not actually hold. Only finalizer thread ever calls this function and the quit flag is set after setting up global ShutDown_Finalize1
.
Perhaps due to some race theGetThread() == FinalizerThread::GetFinalizerThread()
is not holding - i.e. something with identity of the finalizer thread was not right.
the failures that were reported are in completely different tests, but both times on osx-arm64.
Failed in: runtime-coreclr jitstress-isas-arm 20240810.1
Failed tests:
Error message:
Stack trace: