View Issue Details

IDProjectCategoryView StatusLast Update
0000661XdebugUncategorizedpublic2011-02-09 22:19
Reportermday Assigned Toderick  
PrioritynormalSeveritycrashReproducibilitysometimes
Status resolvedResolutionno change required 
PlatformlinuxOSubuntuOS Version10.10
Product Version2.1.0 
Summary0000661: 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 /usr/bin/php

(gdb) run phpunit --coverage-html ../public/tests/

(gdb) run /usr/bin/phpunit --coverage-html ../public/tests/
Starting program: /usr/bin/php /usr/bin/phpunit --coverage-html ../public/tests/
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffef348700 (LWP 15023)]
[Thread 0x7fffef348700 (LWP 15023) exited]
PHPUnit 3.5.10 by Sebastian Bergmann.

....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
.........
Program received signal SIGSEGV, Segmentation fault.
0x00000000006b9213 in ?? ()

(gdb) bt
#0 0x00000000006b9213 in ?? ()
#1 0x000000000069850d in _zval_dtor_func ()
0000002 0x00000000006bd4cf in ?? ()
0000003 0x000000000070caea in ?? ()
0000004 0x000000000070d47d in ?? ()
0000005 0x00000000006c0e90 in execute ()
0000006 0x00007ffff41e1d15 in xdebug_execute (op_array=0x2d49740) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000007 0x00000000006e9706 in ?? ()
0000008 0x00000000006c0e90 in execute ()
0000009 0x00007ffff41e1d15 in xdebug_execute (op_array=0x3cad4a8) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000010 0x00000000006e9706 in ?? ()
0000011 0x00000000006c0e90 in execute ()
0000012 0x00007ffff41e1d15 in xdebug_execute (op_array=0x28b7ea8) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000013 0x000000000068ea14 in zend_call_function ()
0000014 0x00000000006afb67 in zend_call_method ()
0000015 0x00000000006bc7f3 in zend_std_cast_object_tostring ()
0000016 0x0000000000699a1f in zend_make_printable_zval ()
0000017 0x00000000006924d1 in concat_function ()
0000018 0x00000000006c3e62 in ?? ()
0000019 0x00000000006c0e90 in execute ()
0000020 0x00007ffff41e1d15 in xdebug_execute (op_array=0x3f3b628) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000021 0x00000000006d51fc in ?? ()
0000022 0x00000000006c0e90 in execute ()
0000023 0x00007ffff41e1d15 in xdebug_execute (op_array=0x2042ca8) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000024 0x00000000006e9706 in ?? ()
0000025 0x00000000006c0e90 in execute ()
0000026 0x00007ffff41e1d15 in xdebug_execute (op_array=0x20ae318) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000027 0x00000000006e9706 in ?? ()
0000028 0x00000000006c0e90 in execute ()
0000029 0x00007ffff41e1d15 in xdebug_execute (op_array=0x2e4bb80) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000030 0x000000000068ea14 in zend_call_function ()
0000031 0x00000000005ceb87 in ?? ()
0000032 0x00007ffff41e20bd in xdebug_execute_internal (current_execute_data=0x7ffff7ece808, return_value_used=1) at /tmp/pear/temp/xdebug/xdebug.c:1339
0000033 0x00000000006e9a16 in ?? ()
0000034 0x00000000006c0e90 in execute ()
#35 0x00007ffff41e1d15 in xdebug_execute (op_array=0x2053c48) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000036 0x000000000068ea14 in zend_call_function ()
0000037 0x00000000006afb67 in zend_call_method ()
0000038 0x00000000006bbafe in zend_std_call_user_call ()
0000039 0x00007ffff41e20bd in xdebug_execute_internal (current_execute_data=0x7ffff7ecd020, return_value_used=1) at /tmp/pear/temp/xdebug/xdebug.c:1339
0000040 0x00000000006e9a16 in ?? ()
0000041 0x00000000006c0e90 in execute ()
0000042 0x00007ffff41e1d15 in xdebug_execute (op_array=0x2d02838) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000043 0x00000000006d51fc in ?? ()
0000044 0x00000000006c0e90 in execute ()
0000045 0x00007ffff41e1d15 in xdebug_execute (op_array=0x2042ca8) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000046 0x00000000006e9706 in ?? ()
0000047 0x00000000006c0e90 in execute ()
0000048 0x00007ffff41e1d15 in xdebug_execute (op_array=0x20ae318) at /tmp/pear/temp/xdebug/xdebug.c:1272
#49 0x00000000006e9706 in ?? ()
0000050 0x00000000006c0e90 in execute ()
#51 0x00007ffff41e1d15 in xdebug_execute (op_array=0x139dc48) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000052 0x00000000006e9706 in ?? ()
0000053 0x00000000006c0e90 in execute ()
0000054 0x00007ffff41e1d15 in xdebug_execute (op_array=0x1f994a8) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000055 0x00000000006e9706 in ?? ()
0000056 0x00000000006c0e90 in execute ()
0000057 0x00007ffff41e1d15 in xdebug_execute (op_array=0x1369d40) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000058 0x00000000006e9706 in ?? ()
0000059 0x00000000006c0e90 in execute ()
0000060 0x00007ffff41e1d15 in xdebug_execute (op_array=0x12fca28) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000061 0x00000000006e9706 in ?? ()
0000062 0x00000000006c0e90 in execute ()
0000063 0x00007ffff41e1d15 in xdebug_execute (op_array=0x1624720) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000064 0x00000000006e9706 in ?? ()
0000065 0x00000000006c0e90 in execute ()
0000066 0x00007ffff41e1d15 in xdebug_execute (op_array=0x1676100) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000067 0x000000000068ea14 in zend_call_function ()
0000068 0x0000000000541db4 in ?? ()
0000069 0x00007ffff41e20bd in xdebug_execute_internal (current_execute_data=0x7ffff7ec8770, return_value_used=1) at /tmp/pear/temp/xdebug/xdebug.c:1339
0000070 0x00000000006e9a16 in ?? ()
0000071 0x00000000006c0e90 in execute ()
0000072 0x00007ffff41e1d15 in xdebug_execute (op_array=0x16e8748) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000073 0x00000000006e9706 in ?? ()
0000074 0x00000000006c0e90 in execute ()
0000075 0x00007ffff41e1d15 in xdebug_execute (op_array=0x16e8630) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000076 0x00000000006e9706 in ?? ()
0000077 0x00000000006c0e90 in execute ()
0000078 0x00007ffff41e1d15 in xdebug_execute (op_array=0x17b0e08) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000079 0x00000000006e9706 in ?? ()
0000080 0x00000000006c0e90 in execute ()
0000081 0x00007ffff41e1d15 in xdebug_execute (op_array=0x16e8518) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000082 0x00000000006e9706 in ?? ()
0000083 0x00000000006c0e90 in execute ()
0000084 0x00007ffff41e1d15 in xdebug_execute (op_array=0x1498850) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000085 0x00000000006e9706 in ?? ()
0000086 0x00000000006c0e90 in execute ()
0000087 0x00007ffff41e1d15 in xdebug_execute (op_array=0x148c820) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000088 0x00000000006e9706 in ?? ()
0000089 0x00000000006c0e90 in execute ()
0000090 0x00007ffff41e1d15 in xdebug_execute (op_array=0x148c820) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000091 0x00000000006e9706 in ?? ()
0000092 0x00000000006c0e90 in execute ()
0000093 0x00007ffff41e1d15 in xdebug_execute (op_array=0x17534c8) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000094 0x00000000006e9706 in ?? ()
0000095 0x00000000006c0e90 in execute ()
0000096 0x00007ffff41e1d15 in xdebug_execute (op_array=0x1065e30) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000097 0x00000000006e9706 in ?? ()
0000098 0x00000000006c0e90 in execute ()
0000099 0x00007ffff41e1d15 in xdebug_execute (op_array=0x103eac8) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000100 0x00000000006e9706 in ?? ()
0000101 0x00000000006c0e90 in execute ()
0000102 0x00007ffff41e1d15 in xdebug_execute (op_array=0x1028df0) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000103 0x000000000069885d in zend_execute_scripts ()
0000104 0x00000000006441a8 in php_execute_script ()
0000105 0x0000000000729f26 in ?? ()
0000106 0x00007ffff54a9d8e in __libc_start_main () from /lib/libc.so.6
0000107 0x00000000004281e9 in _start ()

