View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000661 | Xdebug | Uncategorized | public | 2011-02-03 02:16 | 2011-02-09 22:19 |
| Reporter | mday | Assigned To | |||
| Priority | normal | Severity | crash | Reproducibility | sometimes |
| Status | resolved | Resolution | no change required | ||
| Platform | linux | OS | ubuntu | OS Version | 10.10 |
| Product Version | 2.1.0 | ||||
| Summary | 0000661: code-coverage causes segmentation fault | ||||
| Description | running my unit tests with zend framework and code-coverage causes segmentation fault | ||||
| Steps To Reproduce | it's difficult to give the steps to reproduce this since it's using zend framework when the fail happens and there's a lot of code. | ||||
| Additional Information | gdb output:
(gdb) run phpunit --coverage-html ../public/tests/ (gdb) run /usr/bin/phpunit --coverage-html ../public/tests/ ....PHP Warning: imagepng(): Unable to open './images/captcha/933a47cb6e8c2f1d70fbfd4d17dac4ce.png' for writing: No such file or directory in /pool/deployments/zendFramework/1.11.1/library/Zend/Captcha/Image.php on line 563 (gdb) bt | ||||
| Tags | No tags attached. | ||||
| Operating System | ubuntu 10.10 | ||||
| PHP Version | 5.3.3 | ||||
|
|
here's another gdb output: root@matthewbox:/pool/www/www.hiding_my_domain.com/tests# gdb /usr/bin/php .................. Time: 21 seconds, Memory: 46.00Mb OK (18 tests, 21 assertions) Generating code coverage report, this may take a moment. #0 0x00000000006a5967 in zend_hash_destroy () hope these help : / without using --code-coverage (which phpunit uses xdebug for) it works just fine |
|
|
i'm running a valgrind on it right now, but one weird thing is that it doesn't happen all the time, sometimes it makes it all the way through and tells me that all tests passed and that it generates a code coverage report. i'll post the valgrind report probably tomorrow since it's taking a really long time to generate. |
|
|
Hi, those dumps don't help at all because you don't have full symbols. In order to fix it, I will need to be able to reproduce it. You can do that either by providing a short reproducable script, or by providing me with exact instructions, including a code dump, on how to reproduce it. I don't know which tests you're running at all now. From the 2nd trace however, a hint shows that this might not be Xdebug, but PHP's Garbage Collector. Try turning it off (zend.enable_gc=0) and see if that helps. Make also sure you set the following environment variable: cheers, |
|
|
Hi Derick, thanks for the fast response and for the suggestions. I tried what you suggested and nothing seemed to work. I ended up recompiling php to get the newest version (5.3.5) instead of using the one that I was using: PHP 5.3.3-1ubuntu9.3 and now my tests are running fine. At some point I was able to get an actual error which I think was causing the segfault and that was it was trying to allocate like 70,000 petabytes of memory - and I really have no idea : / we're definitely not doing anything that crazy, so it could just be that specific version of php that I was running. I wish I could keep trying to figure out what exactly was causing that but this is a work project and I don't have that luxury of time. Thanks again for your help (and your excellent product)! |
|
|
I'll mark it as "resolved" then. Good luck! |
|
|
reopening issue due to this issue: has duplicate 0000663 |
|
|
You wrote somewhere else that you used "export ZEND_ALLOC=0" and not "export USE_ZEND_ALLOC=0". What did you use? And your backtrace really points to an issue with PHP's Garbage Collector. Can you run GDB like this: shell: gdb: Then instead of pasting the backtrace in a comment, please use the "attach file" functionality. |
|
|
I ran the test 4 times, it seg faulted 3 times, I ran a backtrace on it two times, I uploaded the results of all in a text file. |
|
|
All those crashes happen in GC related cases. I don't know why it doesn't properly get turned off with -dzend.enable_gc=0 though. But none of them point to any crash in Xdebug, just in normal PHP. Please add the segfaults.txt file to the PHP bug report that you filed. I'm going to have to mark this one as "no change required" as it's a PHP issue. |