Skip to content

Conversation

@realFlowControl
Copy link
Member

@realFlowControl realFlowControl commented Dec 23, 2025

Description

A crash report ...

0x55af66530fbf _zend_mm_alloc
0x7fe72dea8401 alloc_prof_orig_alloc (/go/src/github.com/DataDog/apm-reliability/dd-trace-php/profiling/src/allocation/allocation_le83.rs:379)
0x7fe72dea82de alloc_prof_malloc (/go/src/github.com/DataDog/apm-reliability/dd-trace-php/profiling/src/allocation/allocation_le83.rs:350)
0x55af6654bcc5 zend_register_constant
0x7fe72dea7635 execute_internal (/go/src/github.com/DataDog/apm-reliability/dd-trace-php/profiling/src/wall_time.rs:79)
0x55af665cd353 zend_execute
0x55af6655d2c8 zend_execute_scripts
0x55af664f79ae php_execute_script
0x7fe732896305 __libc_start_main
0x55af66248c61 _start

... indicated that _zend_mm_alloc was being called with an invalid heap pointer. This invalid pointer originated from the call to zend::zend_mm_get_heap() within alloc_prof_orig_alloc which is weird and can only mean that "something" changed the current heap via zend_mm_set_heap() after we installed our hooks in RINIT to something invalid, but I could not find any other extension that are known for these kind of things in the crash report.

So: In the end it is the right thing to call the heap that we registered our ZendMM custom handlers in.

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@github-actions github-actions bot added profiling Relates to the Continuous Profiler tracing labels Dec 23, 2025
@codecov-commenter
Copy link

codecov-commenter commented Dec 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.01%. Comparing base (2c70c61) to head (bbcaf45).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3547      +/-   ##
==========================================
- Coverage   62.05%   62.01%   -0.05%     
==========================================
  Files         140      140              
  Lines       13309    13309              
  Branches     1762     1762              
==========================================
- Hits         8259     8253       -6     
- Misses       4262     4268       +6     
  Partials      788      788              

see 2 files 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 2c70c61...bbcaf45. 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 Dec 23, 2025

Benchmarks [ profiler ]

Benchmark execution time: 2026-01-14 10:45:16

Comparing candidate commit bbcaf45 in PR branch florian/fix-allocs with baseline commit 2c70c61 in branch master.

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

@realFlowControl realFlowControl marked this pull request as ready for review January 6, 2026 19:09
@realFlowControl realFlowControl requested a review from a team as a code owner January 6, 2026 19:09
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jan 13, 2026

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

🧪 1022 Tests failed

    testSearchPhpBinaries from integration.DDTrace\Tests\Integration\PHPInstallerTest (Fix with Cursor)

testSimplePushAndProcess from laravel-58-test.DDTrace\Tests\Integrations\Laravel\V5_8\QueueTest (Datadog) (Fix with Cursor)
Risky Test
phpvfscomposer://tests/vendor/phpunit/phpunit/phpunit:97
testSimplePushAndProcess from laravel-8x-test.DDTrace\Tests\Integrations\Laravel\V8_x\QueueTest (Datadog) (Fix with Cursor)
DDTrace\Tests\Integrations\Laravel\V8_x\QueueTest::testSimplePushAndProcess
Test code or tested code printed unexpected output: spanLinksTraceId: 69677267000000006d451d5fcc4e6203
tid: 6967726700000000
hexProcessTraceId: 6d451d5fcc4e6203
hexProcessSpanId: ce87241695527950
processTraceId: 7873731820813967875
processSpanId: 14881903173082184016

phpvfscomposer://tests/vendor/phpunit/phpunit/phpunit:106
View all

ℹ️ Info

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: bbcaf45 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

A crash report indicated that `_zend_mm_alloc` was being called with an invalid heap pointer
This invalid pointer originated from the call to `zend::zend_mm_get_heap()` within `alloc_prof_orig_alloc`.
@realFlowControl realFlowControl marked this pull request as draft January 13, 2026 14:55
@realFlowControl
Copy link
Member Author

Let's wait for #3560 get merged and fix the flaky profiling test first

@realFlowControl realFlowControl marked this pull request as ready for review January 14, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

profiling Relates to the Continuous Profiler tracing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants