Repository navigation
Conversation
We also refactor the background sender to cleanly submit on its own separate state (telemetry for a different service directly), instead of having a dedicated connection and more hacks around that. This also fixes a bunch of thread-mode sidecar reconnect issues. Also fixing the RC notification issue. We also cleanup the crash-fd variable a bit to be more stable and less racy.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 4fce3a4 | Docs | View more details | Give us feedback! |
There was a problem hiding this comment.
Concurrent PHP thread shutdown and request initialization can erase a replacement signal connection while leaving its owner recorded, disabling termination flushing or macOS crash reporting.
🤖 Bits Code Review · Commit 21664dc
| static void dd_sidecar_disarm_signal_transport(ddog_SidecarTransport *owner) { | ||
| #ifndef _WIN32 | ||
| uintptr_t expected = (uintptr_t)owner; | ||
| if (owner && atomic_compare_exchange_strong(&dd_sidecar_signal_owner, &expected, 0)) { |
There was a problem hiding this comment.
Serialize signal teardown with ownership release
In a ZTS process, thread A can release signal ownership here, thread B can claim ownership and publish its connection during RINIT, and then A can clear B’s newly published connection. With Linux signal flushing enabled, this disables SIGTERM/SIGINT flushing and risks losing buffered traces; on macOS, it clears the crash-reporting FD. Subsequent RINITs cannot re-arm a healthy transport because B remains recorded as owner. Serialize connection clearing with ownership release, including the analogous failed-preparation path in dd_sidecar_arm_signal_transport; fixing teardown alone leaves that path vulnerable.
Was this helpful? React 👍 or 👎
🤖 Bits Code Review · Open Bits AI session
Benchmarks [ appsec ]Benchmark execution time: 2026-10-09 21:25:18 Comparing candidate commit 4fce3a4 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics.
|
- MSVC computed strlen() of the default service name before the NULL check in a conditional expression, crashing at connection setup whenever process tags are disabled (telemetry/config.phpt on every Windows job). Assign the slice in an if statement instead; same for the two other strlen() ternaries in exception_serialize.c and ffe.c. - Clear the signal handlers' published connection before releasing its ownership, in the teardown and in the failed-preparation path, so that a thread taking over cannot have its connection cleared. - The fork reconnection FFI moved into datadog-sidecar-ffi; bump libdatadog and regenerate the headers. - Use list() in the orphan test for PHP 7.0, and clang-format appsec. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Benchmarks [ tracer ]Benchmark execution time: 2026-10-09 22:10:34 Comparing candidate commit 4fce3a4 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 193 metrics, 0 unstable metrics.
|
We also refactor the background sender to cleanly submit on its own separate state (telemetry for a different service directly), instead of having a dedicated connection and more hacks around that.
This also fixes a bunch of thread-mode sidecar reconnect issues. Also fixing the RC notification issue.
We also cleanup the crash-fd variable a bit to be more stable and less racy.