TagsNo tags attached.
Attached Files
segfaults.txt (8,593 bytes)   
FIRST TEST
-------------------


root@matthewbox:/pool/www/www.example.com/tests# USE_ZEND_ALLOC=0 gdb php
GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/bin/php...done.
(gdb) run -dzend.enable_gc=0 /usr/local/bin/phpunit --coverage-html ../public/tests/
Starting program: /usr/local/bin/php -dzend.enable_gc=0 /usr/local/bin/phpunit --coverage-html ../public/tests/
[Thread debugging using libthread_db enabled]
PHPUnit 3.5.10 by Sebastian Bergmann.

[New Thread 0x7ffff24a6700 (LWP 17827)]
[Thread 0x7ffff24a6700 (LWP 17827) exited]
....................

Time: 26 seconds, Memory: 0.25Mb

OK (20 tests, 20 assertions)

Generating code coverage report, this may take a moment.

Program received signal SIGSEGV, Segmentation fault.
gc_remove_zval_from_buffer (zv=<value optimized out>) at /home/matthew/src/php-5.3.5/Zend/zend_gc.c:265
265		GC_REMOVE_FROM_BUFFER(root_buffer);







(gdb) run -dzend.enable_gc=0 /usr/local/bin/phpunit --coverage-html ../public/tests/
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/local/bin/php -dzend.enable_gc=0 /usr/local/bin/phpunit --coverage-html ../public/tests/
[Thread debugging using libthread_db enabled]
PHPUnit 3.5.10 by Sebastian Bergmann.

