Skip to content

Fix SSI crashing on apache reload; add SSI int tests for appsec#3724

Merged
cataphract merged 1 commit intomasterfrom
glopes/ssi-fixes
Mar 25, 2026
Merged

Fix SSI crashing on apache reload; add SSI int tests for appsec#3724
cataphract merged 1 commit intomasterfrom
glopes/ssi-fixes

Conversation

@cataphract
Copy link
Copy Markdown
Contributor

Description

  • Adding SSI tests to the appsec integration tests
  • Fix crash that was found after apache reload

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@cataphract cataphract requested review from a team as code owners March 24, 2026 19:00
@datadog-datadog-prod-us1

This comment has been minimized.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.78%. Comparing base (a1bb038) to head (257bc70).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3724      +/-   ##
==========================================
- Coverage   68.81%   68.78%   -0.03%     
==========================================
  Files         166      166              
  Lines       19030    19015      -15     
  Branches     1797     1792       -5     
==========================================
- Hits        13095    13079      -16     
- Misses       5121     5124       +3     
+ Partials      814      812       -2     
Flag Coverage Δ
helper-rust-integration 78.82% <ø> (-0.03%) ⬇️
helper-rust-unit 49.36% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
appsec/src/extension/ddtrace.c 65.07% <100.00%> (+2.22%) ⬆️

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1bb038...257bc70. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cataphract cataphract force-pushed the glopes/ssi-fixes branch 2 times, most recently from f776374 to 1d252ef Compare March 24, 2026 22:25
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Mar 24, 2026

Benchmarks [ appsec ]

Benchmark execution time: 2026-03-25 14:25:16

Comparing candidate commit 2ffb2e0 in PR branch glopes/ssi-fixes with baseline commit a1bb038 in branch master.

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

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Mar 24, 2026

Benchmarks [ tracer ]

Benchmark execution time: 2026-03-25 13:25:13

Comparing candidate commit 2ffb2e0 in PR branch glopes/ssi-fixes with baseline commit a1bb038 in branch master.

Found 2 performance improvements and 3 performance regressions! Performance is the same for 187 metrics, 2 unstable metrics.

scenario:ComposerTelemetryBench/benchTelemetryParsing

  • 🟩 execution_time [-1423.401ns; -576.599ns] or [-7.225%; -2.927%]

scenario:EmptyFileBench/benchEmptyFileBaseline

  • 🟥 execution_time [+122.449µs; +360.051µs] or [+3.971%; +11.677%]

scenario:MessagePackSerializationBench/benchMessagePackSerialization

  • 🟥 execution_time [+5.769µs; +6.611µs] or [+5.633%; +6.454%]

scenario:MessagePackSerializationBench/benchMessagePackSerialization-opcache

  • 🟥 execution_time [+7.112µs; +8.328µs] or [+6.874%; +8.049%]

scenario:TraceSerializationBench/benchSerializeTrace-opcache

  • 🟩 execution_time [-14.961µs; -7.439µs] or [-4.316%; -2.146%]

@cataphract cataphract force-pushed the glopes/ssi-fixes branch 6 times, most recently from 5cbfc9b to 257bc70 Compare March 25, 2026 15:19
Copy link
Copy Markdown
Contributor

@Leiyks Leiyks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me 👌

@cataphract cataphract merged commit 10064f5 into master Mar 25, 2026
21 checks passed
@cataphract cataphract deleted the glopes/ssi-fixes branch March 25, 2026 15:53
@github-actions github-actions Bot added profiling Relates to the Continuous Profiler tracing area:asm labels Mar 25, 2026
@github-actions github-actions Bot added this to the 1.18.0 milestone Mar 25, 2026
for (unsigned int i = 0; i < sizeof(ddloader_injected_ext_config) / sizeof(ddloader_injected_ext_config[0]); ++i) {
if (ddloader_injected_ext_config[i].so_handle) {
DL_UNLOAD(ddloader_injected_ext_config[i].so_handle);
ddloader_injected_ext_config[i].so_handle = NULL;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's odd. Isn't ddtrace_shutdown going to be executed after the loader extension shutdown? zend_extension is destroyed in order of registration according to zend_shutdown_extensions.

Copy link
Copy Markdown
Contributor Author

@cataphract cataphract Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, unfortunately I think this latest iteration is not crashing just by accident. The mshutdown of ddtrace doesn't crash because ddtrace.so is still loaded even after the dlclose, but of course that's just a variant on the initial bug. I can reproduce the crash on 8.3-debug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:asm profiling Relates to the Continuous Profiler tracing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants