View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002139 | Xdebug | Code Coverage | public | 2022-11-23 22:06 | 2022-12-08 23:37 |
Reporter | shyim | Assigned To | derick | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Platform | Github Action | OS | Ubuntu | OS Version | 22.04 |
Product Version | 3.1.5 | ||||
Summary | 0002139: PHP crash on generating coverage report using PHPUnit | ||||
Description | I am generating a code coverage in the CI using setup-php action and I got an segmentation fault while generating coverage. See: https://github.com/shyim/platform/actions/runs/3535408200/jobs/5933396514 | ||||
Steps To Reproduce | Clone https://github.com/shopware/platform /usr/bin/php -d memory_limit=-1 --configuration phpunit.xml.dist --exclude-group needsWebserver,quarantined --testsuite storefront --coverage-cobertura phpunit.coverage.storefront.xml 0x0000555555875f2c in ?? () We use also Library https://github.com/dg/bypass-finals which does Crazy stuff with file stream wrapper. Maybe that triggers it? | ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 8.1.10-8.1.19 | ||||
|
Program received signal SIGSEGV, Segmentation fault. Back trace with symbols. Created also a Coredump using GDB if it helps, but it is 4,7GB |
|
Yeah, don't send me that core dump :-) I'll see if I can reproduce this tomorrow. Can you add your php -i output though please as an attachment? |
|
Here is the PHP info http://sprunge.us/WfxR0P. Thanks! :) |
|
I had to start the phpunit run differently: XDEBUG_MODE=coverage php -d memory_limit=-1 ./vendor/bin/phpunit --configuration phpunit.xml.dist --exclude-group needsWebserver,quarantined --testsuite storefront --coverage-cobertura phpunit.coverage.storefront.xml It's been running for a while now, but no crash yet. From your backtrace I can see it's on request shutdown... so I am going to have to wait for that. |
|
A much faster test that shows the problem (within valgrind) is: valgrind php -d memory_limit=-1 ./vendor/bin/phpunit --configuration phpunit.xml.dist --exclude-group needsWebserver,quarantined,slow,cache,review,skip-paratest --testsuite storefront --filter 'Framework\Routing\NotFound\NotFoundSubscriberTest::testError' |
|
Hi, this took some time to figure out, but it looks like this is a bug in PHP, and not in Xdebug — although Xdebug does trigger it. If you swap out Xdebug for the (useless) skeleton extension (https://github.com/derickr/extension-skeleton.git) and load that instead of Xdebug, I get the exact same valgrind error/crash at request shutdown. It does indeed look like DG's Bypass Finals is also required to trigger the bug. I've made a reproduce case with that extension to be given to the PHP project (where I might work on it myself): With valgrind, the warning (and subsequent crash) looks like, running as:
Result:
cheers, |
|
Thanks for digging more into it :) And thanks, thanks for looking into! |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-11-23 22:06 | shyim | New Issue | |
2022-11-23 22:32 | shyim | Note Added: 0006451 | |
2022-11-23 22:47 | derick | Note Added: 0006452 | |
2022-11-23 22:51 | shyim | Note Added: 0006453 | |
2022-11-24 17:32 | derick | Note Added: 0006455 | |
2022-12-06 14:08 | derick | Note Added: 0006462 | |
2022-12-06 14:08 | derick | Status | new => assigned |
2022-12-08 17:22 | derick | Assigned To | => derick |
2022-12-08 17:22 | derick | Status | assigned => resolved |
2022-12-08 17:22 | derick | Resolution | open => no change required |
2022-12-08 17:22 | derick | Note Added: 0006464 | |
2022-12-08 23:37 | shyim | Note Added: 0006467 |