I have run across a weird segfault with the current master when trying
to run PHPUnit (using PHPUnit's own test suite). Weird because I get a
segfault immediately on startup with a release build and a segfault much
later when using a debug build. Detailed information is below, let me
know if there is any additional information I should provide.
PHP 7, built from master@dc37d3e8c2248f4f4437547bc7225276e22ea41d
$ /home/sb/php-7 -v
PHP 7.0.0-dev (cli) (built: Jun 14 2015 07:07:10)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, ...
$ /home/sb/php-7-debug -v
PHP 7.0.0-dev (cli) (built: Jun 14 2015 07:12:50) (DEBUG)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, ...
$ git clone https://github.com/sebastianbergmann/phpunit.git
$ cd phpunit
$ wget https://getcomposer.org/composer.phar
$ php composer.phar install
$ /home/sb/php-7 phpunit
[1] 16741 segmentation fault (core dumped) /home/sb/php-7 phpunit
$ gdb /home/sb/php-7
GNU gdb (GDB) Fedora 7.9.1-13.fc22
Copyright (C) 2015 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-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/sb/php-7...(no debugging symbols found)...done.
(gdb) r phpunit
Starting program: /home/sb/php-7 phpunit
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00000000007c3a29 in _zval_ptr_dtor ()
(gdb) bt
#0 0x00000000007c3a29 in _zval_ptr_dtor ()
#1 0x00000000007bc09f in zend_compile_short_circuiting ()
#2 0x00000000007bac3f in zend_compile_expr ()
#3 0x00000000007bdfe8 in zend_compile_return ()
#4 0x00000000007bfbcd in zend_compile_stmt ()
#5 0x00000000007c03d7 in zend_compile_stmt_list ()
#6 0x00000000007bfb13 in zend_compile_stmt ()
#7 0x00000000007c1aa6 in zend_compile_func_decl ()
#8 0x00000000007bfc42 in zend_compile_stmt ()
#9 0x00000000007c03d7 in zend_compile_stmt_list ()
#10 0x00000000007bfb13 in zend_compile_stmt ()
#11 0x00000000007c06f4 in zend_compile_class_decl ()
#12 0x00000000007bfca5 in zend_compile_stmt ()
#13 0x00000000007c1cca in zend_compile_top_stmt ()
#14 0x00000000007c1d1f in zend_compile_top_stmt ()
#15 0x000000000079e946 in compile_file ()
#16 0x0000000000657f65 in phar_compile_file ()
#17 0x000000000079eb03 in compile_filename ()
#18 0x000000000086053c in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER ()
#19 0x0000000000811f6b in execute_ex ()
#20 0x00000000007c510b in zend_call_function ()
#21 0x00000000007f0d0e in zend_call_method ()
#22 0x00000000006c0489 in zif_spl_autoload_call ()
#23 0x00000000007c520b in zend_call_function ()
#24 0x00000000007c5712 in zend_lookup_class_ex ()
#25 0x00000000007eb7e1 in zif_class_exists ()
#26 0x00000000008231fd in ZEND_DO_ICALL_SPEC_HANDLER ()
#27 0x0000000000811f6b in execute_ex ()
#28 0x0000000000866ef7 in zend_execute ()
#29 0x00000000007d3b45 in zend_execute_scripts ()
#30 0x00000000007773f0 in php_execute_script ()
#31 0x0000000000868751 in do_cli ()
#32 0x0000000000440d9b in main ()
$ /home/sb/php-7-debug phpunit
PHPUnit 5.0-gabce26e by Sebastian Bergmann and contributors.
Runtime: PHP 7.0.0-dev
Configuration: /usr/local/src/phpunit/phpunit.xml.dist
............................................................. 61 / 1313
( 4%)
............................................................. 122 / 1313
( 9%)
............................................................. 183 / 1313
( 13%)
............................................................. 244 / 1313
( 18%)
............................................................. 305 / 1313
( 23%)
............................................................. 366 / 1313
( 27%)
............................................................. 427 / 1313
( 32%)
............................................................. 488 / 1313
( 37%)
............................................................. 549 / 1313
( 41%)
............................................................. 610 / 1313
( 46%)
................................S............................ 671 / 1313
( 51%)
............................................................. 732 / 1313
( 55%)
............................................................. 793 / 1313
( 60%)
............................................................. 854 / 1313
( 65%)
............................................................. 915 / 1313
( 69%)
.......[1] 23387 segmentation fault (core dumped)
/home/sb/php-7-debug phpunit
$ gdb /home/sb/php-7-debug
GNU gdb (GDB) Fedora 7.9.1-13.fc22
Copyright (C) 2015 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-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/sb/php-7-debug...done.
(gdb) r phpunit
Starting program: /home/sb/php-7-debug phpunit
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Detaching after fork from child process 29552.
Detaching after fork from child process 29553.
PHPUnit 5.0-gabce26e by Sebastian Bergmann and contributors.
Runtime: PHP 7.0.0-dev
Configuration: /usr/local/src/phpunit/phpunit.xml.dist
............................................................. 61 / 1313
( 4%)
............................................................. 122 / 1313
( 9%)
............................................................. 183 / 1313
( 13%)
............................................................. 244 / 1313
( 18%)
............................................................. 305 / 1313
( 23%)
............................................................. 366 / 1313
( 27%)
............................................................. 427 / 1313
( 32%)
............................................................. 488 / 1313
( 37%)
............................................................. 549 / 1313
( 41%)
............................................................. 610 / 1313
( 46%)
................................Detaching after fork from child process
S............................ 671 / 1313 ( 51%)
............................................................. 732 / 1313
( 55%)
............................................................. 793 / 1313
( 60%)
....................................Detaching after fork from child
process 29556.
......................... 854 / 1313 ( 65%)
............................................................. 915 / 1313
( 69%)
.......
Program received signal SIGSEGV, Segmentation fault.
0x0000000000972715 in zend_object_is_true (op=0x7fffee819840) at
/usr/local/src/php/src/Zend/zend_operators.c:2310
2310 if (Z_OBJ_HT_P(op)->cast_object) {
(gdb) bt
#0 0x0000000000972715 in zend_object_is_true (op=0x7fffee819840) at
/usr/local/src/php/src/Zend/zend_operators.c:2310
#1 0x00000000009c8ba3 in i_zend_is_true (op=0x7fffee819840) at
/usr/local/src/php/src/Zend/zend_operators.h:317
#2 0x0000000000a27b2f in ZEND_JMPZ_SPEC_TMPVAR_HANDLER () at
/usr/local/src/php/src/Zend/zend_vm_execute.h:40811
#3 0x00000000009d0344 in execute_ex (ex=0x7fffee8190d0) at
/usr/local/src/php/src/Zend/zend_vm_execute.h:394
#4 0x0000000000960c4b in zend_call_function (fci=0x7fffffffa1c0,
fci_cache=0x7fffffffa190) at
/usr/local/src/php/src/Zend/zend_execute_API.c:841
#5 0x0000000000782baa in zim_reflection_method_invokeArgs
(execute_data=0x7fffee819050, return_value=0x7fffee818d50) at
/usr/local/src/php/src/ext/reflection/php_reflection.c:3359
#6 0x00000000009d14f6 in ZEND_DO_FCALL_SPEC_HANDLER () at
/usr/local/src/php/src/Zend/zend_vm_execute.h:821
#7 0x00000000009d0344 in execute_ex (ex=0x7fffee814030) at
/usr/local/src/php/src/Zend/zend_vm_execute.h:394
#8 0x00000000009d0456 in zend_execute (op_array=0x7fffee871100,
return_value=0x0) at /usr/local/src/php/src/Zend/zend_vm_execute.h:434
#9 0x000000000097874a in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/local/src/php/src/Zend/zend.c:1389
#10 0x00000000008ea94c in php_execute_script
(primary_file=0x7fffffffda00) at /usr/local/src/php/src/main/main.c:2475
#11 0x0000000000a36ed5 in do_cli (argc=2, argv=0x13593f0) at
/usr/local/src/php/src/sapi/cli/php_cli.c:967
#12 0x0000000000a37e9d in main (argc=2, argv=0x13593f0) at
/usr/local/src/php/src/sapi/cli/php_cli.c:1334
Am 14.06.2015 um 07:29 schrieb Sebastian Bergmann:
I have run across a weird segfault with the current master when trying
to run PHPUnit (using PHPUnit's own test suite). Weird because I get a
segfault immediately on startup with a release build and a segfault much
later when using a debug build. Detailed information is below, let me
know if there is any additional information I should provide.
Forgot to mention that I get no segfault with Alpha 1.
Hey:
Am 14.06.2015 um 07:29 schrieb Sebastian Bergmann:
I have run across a weird segfault with the current master when trying
to run PHPUnit (using PHPUnit's own test suite). Weird because I get a
segfault immediately on startup with a release build and a segfault much
later when using a debug build. Detailed information is below, let me
know if there is any additional information I should provide.Forgot to mention that I get no segfault with Alpha 1.
maybe related to this : 3cfa58367b1b85d346d9be6cf9ae116c63571247
could you please try again with revert that?
thanks
--
--
Xinchen Hui
@Laruence
http://www.laruence.com/
Am 14.06.2015 um 07:55 schrieb Xinchen Hui:
maybe related to this : 3cfa58367b1b85d346d9be6cf9ae116c63571247
Yes, reverting that commit fixes it. Thanks for the pointer!
Hey Bob:
Am 14.06.2015 um 07:55 schrieb Xinchen Hui:
maybe related to this : 3cfa58367b1b85d346d9be6cf9ae116c63571247
Yes, reverting that commit fixes it. Thanks for the pointer!
please have a look of it.. I'd like revert it for now..
commit it again when it is fixed... ?
thanks
--
--
Xinchen Hui
@Laruence
http://www.laruence.com/