View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001434 | Xdebug | Uncategorized | public | 2017-05-01 20:55 | 2017-05-15 22:34 |
Reporter | nacc | Assigned To | derick | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | Ubuntu | OS Version | 17.10 i386 |
Product Version | 2.5.3 | ||||
Fixed in Version | 2.5.4 | ||||
Summary | 0001434: phpunit testcases segmentation fault with PHP 7.1.4, xdebug 2.5.3 on 32-bit architectures | ||||
Description | Hello! I am currently migrating Ubuntu from PHP7.0 to 7.1 and while most packages are moving along ok, I am hitting a fatal segmentation fault on 32-bit architectures only in the xdebug code when running the phpunit unittests. From the build directory: ./phpunit --colors=never --coverage-text=php://stdout IgnoreCodeCoverageClassTest tests/_files/IgnoreCodeCoverageClassTest.php --whitelist tests/_files/IgnoreCodeCoverageClass.php Runtime: PHP 7.1.4-2ubuntu1 with Xdebug 2.5.3 Segmentation fault (core dumped) Adding gdb: #0 xdebug_set_in_ex (set=0x56adf1a8, position=153391744, noisy=1) at ./build-7.1/xdebug_set.c:71 I will try to get the debug packages installed (I had to build xdebug 2.5.3 locally) to get a better backtrace. | ||||
Steps To Reproduce | I reproduce it using the autopkgtest framework used by Ubuntu and Debian. I believe it would be reproducible with PHP 7.1.4 and xdebug 2.5.3 and phpunit 5.4.6. I've tried a newer phpunit and it also seems to happen there, but I'm trying to verify that still. | ||||
Additional Information | I apologize in advance for the lower quality of this report -- I'm trying to get the information out there in case it's something obvious I'm missing so I can help get PHP7.1 rolled out quickly in the 17.10 cycle. | ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 7.1.0-7.1.4 | ||||
|
When you say " From the build directory:", how do I get to that state? |
|
Yeah, a good question :) If you have an ubuntu system (16.04 or later), you should be able to do: $ pull-lp-source -d phpunit This does presume the 'autopkgtest' package is installed and LXD has been configured. It should drop you to a shell in the container when the tests fail. |
|
Sorry, that's probably too much for me to sort out. Can you tell me how to reproduce this otherwise with a phpunit install (or git clone), and a 32-bit PHP 7 available? |
|
Ok, I think I got it with the following (this is done in an Ubuntu 17.10 i386 LXD container, but I think it generalizes): apt build-dep phpunit This should fail with two segmentation faults in testcases. One of which can be run from the extracted env as: ./phpunit --colors=never --coverage-text=php://stdout IgnoreCodeCoverageClassTest tests/_files/IgnoreCodeCoverageClassTest.php --whitelist tests/_files/IgnoreCodeCoverageClass.php The upstream version of phpunit in question is 5.4.6. |
|
Was able to add debug symbols for PHP: #0 xdebug_set_in_ex (set=0x56afbe60, position=153391744, noisy=1) at ./build-7.1/xdebug_set.c:71 My suspicion on 32-bit issues is that we successfully pass all tests on amd64, ppc64el and s390x and fail the same tests on armhf and i386. |
|
Hopefully this is not just noise, but some more debugging info from gdb: (gdb) info registers |
|
The problem is easy to spot: #0 xdebug_set_in_ex (set=0x56afbe60, position=153391744, noisy=1) at ./build-7.1/xdebug_set.c:71 the position of 153391744 is way too high, and likely the bug. The last comment was noise ;-) I really need to reproduce this now locally before I can continue. |
|
And I can - it is important that opcache is also loaded. |
|
Just a note for myself for reproducibility: /dev/php/xdebug-tests/phpunit $ valgrind ./phpunit --colors=never --coverage-text=php://stdout IgnoreCodeCoverageClassTest tests/_files/IgnoreCodeCoverageClassTest.php --whitelist tests/_files/IgnoreCodeCoverageClass.php Runtime: PHP 7.1.6-dev with Xdebug 2.5.3 Segmentation fault |
|
Thank you very much for the fix! |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-05-01 20:55 | nacc | New Issue | |
2017-05-01 21:01 | derick | Note Added: 0004330 | |
2017-05-01 21:01 | derick | Assigned To | => derick |
2017-05-01 21:01 | derick | Status | new => feedback |
2017-05-01 21:08 | nacc | Note Added: 0004331 | |
2017-05-01 21:08 | nacc | Status | feedback => assigned |
2017-05-01 22:09 | derick | Note Added: 0004332 | |
2017-05-01 22:09 | derick | Status | assigned => feedback |
2017-05-01 22:37 | nacc | Note Added: 0004333 | |
2017-05-01 22:37 | nacc | Status | feedback => assigned |
2017-05-03 16:16 | nacc | Note Added: 0004336 | |
2017-05-03 17:27 | nacc | Note Added: 0004337 | |
2017-05-03 22:57 | derick | Note Added: 0004338 | |
2017-05-03 23:07 | derick | Note Added: 0004339 | |
2017-05-05 14:22 | derick | Note Added: 0004340 | |
2017-05-14 21:55 | derick | Status | assigned => closed |
2017-05-14 21:55 | derick | Resolution | open => fixed |
2017-05-14 21:55 | derick | Fixed in Version | => 2.5.4 |
2017-05-15 22:34 | nacc | Note Added: 0004342 | |
2020-03-12 16:35 | derick | Category | Usage problems (Wrong Results) => Variable Display |
2020-03-12 16:38 | derick | Category | Variable Display => Uncategorized |