test(tracing): ASAN failures in eval'd code#3624
Draft
morrisonlevi wants to merge 11 commits intomasterfrom
Draft
test(tracing): ASAN failures in eval'd code#3624morrisonlevi wants to merge 11 commits intomasterfrom
morrisonlevi wants to merge 11 commits intomasterfrom
Conversation
Adds a PHPT that forces an eval() parse error inside an end-hook on an internal fake closure. Under ASAN this triggers a crash in ddtrace backtrace collection.
Updates the internal fake closure ASAN reproducer to use two hooks and re-enter after removing one hook, while forcing eval() into the error path.
Reduces iterations and re-entry calls to the smallest values while preserving the ASAN crash.
Removes the extra hook installation/removal while preserving the ASAN crash.
Drops the secondary closure and re-entry call while preserving the ASAN crash in ddtrace backtrace collection.
Simplifies the reproducer to a single internal fake closure with one hook, while forcing eval() into the error path and still crashing under ASAN.
The crash occurs during eval() error handling, so hook removal is unnecessary; keep the hook installed.
Passes no begin hook and removes unused hook-id plumbing, while still reproducing the ASAN SEGV in ddtrace backtrace collection.
Removes the unnecessary callable indirection; the reduced test still deterministically triggers the ASAN SEGV in ddtrace backtrace collection.
Removes the non-essential DD_INSTRUMENTATION_TELEMETRY_ENABLED environment section; the test still deterministically crashes under ASAN.
Replace the eval parse-error payload with valid PHP that throws an exception, and catch the exception at the call site. The ASAN SEGV in ddtrace backtrace collection still reproduces deterministically.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3624 +/- ##
==========================================
- Coverage 62.21% 62.12% -0.09%
==========================================
Files 141 141
Lines 13387 13387
Branches 1753 1753
==========================================
- Hits 8329 8317 -12
- Misses 4260 4270 +10
- Partials 798 800 +2 see 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PROF-13687
Description
Look at the ASAN failures for commit 2242f59. Example.
The rest of the commits were to try and reduce a previous failure down to valid PHP code. They failed for me locally but for some reason, they didn't in CI. For instance, commit f499613 failed locally for both amd64 and arm64 on PHP 8.3 ZTS ASAN. Here's the output for amd64:
Reviewer checklist