[New Thread 0x7ffff24a6700 (LWP 17839)]
[Thread 0x7ffff24a6700 (LWP 17839) exited]
....................

Time: 25 seconds, Memory: 0.25Mb

OK (20 tests, 20 assertions)

Generating code coverage report, this may take a moment.

Program received signal SIGSEGV, Segmentation fault.
0x000000000075a571 in gc_zval_possible_root (zv=0x37dadf0) at /home/matthew/src/php-5.3.5/Zend/zend_gc.c:143
143			GC_ZOBJ_CHECK_POSSIBLE_ROOT(zv);
(gdb) bt
#0  0x000000000075a571 in gc_zval_possible_root (zv=0x37dadf0) at /home/matthew/src/php-5.3.5/Zend/zend_gc.c:143
#1  0x000000000074912b in zend_hash_destroy (ht=0x37daf50) at /home/matthew/src/php-5.3.5/Zend/zend_hash.c:529
#2  0x000000000075bb89 in zend_object_std_dtor (object=0x37edb00) at /home/matthew/src/php-5.3.5/Zend/zend_objects.c:45
#3  0x000000000075bba9 in zend_objects_free_object_storage (object=0x37dadf0) at /home/matthew/src/php-5.3.5/Zend/zend_objects.c:126
#4  0x000000000075f888 in zend_objects_store_del_ref_by_handle_ex (handle=<value optimized out>, handlers=<value optimized out>) at /home/matthew/src/php-5.3.5/Zend/zend_objects_API.c:220
#5  0x000000000075f8a3 in zend_objects_store_del_ref (zobject=0x37dee20) at /home/matthew/src/php-5.3.5/Zend/zend_objects_API.c:172
#6  0x000000000073072d in _zval_dtor (zval_ptr=0x3814058) at /home/matthew/src/php-5.3.5/Zend/zend_variables.h:35
#7  _zval_ptr_dtor (zval_ptr=0x3814058) at /home/matthew/src/php-5.3.5/Zend/zend_execute_API.c:443
#8  0x000000000074912b in zend_hash_destroy (ht=0x3814160) at /home/matthew/src/php-5.3.5/Zend/zend_hash.c:529
#9  0x000000000073c2cf in _zval_dtor_func (zvalue=0x37decb0) at /home/matthew/src/php-5.3.5/Zend/zend_variables.c:43
#10 0x000000000073072d in _zval_dtor (zval_ptr=0x3779148) at /home/matthew/src/php-5.3.5/Zend/zend_variables.h:35
#11 _zval_ptr_dtor (zval_ptr=0x3779148) at /home/matthew/src/php-5.3.5/Zend/zend_execute_API.c:443
#12 0x000000000074912b in zend_hash_destroy (ht=0x36ff340) at /home/matthew/src/php-5.3.5/Zend/zend_hash.c:529
#13 0x000000000075bb89 in zend_object_std_dtor (object=0x367e300) at /home/matthew/src/php-5.3.5/Zend/zend_objects.c:45
#14 0x000000000075bba9 in zend_objects_free_object_storage (object=0x37dadf0) at /home/matthew/src/php-5.3.5/Zend/zend_objects.c:126
#15 0x000000000075f3a8 in zend_objects_store_free_object_storage (objects=0xef86b8) at /home/matthew/src/php-5.3.5/Zend/zend_objects_API.c:92
#16 0x0000000000730b25 in shutdown_executor () at /home/matthew/src/php-5.3.5/Zend/zend_execute_API.c:302
#17 0x000000000073d042 in zend_deactivate () at /home/matthew/src/php-5.3.5/Zend/zend.c:890
#18 0x00000000006ea665 in php_request_shutdown (dummy=<value optimized out>) at /home/matthew/src/php-5.3.5/main/main.c:1633
#19 0x00000000007c60cc in main (argc=<value optimized out>, argv=<value optimized out>) at /home/matthew/src/php-5.3.5/sapi/cli/php_cli.c:1374
(gdb) 


















