Skip to content

Conversation

@Leiyks
Copy link
Contributor

@Leiyks Leiyks commented Jan 13, 2026

Description

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@datadog-official
Copy link

datadog-official bot commented Jan 13, 2026

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

❄️ 20 New flaky tests detected

    trace without attack after soft restart() from com.datadog.appsec.php.integration.Apache2ModTests (Fix with Cursor)

    testWhenRequestIsBlockedLaravelPageIsNotDisplayed from laravel-58-test.DDTrace\Tests\Integrations\Laravel\V5_8\RaspEventsTest (Fix with Cursor)

tmp/build_extension/tests/ext/crashtracker_and_backtrace_are_mutually_exclusive.phpt (Settings 'datadog.log_backtrace' and 'datadog.crashtracking_enabled' are mutually exclusive) from php.tmp.build_extension.tests.ext (Datadog) (Fix with Cursor)
Termsig=11
View all

🧪 1363 Tests failed

    initializationError from com.datadog.appsec.php.integration.Apache2FpmTests (Fix with Cursor)

[1] file_get_contents, 19 from com.datadog.appsec.php.integration.Apache2ModTests (Datadog) (Fix with Cursor)
java.io.IOException: HTTP/1.1 header parser received no bytes

java.io.IOException: HTTP/1.1 header parser received no bytes
	at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:591)
	at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:123)
	at org.codehaus.groovy.vmplugin.v8.IndyInterface.selectMethod(IndyInterface.java:355)
	at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
	at com.datadog.appsec.php.docker.AppSecContainer.traceFromRequest(AppSecContainer.groovy:238)
	at com.datadog.appsec.php.docker.AppSecContainer.traceFromRequest(AppSecContainer.groovy)
	at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
...
[1] file_put_contents, /tmp/dummy, 9 from com.datadog.appsec.php.integration.Apache2ModTests (Datadog) (Fix with Cursor)
java.io.IOException: HTTP/1.1 header parser received no bytes

java.io.IOException: HTTP/1.1 header parser received no bytes
	at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:591)
	at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:123)
	at org.codehaus.groovy.vmplugin.v8.IndyInterface.selectMethod(IndyInterface.java:355)
	at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
	at com.datadog.appsec.php.docker.AppSecContainer.traceFromRequest(AppSecContainer.groovy:238)
	at com.datadog.appsec.php.docker.AppSecContainer.traceFromRequest(AppSecContainer.groovy)
	at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
...
View all
This comment will be updated automatically if new data arrives.
🔗 Commit SHA: fc9fcbf | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.92%. Comparing base (323b5e1) to head (fc9fcbf).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3573      +/-   ##
==========================================
- Coverage   61.93%   61.92%   -0.02%     
==========================================
  Files         140      140              
  Lines       13309    13309              
  Branches     1762     1762              
==========================================
- Hits         8243     8241       -2     
- Misses       4275     4278       +3     
+ Partials      791      790       -1     

see 1 file 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 323b5e1...fc9fcbf. 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.

@pr-commenter
Copy link

pr-commenter bot commented Jan 13, 2026

Benchmarks [ tracer ]

Benchmark execution time: 2026-01-19 17:33:59

Comparing candidate commit fc9fcbf in PR branch leiyks/sidecar-threaded-fallback with baseline commit 323b5e1 in branch master.

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

scenario:MessagePackSerializationBench/benchMessagePackSerialization

  • 🟩 execution_time [-7.541µs; -4.839µs] or [-6.809%; -4.369%]

@Leiyks Leiyks force-pushed the leiyks/sidecar-threaded-fallback branch 4 times, most recently from ce20a9e to 2eb0609 Compare January 14, 2026 14:41
@pr-commenter
Copy link

pr-commenter bot commented Jan 14, 2026

Benchmarks [ profiler ]

Benchmark execution time: 2026-01-14 16:24:26

Comparing candidate commit 05ebcae in PR branch leiyks/sidecar-threaded-fallback with baseline commit 88a859c in branch master.

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

scenario:php-profiler-timeline-memory-with-profiler-and-timeline

  • 🟥 cpu_user_time [+36.124ms; +78.620ms] or [+2.324%; +5.058%]
  • 🟥 execution_time [+32.293ms; +51.335ms] or [+2.645%; +4.204%]

@Leiyks Leiyks force-pushed the leiyks/sidecar-threaded-fallback branch 5 times, most recently from 34ba942 to 8d17af1 Compare January 15, 2026 12:56
@Leiyks Leiyks force-pushed the leiyks/sidecar-threaded-fallback branch 2 times, most recently from 9429b69 to f53401c Compare January 15, 2026 13:22
Signed-off-by: Alexandre Rulleau <[email protected]>
@Leiyks Leiyks force-pushed the leiyks/sidecar-threaded-fallback branch from f53401c to 37ec8f2 Compare January 16, 2026 10:36
Signed-off-by: Alexandre Rulleau <[email protected]>
@Leiyks Leiyks force-pushed the leiyks/sidecar-threaded-fallback branch from 06223eb to cda73e8 Compare January 16, 2026 15:24

ddtrace_sidecar_shutdown();
// Only shutdown sidecar in MSHUTDOWN for non-CLI SAPIs
// CLI SAPI shuts down in RSHUTDOWN to allow thread joins before ASAN checks
Copy link
Collaborator

Choose a reason for hiding this comment

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

How does ASAN influence this? ASAN is supposed to run after MSHUTDOWN as well?
I suspect that is related to the timings and the fact that the libdatadog part doesn't properly handle shutdown currently.
And this should in fact always shutdown the sidecar in MSHUTDOWN.

Comment on lines +2653 to +2655
// Don't try to reconnect in thread mode after fork
// Let sidecar stay unavailable
LOG(WARN, "Child process after fork with thread mode: sidecar unavailable");
Copy link
Collaborator

@bwoebi bwoebi Jan 19, 2026

Choose a reason for hiding this comment

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

Uhm, no? Just connect to the parents process socket? At least attempt to.

Comment on lines +44 to +46
LOG(WARN, "pcntl_fork() detected with thread-based sidecar connection. "
"Thread mode is incompatible with fork and may cause instability. "
"Consider using subprocess mode (DD_TRACE_SIDECAR_CONNECTION_MODE=subprocess).");
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is? Why?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants