Skip to content

feat(sidecar)!: Add direct exec capabilities to the sidecar via dynamic linker#1980

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 9 commits into
mainfrom
bob/direct-exec
May 13, 2026
Merged

feat(sidecar)!: Add direct exec capabilities to the sidecar via dynamic linker#1980
gh-worker-dd-mergequeue-cf854d[bot] merged 9 commits into
mainfrom
bob/direct-exec

Conversation

@bwoebi
Copy link
Copy Markdown
Contributor

@bwoebi bwoebi commented May 12, 2026

Via -Wl,-e,ddog_spawn_direct_entry_body the sidecar can now be directly executed by invoking it via /lib64/ld-linux-*.so.2 (we read it from PT_INTERP).

This avoids memfd/tempfile and fexecve() shenanigans by default.

bwoebi and others added 7 commits May 11, 2026 20:18
Signed-off-by: Bob Weinand <[email protected]>
Signed-off-by: Bob Weinand <[email protected]>
Signed-off-by: Bob Weinand <[email protected]>
When searching for .o symbols to weaken cross reference only with
EXPORTED symbols from the php binary.
Signed-off-by: Bob Weinand <[email protected]>
@bwoebi bwoebi requested review from a team as code owners May 12, 2026 17:16
@bwoebi bwoebi changed the title Add direct exec capabilities to the sidecar via dynamic linker feat(sidecar)!: Add direct exec capabilities to the sidecar via dynamic linker May 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Clippy Allow Annotation Report

Comparing clippy allow annotations between branches:

  • Base Branch: origin/main
  • PR Branch: origin/bob/direct-exec

Summary by Rule

Rule Base Branch PR Branch Change
unwrap_used 6 6 No change (0%)
Total 6 6 No change (0%)

Annotation Counts by File

File Base Branch PR Branch Change
datadog-sidecar/src/config.rs 2 2 No change (0%)
datadog-sidecar/src/unix.rs 4 4 No change (0%)

Annotation Stats by Crate

Crate Base Branch PR Branch Change
clippy-annotation-reporter 5 5 No change (0%)
datadog-ffe-ffi 1 1 No change (0%)
datadog-ipc 21 21 No change (0%)
datadog-live-debugger 6 6 No change (0%)
datadog-live-debugger-ffi 10 10 No change (0%)
datadog-profiling-replayer 4 4 No change (0%)
datadog-remote-config 3 3 No change (0%)
datadog-sidecar 57 57 No change (0%)
libdd-common 13 13 No change (0%)
libdd-common-ffi 12 12 No change (0%)
libdd-data-pipeline 5 5 No change (0%)
libdd-ddsketch 2 2 No change (0%)
libdd-dogstatsd-client 1 1 No change (0%)
libdd-profiling 13 13 No change (0%)
libdd-telemetry 20 20 No change (0%)
libdd-tinybytes 4 4 No change (0%)
libdd-trace-normalization 2 2 No change (0%)
libdd-trace-obfuscation 8 8 No change (0%)
libdd-trace-stats 1 1 No change (0%)
libdd-trace-utils 15 15 No change (0%)
Total 203 203 No change (0%)

About This Report

This report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c33c315448

ℹ️ 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".

Comment thread spawn_worker/src/direct_entry.c Outdated
Comment thread spawn_worker/src/direct_entry.c Outdated
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 12, 2026

Codecov Report

❌ Patch coverage is 8.33333% with 264 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.51%. Comparing base (44e519f) to head (3944df6).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1980      +/-   ##
==========================================
- Coverage   72.65%   72.51%   -0.15%     
==========================================
  Files         450      451       +1     
  Lines       74021    74481     +460     
==========================================
+ Hits        53781    54008     +227     
- Misses      20240    20473     +233     
Components Coverage Δ
libdd-crashtracker 65.31% <ø> (ø)
libdd-crashtracker-ffi 37.68% <ø> (ø)
libdd-alloc 98.77% <ø> (ø)
libdd-data-pipeline 85.97% <ø> (ø)
libdd-data-pipeline-ffi 71.04% <ø> (ø)
libdd-common 79.81% <ø> (ø)
libdd-common-ffi 74.41% <ø> (ø)
libdd-telemetry 73.34% <ø> (+3.45%) ⬆️
libdd-telemetry-ffi 31.36% <ø> (+11.99%) ⬆️
libdd-dogstatsd-client 82.64% <ø> (ø)
datadog-ipc 76.17% <ø> (-0.05%) ⬇️
libdd-profiling 81.57% <ø> (-0.03%) ⬇️
libdd-profiling-ffi 64.51% <ø> (ø)
libdd-sampling 97.25% <ø> (ø)
datadog-sidecar 29.09% <20.00%> (-0.04%) ⬇️
datdog-sidecar-ffi 9.67% <ø> (ø)
spawn-worker 48.86% <14.54%> (-5.83%) ⬇️
libdd-tinybytes 93.16% <ø> (ø)
libdd-trace-normalization 81.71% <ø> (ø)
libdd-trace-obfuscation 87.39% <ø> (ø)
libdd-trace-protobuf 68.25% <ø> (ø)
libdd-trace-utils 88.85% <ø> (-0.46%) ⬇️
libdd-tracer-flare 86.88% <ø> (ø)
libdd-log 74.83% <ø> (ø)
🚀 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.