THIRD TEST
---------------------

(gdb) run -dzend.enable_gc=0 /usr/local/bin/phpunit --coverage-html ../public/tests/
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/local/bin/php -dzend.enable_gc=0 /usr/local/bin/phpunit --coverage-html ../public/tests/
[Thread debugging using libthread_db enabled]
PHPUnit 3.5.10 by Sebastian Bergmann.

[New Thread 0x7ffff24a6700 (LWP 17857)]
[Thread 0x7ffff24a6700 (LWP 17857) exited]
....................

Time: 25 seconds, Memory: 0.25Mb

OK (20 tests, 20 assertions)

Generating code coverage report, this may take a moment.

Program exited normally.
(gdb) bt
No stack.
(gdb) 










FOURTH TEST
--------------------------


(gdb) run -dzend.enable_gc=0 /usr/local/bin/phpunit --coverage-html ../public/tests/
Starting program: /usr/local/bin/php -dzend.enable_gc=0 /usr/local/bin/phpunit --coverage-html ../public/tests/
[Thread debugging using libthread_db enabled]
PHPUnit 3.5.10 by Sebastian Bergmann.

[New Thread 0x7ffff24a6700 (LWP 17864)]
[Thread 0x7ffff24a6700 (LWP 17864) exited]
....................

Time: 25 seconds, Memory: 0.25Mb

OK (20 tests, 20 assertions)

Generating code coverage report, this may take a moment.

Program received signal SIGSEGV, Segmentation fault.
gc_remove_zval_from_buffer (zv=<value optimized out>) at /home/matthew/src/php-5.3.5/Zend/zend_gc.c:265
265		GC_REMOVE_FROM_BUFFER(root_buffer);
(gdb) bt
#0  gc_remove_zval_from_buffer (zv=<value optimized out>) at /home/matthew/src/php-5.3.5/Zend/zend_gc.c:265
#1  0x0000000000730775 in _zval_ptr_dtor (zval_ptr=0x38da7e8) at /home/matthew/src/php-5.3.5/Zend/zend_execute_API.c:442
#2  0x000000000074912b in zend_hash_destroy (ht=0x38dd850) at /home/matthew/src/php-5.3.5/Zend/zend_hash.c:529
#3  0x000000000075bb89 in zend_object_std_dtor (object=0x388ee90) at /home/matthew/src/php-5.3.5/Zend/zend_objects.c:45
#4  0x000000000075bba9 in zend_objects_free_object_storage (object=0x38d4a00) at /home/matthew/src/php-5.3.5/Zend/zend_objects.c:126
#5  0x000000000075f888 in zend_objects_store_del_ref_by_handle_ex (handle=<value optimized out>, handlers=<value optimized out>) at /home/matthew/src/php-5.3.5/Zend/zend_objects_API.c:220
#6  0x000000000075f8a3 in zend_objects_store_del_ref (zobject=0x38dc630) at /home/matthew/src/php-5.3.5/Zend/zend_objects_API.c:172
#7  0x000000000073072d in _zval_dtor (zval_ptr=0x38dbcf8) at /home/matthew/src/php-5.3.5/Zend/zend_variables.h:35
#8  _zval_ptr_dtor (zval_ptr=0x38dbcf8) at /home/matthew/src/php-5.3.5/Zend/zend_execute_API.c:443
#9  0x000000000074912b in zend_hash_destroy (ht=0x38dbb00) at /home/matthew/src/php-5.3.5/Zend/zend_hash.c:529
#10 0x000000000073c2cf in _zval_dtor_func (zvalue=0x388f1f0) at /home/matthew/src/php-5.3.5/Zend/zend_variables.c:43
#11 0x000000000073072d in _zval_dtor (zval_ptr=0x3867fb8) at /home/matthew/src/php-5.3.5/Zend/zend_variables.h:35
#12 _zval_ptr_dtor (zval_ptr=0x3867fb8) at /home/matthew/src/php-5.3.5/Zend/zend_execute_API.c:443
#13 0x000000000074912b in zend_hash_destroy (ht=0x37ca770) at /home/matthew/src/php-5.3.5/Zend/zend_hash.c:529
#14 0x000000000075bb89 in zend_object_std_dtor (object=0x37ca7e0) at /home/matthew/src/php-5.3.5/Zend/zend_objects.c:45
#15 0x000000000075bba9 in zend_objects_free_object_storage (object=0x38d4a00) at /home/matthew/src/php-5.3.5/Zend/zend_objects.c:126
#16 0x000000000075f3a8 in zend_objects_store_free_object_storage (objects=0xef86b8) at /home/matthew/src/php-5.3.5/Zend/zend_objects_API.c:92
#17 0x0000000000730b25 in shutdown_executor () at /home/matthew/src/php-5.3.5/Zend/zend_execute_API.c:302
#18 0x000000000073d042 in zend_deactivate () at /home/matthew/src/php-5.3.5/Zend/zend.c:890
#19 0x00000000006ea665 in php_request_shutdown (dummy=<value optimized out>) at /home/matthew/src/php-5.3.5/main/main.c:1633
#20 0x00000000007c60cc in main (argc=<value optimized out>, argv=<value optimized out>) at /home/matthew/src/php-5.3.5/sapi/cli/php_cli.c:1374
(gdb) 


