libdatadog update to c79d783f#3983
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f826cc728b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| @@ -1 +1 @@ | |||
| Subproject commit 6760faaeeda1cfcf634410105f93cf7149265592 | |||
| Subproject commit c79d783f79f4a2d1e637906f3323600c6e2b5b17 | |||
There was a problem hiding this comment.
Regenerate the sidecar FFI signature
This libdatadog bump changes ddog_sidecar_session_set_config by inserting retry_interval_milliseconds after flush_interval_milliseconds, but the checked-in components-rs/sidecar.h and the call in ext/sidecar.c still use the old argument list. Because C compiles against the stale header, this will not be caught at compile time; at runtime the new Rust FFI function will read every argument after the flush interval in the wrong slot, so normal sidecar startup can misconfigure intervals/sizes and eventually interpret non-pointer values as strings or callbacks. Please regenerate/update the header and pass the new retry interval at the call site as part of this bump.
Useful? React with 👍 / 👎.
| AssignmentReason::Static => REASON_STATIC, | ||
| AssignmentReason::TargetingMatch => REASON_TARGETING_MATCH, | ||
| AssignmentReason::Split => REASON_SPLIT, | ||
| AssignmentReason::Default => REASON_DEFAULT, |
There was a problem hiding this comment.
Handle invalid flag configs as defaults
The new libdatadog revision also adds EvaluationError::FlagConfigurationInvalid, which get_assignment can return for a requested flag whose per-flag config is invalid/unsupported; upstream FFE FFI maps that case to DEFAULT with no error so callers get their supplied default. This wrapper only added the new assignment reason, while the error match below still sends the new error through _ => (ERROR_GENERAL, REASON_ERROR), so those flags will now surface as evaluation errors instead of default evaluations. Please add an explicit arm for the new error variant.
Useful? React with 👍 / 👎.
|
Benchmarks [ tracer ]Benchmark execution time: 2026-06-14 09:38:52 Comparing candidate commit d3d1bae in PR branch Found 1 performance improvements and 1 performance regressions! Performance is the same for 191 metrics, 1 unstable metrics.
|
Automated update by CI pipeline https://gitlab.ddbuild.io/DataDog/apm-reliability/dd-trace-php/-/pipelines/118645863 Full CI result: ❌ 15 job(s) failed
122e2ec to
3a44de2
Compare
Automated update by CI pipeline https://gitlab.ddbuild.io/DataDog/apm-reliability/dd-trace-php/-/pipelines/118651636 Full CI result: ❌ 606 job(s) failed
Summary
Automated update of the libdatadog submodule to the latest HEAD.
$LIBDATADOG_PINNED_SHAc79d783f79f4a2d1e637906f3323600c6e2b5b17Full CI result: ❌ 606 job(s) failed
CI pipeline: https://gitlab.ddbuild.io/DataDog/apm-reliability/dd-trace-php/-/pipelines/118651636
libdatadog Integration Report
libdatadog SHA: c79d783f79f4a2d1e637906f3323600c6e2b5b17
Analysis date: 2026-06-14
Overall status
A single libdatadog FFI signature change is responsible for the entire failure set.
One new parameter (
retry_interval_milliseconds) was added toddog_sidecar_session_set_config. The committed C header and the C caller wereadapted to the new signature.
Build & test summary
error[E…]),no
cannot find, nomismatched types, no unresolved imports in any trace.Both the Rust workspace and the C extensions built successfully — test jobs ran,
which means the prebuilt
.so/packages they install were produced by passingbuild jobs.
31 of the captured traces show
Segmentation fault/ exit code 139 /core dumped. No Rust panics appear anywhere (nopanicked, noRUST_BACKTRACE, nothread '…'). A segfault with no panic is the signature ofmemory corruption at the C↔Rust boundary, not a logic bug inside Rust.
x-profiling phpt tests on alpine— all PHP versions 7.1–8.5 segfault.test_distributed_tracing— segfaults with bothsidecar_trace_sender=0and=1.appsec integration tests(incl. helper-rust) —composer installitselfcore-dumps (
/tmp/cores/core.php.*), failing ~194 tests per job.system_tests(appsec_api_security, runtime_activation, crossed_tracing) —segfault during
install_ddtrace.sh.client_init_sidecar.phpt— the one extension test thatactivates the sidecar — fails.
passes 345/346 (only
client_init_sidecarfails). If this were a broad ABI/header break, those extension tests would crash en masse; they do not. This
localized the regression to the sidecar configuration path.
The remaining ~600 web/integration/language test failures are downstream of the
same crash: every traced PHP process connects to the sidecar at startup via
dd_sidecar_post_connect(), which calls the corrupted function, so the processcrashes before tests can pass.
Non-trivial changes made
Root cause
libdatadog commit
aceec12b1— feat(sidecar): add retry interval configuration(#2106) — added a new parameter to the exported FFI function
ddog_sidecar_session_set_config(inlibdatadog/datadog-sidecar-ffi/src/lib.rs):The dd-trace-php side ships a committed, hand-checked-in cbindgen header
(
components-rs/sidecar.h) that is not regenerated during the build (cbindgenonly runs via the manual
make cbindgentarget). The header therefore stilldeclared the old parameter list, and
ext/sidecar.ccalled the function with theold argument list.
Because C does not validate argument count against the actual symbol, this
compiles and links cleanly, but at runtime every argument after
flush_interval_millisecondsis passed in the wrong register/stack slot. Inparticular the pointer arguments (
remote_config_products,remote_config_capabilities, theEndpoint/Vec<Tag>references) receiveshifted, garbage values, which the sidecar then dereferences — producing the
SIGSEGV seen across every trace-sending job.
Fix
Adapted both the header declaration and the single call site to the new signature,
passing
100for the retry interval, which matches libdatadog's prior hardcodeddefault (
RetryStrategy::default()usesDuration::from_millis(100)inlibdatadog/libdd-trace-utils/src/send_with_retry/retry_strategy.rs), so runtimebehavior is preserved.
components-rs/sidecar.h— addeduint32_t retry_interval_milliseconds,betweenflush_interval_millisecondsand
remote_config_poll_interval_millisin theddog_sidecar_session_set_configdeclaration.ext/sidecar.c— added the100argument (trace-send retry interval, inms) at the corresponding position in the
ddog_sidecar_session_set_config(...)call inside
dd_sidecar_post_connect(). The full call now alignsparameter-for-parameter with the new Rust signature.
ext/sidecar.cis the only caller in the repository, andcomponents-rs/sidecar.his the only declaration; no other copies exist.
Audit of other headers (no changes needed)
The remaining committed FFI headers were compared against the new libdatadog
source. No ABI-affecting changes were found:
common.h/telemetry.h(libdd-common-ffi, libdd-telemetry-ffi):ddog_Error,ddog_Vec_U8,CharSlice,Slice,Option_*,Timespec,Method,MetricType, etc. all match. The#2029"align tracer FFI error/response types"change affects
libdd-data-pipeline-ffi, which is not consumed via these headers.crashtracker.h(libdd-crashtracker-ffi):Config,ReceiverConfig,Metadata,RuntimeStackFrame(constructed by value inext/crashtracking_frames.c/ext/signals.c) all match. The "flatten threads"/ "frame count" changes are in the internal crash-report serialization, not the
C FFI surface.
library-config.h,live-debugger.h: all#[repr(C)]structs/enums andsignatures match.
ddog_Probe(copied by value intracer/live_debugger.c) isunchanged.
datadog.h/ rest ofsidecar.h: no other signature mismatches found.Identified libdatadog issues
None identified. The breaking change (#2106) is a legitimate, intentional API
evolution; the failure was on the dd-trace-php side because the committed cbindgen
header had not been regenerated. Note for maintainers: after merging, regenerate
all headers with
make cbindgento catch any further drift, since the build doesnot do this automatically.
Flaky / ignored failures
None clearly attributable to flakiness. All 606 failures are consistent with the
single sidecar-config ABI break (crash on sidecar connect, which every traced
process performs). Once the signature is corrected the crash is removed; any
residual failures after a re-run would need separate triage, but no independent
failure cause was identified in the captured traces.
/cc @bwoebi