Skip to content

fix(profiling): disable wall/cpu on some PHP 8.5 builds#3889

Draft
morrisonlevi wants to merge 8 commits into
masterfrom
levi/disable-profiling-on-tailcall-vm
Draft

fix(profiling): disable wall/cpu on some PHP 8.5 builds#3889
morrisonlevi wants to merge 8 commits into
masterfrom
levi/disable-profiling-on-tailcall-vm

Conversation

@morrisonlevi
Copy link
Copy Markdown
Collaborator

@morrisonlevi morrisonlevi commented May 19, 2026

Description

Disables the wall- and cpu-time sample types of the profiler on PHP 8.5.0 through 8.5.6 (inclusive) so it doesn't trigger the tailcall VM vm_interrupt crash fixed in the upcoming PHP 8.5.7 release.

Technically, anything which sets the vm_interrupt can trigger this crash, such the tracer and even PHP itself with its timeout limit. However, the profiler sets it all the time (roughly every 10 ms) with its wall- and cpu-time sample types, so it is the most common trigger.

Affected customers:

  • PHP 8.5.0-8.5.6
  • Must be using the tailcall VM type, which is new in PHP 8.5.

You can check your PHP version and VM kind with:

php -r 'echo PHP_VERSION, "\n", (defined("ZEND_VM_KIND") ? ZEND_VM_KIND : "undef"), "\n";'

Upstream fix: php/php-src#21922

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

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

datadog-prod-us1-3 Bot commented May 19, 2026

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 42 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-php | ASAN test_c with multiple observers: [8.3]   View in Datadog   GitLab

See error Failed test: The sidecar trace flusher sender informs about changes to the agent sample rate at tmp/build_extension/tests/ext/background-sender/agent_sampling_sidecar.phpt

DataDog/apm-reliability/dd-trace-php | ASAN test_c with multiple observers: [8.5]   View in Datadog   GitLab

See error 1 test failed. Error: expected bool(true) but found bool(false) in get_loaded_remote_configs test.

DataDog/apm-reliability/dd-trace-php | test_extension_ci: [7.4]   View in Datadog   GitLab

See error Test failure in crashtracker_collect_all_threads.phpt: expected threads to be collected when collect_all_threads is enabled.

View all 42 failed jobs.

1 Test performance regression detected

tmp/build_extension/tests/ext/request-replayer/dd_trace_span_link_with_exception.phpt (Span Link serialization with non-null EG(exception) doesn't fail) from php.tmp.build_extension.tests.ext.request.replayer — 22.77s (+20.82s, +1069%)   View in Datadog

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 54.15% (+0.03%)

Useful? React with 👍 / 👎

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

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 20, 2026

Benchmarks [ profiler ]

Benchmark execution time: 2026-06-03 15:32:33

Comparing candidate commit 89e5aa8 in PR branch levi/disable-profiling-on-tailcall-vm with baseline commit 2ef15a9 in branch master.

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

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

@morrisonlevi morrisonlevi force-pushed the levi/disable-profiling-on-tailcall-vm branch from 1a222c9 to 80530b1 Compare May 21, 2026 17:55
@morrisonlevi morrisonlevi changed the title fix(profiling): disable on tailcall VM on 8.5.{0..6} for upstream crash fix(profiling): disable wall/cpu on some PHP 8.5 builds May 21, 2026
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.

2 participants