segfaults.txt (8,593 bytes)   
Operating Systemubuntu 10.10
PHP Version5.3.3

Relationships

has duplicate 0000663 resolvedderick phpunit with code coverage seg fault 

Activities

mday

2011-02-03 02:32

reporter   ~0001658

Last edited: 2011-02-03 17:52

here's another gdb output:

root@matthewbox:/pool/www/www.hiding_my_domain.com/tests# gdb /usr/bin/php
GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/php...(no debugging symbols found)...done.
(gdb) run /usr/bin/phpunit --coverage-html ../public/tests/
Starting program: /usr/bin/php /usr/bin/phpunit --coverage-html ../public/tests/
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffef348700 (LWP 15242)]
[Thread 0x7fffef348700 (LWP 15242) exited]
PHPUnit 3.5.10 by Sebastian Bergmann.

..................

Time: 21 seconds, Memory: 46.00Mb

OK (18 tests, 21 assertions)

Generating code coverage report, this may take a moment.
Program received signal SIGSEGV, Segmentation fault.
0x00000000006a5967 in zend_hash_destroy ()

#0 0x00000000006a5967 in zend_hash_destroy ()
#1 0x00000000006ba7d2 in zend_object_std_dtor ()
0000002 0x00000000006ba809 in zend_objects_free_object_storage ()
0000003 0x00000000006be1fc in zend_objects_store_del_ref_by_handle_ex ()
0000004 0x00000000006b6bf8 in gc_collect_cycles ()
0000005 0x00000000006b6fc2 in gc_zobj_possible_root ()
0000006 0x00000000006e9513 in ?? ()
0000007 0x00000000006c0e90 in execute ()
0000008 0x00007ffff41e1d15 in xdebug_execute (op_array=0x15089c8) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000009 0x00000000006e9706 in ?? ()
0000010 0x00000000006c0e90 in execute ()
0000011 0x00007ffff41e1d15 in xdebug_execute (op_array=0x1508228) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000012 0x00000000006e9706 in ?? ()
0000013 0x00000000006c0e90 in execute ()
0000014 0x00007ffff41e1d15 in xdebug_execute (op_array=0x14e3968) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000015 0x00000000006e9706 in ?? ()
0000016 0x00000000006c0e90 in execute ()
0000017 0x00007ffff41e1d15 in xdebug_execute (op_array=0x14e1170) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000018 0x00000000006e9706 in ?? ()
0000019 0x00000000006c0e90 in execute ()
0000020 0x00007ffff41e1d15 in xdebug_execute (op_array=0x3f283d8) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000021 0x00000000006e9706 in ?? ()
0000022 0x00000000006c0e90 in execute ()
0000023 0x00007ffff41e1d15 in xdebug_execute (op_array=0x403b320) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000024 0x00000000006e9706 in ?? ()
0000025 0x00000000006c0e90 in execute ()
0000026 0x00007ffff41e1d15 in xdebug_execute (op_array=0x3f2fea8) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000027 0x00000000006e9706 in ?? ()
0000028 0x00000000006c0e90 in execute ()
0000029 0x00007ffff41e1d15 in xdebug_execute (op_array=0x3f2fea8) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000030 0x00000000006e9706 in ?? ()
0000031 0x00000000006c0e90 in execute ()
0000032 0x00007ffff41e1d15 in xdebug_execute (op_array=0x3f2fea8) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000033 0x00000000006e9706 in ?? ()
0000034 0x00000000006c0e90 in execute ()
#35 0x00007ffff41e1d15 in xdebug_execute (op_array=0x3f9c0e8) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000036 0x00000000006e9706 in ?? ()
0000037 0x00000000006c0e90 in execute ()
0000038 0x00007ffff41e1d15 in xdebug_execute (op_array=0x144c7b8) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000039 0x00000000006e9706 in ?? ()
0000040 0x00000000006c0e90 in execute ()
0000041 0x00007ffff41e1d15 in xdebug_execute (op_array=0x1065e30) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000042 0x00000000006e9706 in ?? ()
0000043 0x00000000006c0e90 in execute ()
0000044 0x00007ffff41e1d15 in xdebug_execute (op_array=0x103eac8) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000045 0x00000000006e9706 in ?? ()
0000046 0x00000000006c0e90 in execute ()
0000047 0x00007ffff41e1d15 in xdebug_execute (op_array=0x1028df0) at /tmp/pear/temp/xdebug/xdebug.c:1272
0000048 0x000000000069885d in zend_execute_scripts ()
#49 0x00000000006441a8 in php_execute_script ()
0000050 0x0000000000729f26 in ?? ()
#51 0x00007ffff54a9d8e in __libc_start_main () from /lib/libc.so.6
0000052 0x00000000004281e9 in _start ()

