Skip to content

Implement UnhandledException hook for finalizer scenario in Mono.#118563

Merged
VSadov merged 11 commits into
dotnet:mainfrom
VSadov:unhMono
Aug 19, 2025
Merged

Implement UnhandledException hook for finalizer scenario in Mono.#118563
VSadov merged 11 commits into
dotnet:mainfrom
VSadov:unhMono

remove no longer relevant comment

a6605c2
Select commit
Loading
Failed to load commit list.
Build Analysis / Build Analysis succeeded Aug 18, 2025 in 0s

.NET Result Analysis

Details

‼️ Build Analysis Check Result has been manually overridden

  • The build analysis check result has been updated by the user for the following reason: LLVMFULLAOT failure in Regression_2 is unrelated. Happens without this change as well (see: NOOP change in https://github.com//pull/118642)
  • The check result has changed from Failure to Success

Tip

To unconditionally bypass the build analysis check (turn it green), you can use the escape mechanism feature. The completion time may vary, potentially taking several minutes, depending on the build analysis workload at the moment.

⚠️ The following pipeline(s) will not be analyzed as has been explicited excluded from analysis

Known test errors

Test Failures (2 tests failed)

🔹 [All failing tests from runtime-llvm]

    baseservices/exceptions/UnhandledExceptionHandler/Foreign/ForeignUnhandled/ForeignUnhandled.cmd [Console] [Details] [Artifacts] [0.04% failure rate]
    [ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]

    Failing Configuration

    Exception Message
    =================================================================
    	External Debugger Dump:
    =================================================================
    /datadisks/disk1/work/B4BE0986/w/B07D09DE/e/baseservices/exceptions/baseservices-exceptions/../UnhandledExceptionHandler/Foreign/ForeignUnhandled/ForeignUnhandled.sh: line 470:  5577 Aborted                 (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"
    

    Return code: 1
    Raw output file: /datadisks/disk1/work/B4BE0986/w/B07D09DE/uploads/UnhandledExceptionHandler/Foreign/ForeignUnhandled/output.txt
    Raw output:
    BEGIN EXECUTION
    /datadisks/disk1/work/B4BE0986/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true ForeignUnhandled.dll ''
    Failed to load AOT module '/datadisks/disk1/work/B4BE0986/w/B07D09DE/e/baseservices/exceptions/UnhandledExceptionHandler/Foreign/ForeignUnhandled/ForeignUnhandled.dll.so' ('/datadisks/disk1/work/B4BE0986/w/B07D09DE/e/baseservices/exceptions/UnhandledExceptionHandler/Foreign/ForeignUnhandled/ForeignUnhandled.dll') in aot-only mode.

    =================================================================
    Native Crash Reporting

    Got a SIGABRT while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries
    used by your application.

    =================================================================
    Native stacktrace:

    0x79364e6bcb3f - Unknown
    0x79364e65d0ce - Unknown
    0x79364e6bc3c1 - Unknown
    0x79364f43dc90 - Unknown
    0x79364f48e104 - Unknown
    0x79364f43dbde - Unknown
    0x79364f426832 - Unknown
    0x79364e785fd4 - Unknown
    0x79364e793c36 - Unknown
    0x79364e786386 - Unknown
    0x79364e7864be - Unknown
    0x79364e642e7e - Unknown
    0x79364e7aadf8 - Unknown
    0x79364e7aa8ca - Unknown
    0x79364e61e626 - Unknown
    0x79364e699ae7 - Unknown
    0x5f7e7bd7be19 - Unknown
    0x79364f427efb - Unknown
    0x79364f427fbb - Unknown
    0x5f7e7bd78a7a - Unknown
    

    =================================================================
    Basic Fault Address Reporting

    Memory around native instruction pointer (0x79364f48e104):0x79364f48e0f4 05 00 44 89 f2 89 de 89 c7 b8 ea 00 00 00 0f 05 ..D.............
    0x79364f48e104 89 c3 f7 db 3d 00 f0 ff ff b8 00 00 00 00 0f 47 ....=..........G
    0x79364f48e114 c3 48 83 c4 18 5b 41 5c 41 5d 41 5e 41 5f 5d c3 .H...[AA]A^A_].
    0x79364f48e124 0f 1f 40 00 4c 89 ef e8 60 ae ff ff e9 55 ff ff ..@.L...`....U..

    =================================================================
    Managed Stacktrace:

    =================================================================
    Expected: 100
    Actual: 134
    END EXECUTION - FAILED
    Test failed. Trying to see if dump file was created in /datadisks/disk1/dumps since 8/18/2025 12:07:15 PM
    Test Harness Exitcode is : 1
    To run the test:
    Set up CORE_ROOT and run.
    > /datadisks/disk1/work/B4BE0986/w/B07D09DE/e/baseservices/exceptions/baseservices-exceptions/../UnhandledExceptionHandler/Foreign/ForeignUnhandled/ForeignUnhandled.sh

    CallStack
       at Xunit.Assert.True(Nullable`1 condition, String userMessage)
       at Xunit.Assert.True(Boolean condition, String userMessage)
       at TestLibrary.OutOfProcessTest.RunOutOfProcessTest(String assemblyPath, String testPathPrefix)
       at Program.<<Main>$>g__TestExecutor10|0_11(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass0_0& )
    baseservices/exceptions/UnhandledExceptionHandler/PInvoke/PInvokeUnhandled/PInvokeUnhandled.cmd [Console] [Details] [Artifacts] [0.04% failure rate]
    [ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]

    Failing Configuration

    Exception Message
    =================================================================
    	External Debugger Dump:
    =================================================================
    /datadisks/disk1/work/B4BE0986/w/B07D09DE/e/baseservices/exceptions/baseservices-exceptions/../UnhandledExceptionHandler/PInvoke/PInvokeUnhandled/PInvokeUnhandled.sh: line 470:  5600 Aborted                 (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"
    

    Return code: 1
    Raw output file: /datadisks/disk1/work/B4BE0986/w/B07D09DE/uploads/UnhandledExceptionHandler/PInvoke/PInvokeUnhandled/output.txt
    Raw output:
    BEGIN EXECUTION
    /datadisks/disk1/work/B4BE0986/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true PInvokeUnhandled.dll ''
    Failed to load AOT module '/datadisks/disk1/work/B4BE0986/w/B07D09DE/e/baseservices/exceptions/UnhandledExceptionHandler/PInvoke/PInvokeUnhandled/PInvokeUnhandled.dll.so' ('/datadisks/disk1/work/B4BE0986/w/B07D09DE/e/baseservices/exceptions/UnhandledExceptionHandler/PInvoke/PInvokeUnhandled/PInvokeUnhandled.dll') in aot-only mode.

    =================================================================
    Native Crash Reporting

    Got a SIGABRT while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries
    used by your application.

    =================================================================
    Native stacktrace:

    0x779e7ccbcb3f - Unknown
    0x779e7cc5d0ce - Unknown
    0x779e7ccbc3c1 - Unknown
    0x779e7da3dc90 - Unknown
    0x779e7da8e104 - Unknown
    0x779e7da3dbde - Unknown
    0x779e7da26832 - Unknown
    0x779e7cd85fd4 - Unknown
    0x779e7cd93c36 - Unknown
    0x779e7cd86386 - Unknown
    0x779e7cd864be - Unknown
    0x779e7cc42e7e - Unknown
    0x779e7cdaadf8 - Unknown
    0x779e7cdaa8ca - Unknown
    0x779e7cc1e626 - Unknown
    0x779e7cc99ae7 - Unknown
    0x5c2f73812e19 - Unknown
    0x779e7da27efb - Unknown
    0x779e7da27fbb - Unknown
    0x5c2f7380fa7a - Unknown
    

    =================================================================
    Basic Fault Address Reporting

    Memory around native instruction pointer (0x779e7da8e104):0x779e7da8e0f4 05 00 44 89 f2 89 de 89 c7 b8 ea 00 00 00 0f 05 ..D.............
    0x779e7da8e104 89 c3 f7 db 3d 00 f0 ff ff b8 00 00 00 00 0f 47 ....=..........G
    0x779e7da8e114 c3 48 83 c4 18 5b 41 5c 41 5d 41 5e 41 5f 5d c3 .H...[AA]A^A_].
    0x779e7da8e124 0f 1f 40 00 4c 89 ef e8 60 ae ff ff e9 55 ff ff ..@.L...`....U..

    =================================================================
    Managed Stacktrace:

    =================================================================
    Expected: 100
    Actual: 134
    END EXECUTION - FAILED
    Test failed. Trying to see if dump file was created in /datadisks/disk1/dumps since 8/18/2025 12:07:22 PM
    Test Harness Exitcode is : 1
    To run the test:
    Set up CORE_ROOT and run.
    > /datadisks/disk1/work/B4BE0986/w/B07D09DE/e/baseservices/exceptions/baseservices-exceptions/../UnhandledExceptionHandler/PInvoke/PInvokeUnhandled/PInvokeUnhandled.sh

    CallStack
       at Xunit.Assert.True(Nullable`1 condition, String userMessage)
       at Xunit.Assert.True(Boolean condition, String userMessage)
       at TestLibrary.OutOfProcessTest.RunOutOfProcessTest(String assemblyPath, String testPathPrefix)
       at Program.<<Main>$>g__TestExecutor14|0_15(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass0_0& )

Was this helpful? Yes No