-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PROF-10656] Add faulting_address to crashtracker reports (#663)
* [PROF-10656] Add crash_address to crashtracker reports **What does this PR do?** While investigating a customer crash, I found that I dearly missed having the address that caused a segfault. E.g. given this code: ```c char *potato = 0x1234; fprintf(stderr, "Value of potato is %c\n", *potato); ``` ...I want to know that the crash was triggered when 0x1234 was dereferenced, as this information may be key in debugging the issue. We already get this information in our signal handler, so this PR just adds the needed piping to report it to datadog. **Motivation:** Improve debugging of crashes reported by crashtracker. **Additional Notes:** I added the `crash_address` as a tag, similar to `siginfo` and `signame`. We may want to send it as some other thing; no strong opinions there. **How to test the change?** I was able to test this with the Ruby profiler. I've been trying to update the tests but there's still some failing and I'm kinda struggling with that. Hopefully someone with a bit more rust-fu than me can help out there. * Update tests * Avoid allocating pretty-printed string for crash_adddress inside signal handler Instead, handle all the formatting on the final output. * Rename `crash_address` => `faulting_address`, as suggested in PR review * Minor: Move read of `sig_info` inside `handle_posix_signal_impl` On the off chance we ever ran into any issues here, let's make sure to run this bit of code AFTER we go through the `NUM_TIMES_CALLED` check. * Minor: Use `if let` instead of `match`
- Loading branch information
Showing
6 changed files
with
52 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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