@datadog-prod-us1-6
Copy link
Copy Markdown

datadog-prod-us1-6 Bot commented May 12, 2026

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 8.33%
Overall Coverage: 72.51% (-0.17%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 3944df6 | Docs | Datadog PR Page | Give us feedback!

@bwoebi bwoebi force-pushed the bob/direct-exec branch 2 times, most recently from fd9efde to c419edd Compare May 13, 2026 11:14
@bwoebi bwoebi changed the title feat(sidecar)!: Add direct exec capabilities to the sidecar via dynamic linker feat(sidecar)!: Add direct exec capabilities to the sidecar via dynamic linker May 13, 2026
@bwoebi bwoebi force-pushed the bob/direct-exec branch 3 times, most recently from fc36482 to 25f74ed Compare May 13, 2026 11:27
@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented May 13, 2026

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 7.57 MB 7.57 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 81.84 MB 81.84 MB 0% (0 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.01 MB 10.01 MB 0% (0 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 98.03 MB 98.03 MB 0% (0 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 24.48 MB 24.48 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 79.87 KB 79.87 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 180.25 MB 180.23 MB --.01% (-24.00 KB) 💪
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 913.92 MB 913.92 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 7.73 MB 7.73 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 79.87 KB 79.87 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 23.16 MB 23.16 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 45.36 MB 45.36 MB 0% (0 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 21.09 MB 21.09 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 81.11 KB 81.11 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 184.41 MB 184.40 MB -0% (-8.00 KB) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 900.39 MB 900.39 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 5.99 MB 5.99 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 81.11 KB 81.11 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 24.81 MB 24.81 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 42.86 MB 42.86 MB 0% (0 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 72.93 MB 72.93 MB 0% (0 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.42 MB 8.42 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 90.70 MB 90.70 MB 0% (0 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.06 MB 10.06 MB 0% (0 B) 👌

@bwoebi bwoebi force-pushed the bob/direct-exec branch from 25f74ed to 5f41de7 Compare May 13, 2026 12:16
Signed-off-by: Bob Weinand <[email protected]>
@bwoebi bwoebi force-pushed the bob/direct-exec branch from 5f41de7 to 4ca7d96 Compare May 13, 2026 12:39
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 ok to me 👌

Comment thread spawn_worker/src/unix/mod.rs Outdated
Comment on lines +89 to +91
if p_type == 3 {
// PT_INTERP = 3; the interpreter string lives at this vaddr.
interp_vaddr = p_vaddr;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
if p_type == 3 {
// PT_INTERP = 3; the interpreter string lives at this vaddr.
interp_vaddr = p_vaddr;
if p_type == libc::PT_INTERP {
interp_vaddr = p_vaddr;

Can't we do just that ?

@bwoebi
Copy link
Copy Markdown
Contributor Author

bwoebi commented May 13, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 Bot commented May 13, 2026

View all feedbacks in Devflow UI.

2026-05-13 15:35:07 UTC ℹ️ Start processing command /merge


2026-05-13 15:35:13 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 47m (p90).


2026-05-13 15:35:27 UTCMergeQueue: This merge request was updated

This PR is rejected because it was updated

Signed-off-by: Bob Weinand <[email protected]>
@bwoebi
Copy link
Copy Markdown
Contributor Author

bwoebi commented May 13, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 Bot commented May 13, 2026

View all feedbacks in Devflow UI.

2026-05-13 15:35:49 UTC ℹ️ Start processing command /merge


2026-05-13 15:35:56 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2026-05-13 16:11:15 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in main is approximately 47m (p90).


2026-05-13 16:52:22 UTC ℹ️ MergeQueue: This merge request was merged

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.

4 participants