Skip to content

feat(crashtracking): GOT patch sigaction - #2496

Draft
gyuheon0h wants to merge 1 commit into
gyuheon0h/unpatch-gotterfrom
gyuheon0h/got-patch-sigaction
Draft

feat(crashtracking): GOT patch sigaction#2496
gyuheon0h wants to merge 1 commit into
gyuheon0h/unpatch-gotterfrom
gyuheon0h/got-patch-sigaction

Conversation

@gyuheon0h

@gyuheon0h gyuheon0h commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

bringing feat(crashtracking): GOT patch sigaction back

What does this PR do?

Intercepts sigaction calls with hook_symbol GOT 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 sigaction calls from chain_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 the hook_symbol anyways), 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 flipping a flag that isnt read anywhere. 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.

gyuheon0h commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@gyuheon0h gyuheon0h changed the title Revert "fix(crashtracking): revert "feat(crashtracking): GOT patch sigaction (#2448)" (#2495)" feat(crashtracking): GOT patch sigaction Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

📚 Documentation Check Results

⚠️ 1113 documentation warning(s) found

📦 libdd-crashtracker - 1113 warning(s)


Updated: 2026-09-11 18:31:20 UTC | Commit: d6edc74 | missing-docs job results

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🔒 Cargo Deny Results

No issues found!

📦 libdd-crashtracker - ✅ No issues


Updated: 2026-09-11 18:30:47 UTC | Commit: d6edc74 | dependency-check job results

@gyuheon0h
gyuheon0h force-pushed the gyuheon0h/unpatch-gotter branch from 424b097 to b789947 Compare September 9, 2026 19:01
@gyuheon0h
gyuheon0h force-pushed the gyuheon0h/got-patch-sigaction branch from 4180f3b to 4c9f499 Compare September 9, 2026 19:01
@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Sep 9, 2026

Copy link
Copy Markdown

Tests

All CI checks and tests passed.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 63.24%
Overall Coverage: 77.79% (+0.03%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 3dff449 | Docs | View more details | Give us feedback!

@pr-commenter

pr-commenter Bot commented Sep 9, 2026

Copy link
Copy Markdown

Benchmarks

Comparison

Benchmark execution time: 2026-09-11 18:40:30

Comparing candidate commit 3dff449 in PR branch gyuheon0h/got-patch-sigaction with baseline commit b5deb14 in branch gyuheon0h/unpatch-gotter.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

Candidate

Candidate benchmark details

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz 3dff449 1789151263 gyuheon0h/got-patch-sigaction
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.289ms 6.350ms ± 0.039ms 6.341ms ± 0.023ms 6.370ms 6.434ms 6.454ms 6.456ms 1.82% 0.891 0.214 0.62% 0.003ms 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.345ms; 6.355ms] or [-0.086%; +0.086%] 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 b5deb14 1789151262 gyuheon0h/unpatch-gotter
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.284ms 6.373ms ± 0.025ms 6.372ms ± 0.013ms 6.385ms 6.419ms 6.425ms 6.488ms 1.83% 0.361 2.748 0.40% 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.369ms; 6.377ms] or [-0.055%; +0.055%] None None None

@dd-octo-sts

dd-octo-sts Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 96.01 MB 96.02 MB +0% (+7.15 KB) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 9.02 MB 9.02 MB 0% (0 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 12.19 MB 12.19 MB +0% (+1.10 KB) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 107.42 MB 107.42 MB +0% (+6.87 KB) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 29.04 MB 29.04 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 96.08 KB 96.08 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 191.77 MB 191.77 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 818.18 MB 818.18 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 9.69 MB 9.69 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 96.08 KB 96.08 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 27.51 MB 27.51 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 55.57 MB 55.57 MB 0% (0 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 25.41 MB 25.41 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 97.58 KB 97.58 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 197.08 MB 197.08 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 800.48 MB 800.48 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 7.51 MB 7.51 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 97.58 KB 97.58 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 29.63 MB 29.63 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 52.55 MB 52.55 MB 0% (0 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 85.97 MB 85.97 MB +0% (+5.32 KB) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 10.03 MB 10.03 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 101.85 MB 101.86 MB +0% (+5.28 KB) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 12.25 MB 12.25 MB +0% (+896 B) 👌

@gyuheon0h
gyuheon0h force-pushed the gyuheon0h/got-patch-sigaction branch from 4c9f499 to b63b056 Compare September 11, 2026 16:57
@gyuheon0h
gyuheon0h force-pushed the gyuheon0h/unpatch-gotter branch from b789947 to 2603f92 Compare September 11, 2026 16:57
@gyuheon0h
gyuheon0h force-pushed the gyuheon0h/got-patch-sigaction branch from b63b056 to 16ba2cd Compare September 11, 2026 17:54
@gyuheon0h
gyuheon0h force-pushed the gyuheon0h/unpatch-gotter branch from 2603f92 to a7e16b3 Compare September 11, 2026 17:54
@gyuheon0h
gyuheon0h force-pushed the gyuheon0h/got-patch-sigaction branch from 16ba2cd to 3dff449 Compare September 11, 2026 18:29
@gyuheon0h
gyuheon0h force-pushed the gyuheon0h/unpatch-gotter branch from a7e16b3 to b5deb14 Compare September 11, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant