Repository navigation
RUM-16390: Fall back to per-thread stack capture when getAllStackTraces fails - #4111
ambushwork wants to merge 1 commit into
Conversation
…es fails Thread.getAllStackTraces() is all-or-nothing: one failing thread drops every stack. Add safeGetAllStackTraces in dd-sdk-android-internal, which falls back to enumerating the root ThreadGroup and reading each thread's stack separately, skipping threads that fail. Use it in the profiling ThreadDumper and the RUM ANRDetectorRunnable.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
What does this PR do?
Makes thread stack capture tolerant of failures. A new shared helper,
safeGetAllStackTraces, lives indd-sdk-android-internal:Thread.getAllStackTraces()first.ThreadGroupand reads each thread'sstackTracein its own try/catch. A thread that fails is skipped, and the failure goes to anonErrorcallback, which callers log throughInternalLogger(onlyOnce).Two places now use it:
ThreadDumper: still drops the main thread and empty stacks.ANRDetectorRunnable: the ANR report now uses the stack snapshots it captured instead of reading the stacks a second time.The new throwing calls are declared in
detekt_custom_unsafe_calls.yml(kept sorted), and the internal module's API files are regenerated. No customer-facing API changes.