feat(crashtracking): GOT patch sigaction - #2448
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
📚 Documentation Check Results📦
|
🔒 Cargo Deny Results📦
|
| oldact: *mut libc::sigaction, | ||
| ) -> libc::c_int { | ||
| // Check if this signal is one we monitor. | ||
| if (0..64).contains(&signum) |
There was a problem hiding this comment.
I don't like this but clippy wont let me make the inverse check. Havent checked but probably compiles down to the same thing
|
✅ All CI checks and tests passed. 🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 6f13ff4 | Docs | View more details | Give us feedback! |
BenchmarksComparisonBenchmark execution time: 2026-09-03 18:07:46 Comparing candidate commit 6f13ff4 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics.
|
| cpu_model | git_commit_sha | git_commit_date | git_branch |
|---|---|---|---|
| Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz | 6f13ff4 | 1788457207 | gyuheon0h/PROF-15892-sigaction-got |
| scenario | metric | min | mean ± sd | median ± mad | p75 | p95 | p99 | max | peak_to_median_ratio | skewness | kurtosis | cv | sem | runs | sample_size |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| receiver_entry_point/report/2644 | execution_time | 6.343ms | 6.385ms ± 0.022ms | 6.383ms ± 0.014ms | 6.396ms | 6.422ms | 6.448ms | 6.470ms | 1.36% | 0.910 | 1.563 | 0.34% | 0.002ms | 1 | 200 |
| scenario | metric | 95% CI mean | Shapiro-Wilk pvalue | Ljung-Box pvalue (lag=1) | Dip test pvalue |
|---|---|---|---|---|---|
| receiver_entry_point/report/2644 | execution_time | [6.382ms; 6.388ms] or [-0.047%; +0.047%] | None | None | None |
Baseline
Baseline benchmark details
Group 1
| cpu_model | git_commit_sha | git_commit_date | git_branch |
|---|---|---|---|
| Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz | 13c5242 | 1788458243 | main |
| scenario | metric | min | mean ± sd | median ± mad | p75 | p95 | p99 | max | peak_to_median_ratio | skewness | kurtosis | cv | sem | runs | sample_size |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| receiver_entry_point/report/2644 | execution_time | 6.339ms | 6.388ms ± 0.020ms | 6.384ms ± 0.015ms | 6.402ms | 6.422ms | 6.439ms | 6.445ms | 0.95% | 0.289 | -0.308 | 0.32% | 0.001ms | 1 | 200 |
| scenario | metric | 95% CI mean | Shapiro-Wilk pvalue | Ljung-Box pvalue (lag=1) | Dip test pvalue |
|---|---|---|---|---|---|
| receiver_entry_point/report/2644 | execution_time | [6.385ms; 6.390ms] or [-0.044%; +0.044%] | None | None | None |
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
8440a0f to
070422d
Compare
070422d to
6f13ff4
Compare

What does this PR do?
Intercepts sigaction calls with
hook_symbolGOT patching so the crashtracker can detect when application code overwrites a monitored signal handler after initialization.The hook covers all callers including the statically-linked test binary; internal
sigactioncalls fromchain_signal_handler(which runs inside the signal handler) are safe because SIG_DFL/SIG_IGN handlers are filtered out before any async work is attempted (this is done before thehook_symbolanyways), and the hook always forwards using the stored original function pointer rather than through a GOT entry so there.Motivation
Some runtimes may overwrite our handlers. It would be good to know when this is happening.
Additional Notes
This is a stacked PR. This change is minimal -- just adding the patch, and printing out. Sending actual telemetry is done feat(crashtracking): send telemetry if instrumented application sigactions our signal
How to test the change?
Describe here in detail how the change can be validated.