You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(crashtracking): collect all native stacks for unhandled exception and also crashing thread (#2155)
# What does this PR do?
Previously, when a runtime reported an unhandled exception, only the
runtime-provided stack trace was captured; no native stacks were
collected for any thread because `PR_SET_PTRACER` was not set for
unhandled exceptions. Additionally, when all-thread collection was
enabled for signal-based crashes, the crashing thread was excluded from
the threads array.
This change:
1. Enables native stack collection for all threads (including the
crashing thread) when reporting unhandled exceptions with
`collect_all_threads` enabled. The receiver now has the necessary ptrace
permissions to unwind every thread in the process.
2. Includes the crashing thread in the `error.threads` array (marked
with `crashed: true`) for both signal-based crashes and unhandled
exceptions. Its native stack is collected by the receiver using ptrace,
same as every other thread.
The runtime-provided stack remains in `error.stack` as the canonical
crash context, while `error.threads` provides a uniform native view of
all threads at the time of the crash.
This gives us two immediate benefits:
1. Unhandled exception crash reports now include native stacks for all
threads, providing visibility into what the process was doing at the OS
level; not just the managed runtime view.
2. The crashing thread's native stack is now collected in the receiver
alongside all other threads, establishing a path toward consolidating
all stack collection in the receiver process in the future.
# Motivation
What inspired you to submit this pull request?
# Additional Notes
Anything else we should know when reviewing?
# How to test the change?
Describe here in detail how the change can be validated.
0 commit comments