appsec: fix bailouts during rshutdown#3941
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd5b17a39c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| import com.datadog.appsec.php.docker.LogFile | ||
| import com.datadog.appsec.php.docker.PhpFpm |
There was a problem hiding this comment.
Add the missing Docker helper classes
These new imports reference com.datadog.appsec.php.docker.LogFile and PhpFpm, but the commit does not add either class; a repo-wide rg shows the docker test package only contains the existing helpers (AppSecContainer, FailOnUnmatchedTraces, InspectContainerHelper, etc.). As a result, the appsec integration test sources that now import/use these helpers (NginxFpmTests, RoadRunnerTests, ZtsGshutdownTests, and the FPM sampling traits/classes) will fail to compile before any tests run.
Useful? React with 👍 / 👎.
|
fd5b17a to
d0d93de
Compare
After a successful command exchange (e.g. request_init), the helper has entered its inner request loop and is waiting for the matching request_shutdown. If _imsg_destroy() reports a msgpack framing error at that point, the code was returning dd_error. dd_error does not trigger dd_helper_close_conn(), so the connection stays open while the helper is blocked in the inner loop. On the next request the extension sends request_init into the inner loop, which the Rust helper treats as an unexpected command and aborts. Return dd_network instead, which causes the caller to close and abandon the connection. This keeps helper and extension state in sync even in the presence of malformed trailers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
d0d93de to
9cdff75
Compare
Benchmarks [ appsec ]Benchmark execution time: 2026-05-29 17:56:48 Comparing candidate commit 9cdff75 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. |
Description
Reviewer checklist