hope these help : /

without using --code-coverage (which phpunit uses xdebug for) it works just fine

mday

2011-02-03 02:41

reporter   ~0001659

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.

derick

2011-02-03 09:33

administrator   ~0001660

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:
export USE_ZEND_ALLOC=0

cheers,
Derick

mday

2011-02-03 22:28

reporter   ~0001661

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)!

derick

2011-02-03 23:26

administrator   ~0001662

I'll mark it as "resolved" then. Good luck!

mday

2011-02-09 21:30

reporter   ~0001665

reopening issue due to this issue:

has duplicate 0000663

derick

2011-02-09 21:39

administrator   ~0001666

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:
$ USE_ZEND_ALLOC=0 gdb /usr/bin/php

gdb:
(gdb) run -dzend.enable_gc=0 /usr/bin/phpunit --coverage-html ../public/tests/

Then instead of pasting the backtrace in a comment, please use the "attach file" functionality.

mday

2011-02-09 22:12

reporter   ~0001667

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.

derick

2011-02-09 22:19

administrator   ~0001668

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.

Issue History

Date Modified Username Field Change
2011-02-03 02:16 mday New Issue
2011-02-03 02:32 mday Note Added: 0001658
2011-02-03 02:41 mday Note Added: 0001659
2011-02-03 09:33 derick Note Added: 0001660
2011-02-03 09:33 derick Assigned To => derick
2011-02-03 09:33 derick Status new => feedback
2011-02-03 17:52 mday Note Edited: 0001658
2011-02-03 22:28 mday Note Added: 0001661
2011-02-03 22:28 mday Status feedback => assigned
2011-02-03 23:26 derick Note Added: 0001662
2011-02-03 23:26 derick Status assigned => resolved
2011-02-03 23:26 derick Resolution open => unable to reproduce
2011-02-09 09:34 derick Relationship added has duplicate 0000663
2011-02-09 21:30 mday Note Added: 0001665
2011-02-09 21:30 mday Status resolved => feedback
2011-02-09 21:30 mday Resolution unable to reproduce => reopened
2011-02-09 21:39 derick Note Added: 0001666
2011-02-09 22:11 mday File Added: segfaults.txt
2011-02-09 22:12 mday Note Added: 0001667
2011-02-09 22:12 mday Status feedback => assigned
2011-02-09 22:19 derick Note Added: 0001668
2011-02-09 22:19 derick Status assigned => resolved
2011-02-09 22:19 derick Resolution reopened => no change required
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized