[10.0-preview7] Serialize unhandled exception for crash dump analysis when ExceptionHandler.RaiseUnhandledExceptionEvent is called#117913
Conversation
…andler.RaiseUnhandledExceptionEvent is called (dotnet#117832) * Serialize unhandled exception for crash dump analysis when ExceptionHandler.RaiseUnhandledExceptionEvent is called * Use cheaper locking mechanism for SerializeCrashInfo * Remove superfluous assignment * Apply suggestions from code review Co-authored-by: Jan Kotas <[email protected]> * Block secondary calls to SerializeCrashInfo until the data has been serialized (prevents early process exit) * Update src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeExceptionHelpers.cs * Update src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeExceptionHelpers.cs --------- Co-authored-by: Jan Kotas <[email protected]>
There was a problem hiding this comment.
Pull Request Overview
This PR ports crash dump analysis improvements from main to the .NET 10 Preview 7 branch. The changes serialize unhandled exception information for crash dump analysis when ExceptionHandler.RaiseUnhandledExceptionEvent is called and implement a blocking mechanism to prevent early process exit during serialization.
Key changes:
- Adds crash info serialization for unhandled exceptions in NativeAOT scenarios
- Refactors crash info serialization into a reusable method with thread-safe coordination
- Implements blocking behavior to ensure crash data serialization completes before process termination
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/libraries/System.Private.CoreLib/src/System/AppContext.cs | Adds call to serialize crash info when unhandled exceptions occur in NativeAOT |
| src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeExceptionHelpers.cs | Refactors crash info serialization into reusable method with thread coordination and updates FailFast to use the new approach |
src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeExceptionHelpers.cs
Show resolved
Hide resolved
src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeExceptionHelpers.cs
Show resolved
Hide resolved
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
|
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas |
|
@tommcdon please take a look at the failures in ci. once ready, I can help merge |
3836b79
into
dotnet:release/10.0-preview7
Port #117832 from main to .NET 10 Preview 7 branch