[Diagnostics] InProc CrashReporter Deferred Symbolication#128937
Open
mdh1418 wants to merge 1 commit into
Open
[Diagnostics] InProc CrashReporter Deferred Symbolication#128937mdh1418 wants to merge 1 commit into
mdh1418 wants to merge 1 commit into
Conversation
Replace the fully symbolicated managed console/logcat frame (Namespace.Class.Method + 0xIL (token=0xTOK)) with the compact, tombstone-like form '#NN [moduleIdx] 0x<token> 0x<il>'. Drop the resolved method name and the process-dynamic JIT IP / native offset from managed console lines, keeping only the stable offline keys (module index -> MVID via the modules: table, MethodDef token, IL offset). The line stops after the token when the IL offset is unavailable, and a sentinel IL-offset value (CRASHREPORT_NO_IL_OFFSET) disambiguates a genuine IL offset of 0 from a resolution failure. The token==0 case keeps a raw 0x<IP> so dynamic-method/IL-stub frames stay locatable. The JSON report is unchanged and remains the authoritative store. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the in-proc crash reporter’s console/log output to use a compact “tombstone-style” managed-frame format geared toward deferred/offline symbolication, while keeping the JSON report’s managed naming data intact. It also introduces an IL-offset sentinel so an actual IL offset of 0 remains distinguishable from “unavailable” at the collection layer.
Changes:
- Introduces
CRASHREPORT_NO_IL_OFFSET(0xFFFFFFFFu) and uses it as the default IL-offset value until a native→IL mapping succeeds. - Changes console frame emission to print module index + MethodDef token (+ optional IL offset) instead of resolved
Class.Methodnames, and omits native offset/address details for managed token frames. - Maps the IL-offset sentinel to
0in JSON output to keep the JSON schema stable while still supporting the compact console format.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/coreclr/vm/crashreportstackwalker.cpp | Initializes ilOffset with the new sentinel and preserves best-effort behavior when IL mapping fails. |
| src/coreclr/debug/crashreport/inproccrashreporter.h | Adds CRASHREPORT_NO_IL_OFFSET constant and documents its purpose/convention. |
| src/coreclr/debug/crashreport/inproccrashreporter.cpp | Implements compact console grammar (token/IL offset) and maps sentinel IL offset to 0 for JSON output. |
Comment on lines
+1516
to
+1517
| if (token != 0) | ||
| { |
Comment on lines
+65
to
+68
| // #NN [<moduleIndex>] 0xTOKEN 0xILOFFSET (managed frame; deferred symbolication) | ||
| // #NN [<moduleIndex>] 0xTOKEN (managed frame; IL offset unavailable) | ||
| // #NN (in <name>) 0xTOKEN 0xILOFFSET (overflow form: module didn't fit the table) | ||
| // #NN [<moduleIndex>] 0xIP (no method token: raw IP fallback) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Compact, tombstone-style frames for the in-proc crash reporter (deferred symbolication)
The in-proc crash reporter (mobile-only, FEATURE_INPROC_CRASHREPORT) currently writes fully-resolved managed frames — Class.Method + 0xILOFFSET (token=0xTOKEN) — to the console/logcat. On Android, logcat is byte-budgeted and rolls over oldest-first, so verbose frames evict earlier frames and can truncate the crashing stack. Android's own native tombstones address this by emitting unsymbolicated frames and leaving symbolication to an offline tool.
This change makes the console report compact by deferring symbolication: each managed frame emits only the stable identifiers an offline tool needs (module index → MVID, MethodDef token, IL offset). Human-readable names are retained in full in the JSON report, which remains the authoritative, post-mortem store.
Before:
After:
Design / scope notes
Validation