Bug #67735 [Opn->Csd]: PHPNG: segfault when running "composer update"
| From: | laruence@php.net | Date: | Tue, 17 Feb 2015 14:32:38 +0000 |
| Subject: | Bug #67735 [Opn->Csd]: PHPNG: segfault when running "composer update" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-190750@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67735&edit=1
ID: 67735
Updated by: laruence@php.net
Reported by: pascal dot chevrel at free dot fr
Summary: PHPNG: segfault when running "composer update"
-Status: Open
+Status: Closed
Type: Bug
Package: *General Issues
Operating System: Linux
PHP Version: Irrelevant
-Assigned To:
+Assigned To: laruence
Block user comment: N
Private report: N
New Comment:
The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2014-08-22 13:11:39] pascal dot chevrel at free dot fr
Finally succeeded in compiling master on Ubuntu and generated a backtrace:
(gdb) bt
#0 0x00000000006ff2c5 in zend_fetch_debug_backtrace
(return_value=return_value@entry=0x7f7e4472d550, skip_last=skip_last@entry=1, options=<optimized
out>, limit=0)
at /home/pascalc/repos/github/php-src/Zend/zend_builtin_functions.c:2443
#1 0x00000000006ff788 in zif_debug_backtrace (param_count=<optimized out>,
return_value=0x7f7e4472d550) at
/home/pascalc/repos/github/php-src/Zend/zend_builtin_functions.c:2567
#2 0x0000000000776ee0 in ZEND_DO_FCALL_SPEC_HANDLER (execute_data=0x7f7e4472d400) at
/home/pascalc/repos/github/php-src/Zend/zend_vm_execute.h:595
#3 0x0000000000718070 in execute_ex (execute_data=0x7f7e4472d400) at
/home/pascalc/repos/github/php-src/Zend/zend_vm_execute.h:354
#4 0x00000000006d5421 in zend_call_function (fci=fci@entry=0x7fff8aa63820, fci_cache=<optimized
out>, fci_cache@entry=0x0) at /home/pascalc/repos/github/php-src/Zend/zend_execute_API.c:851
#5 0x00000000006d5818 in call_user_function_ex (function_table=<optimized out>,
object=object@entry=0x0, function_name=function_name@entry=0x7fff8aa63980,
retval_ptr=retval_ptr@entry=0x7fff8aa63970, param_count=param_count@entry=5,
params=params@entry=0x7fff8aa639c0, no_separation=no_separation@entry=1,
symbol_table=symbol_table@entry=0x0)
at /home/pascalc/repos/github/php-src/Zend/zend_execute_API.c:656
#6 0x00000000006e7034 in zend_error (type=type@entry=2, format=format@entry=0xadda2b
"%s") at /home/pascalc/repos/github/php-src/Zend/zend.c:1205
#7 0x000000000067e2c1 in php_verror (docref=<optimized out>, params=<optimized out>,
type=2, format=<optimized out>, args=args@entry=0x7fff8aa63bb8)
at /home/pascalc/repos/github/php-src/main/main.c:920
#8 0x000000000067ea9d in php_error_docref1 (docref=docref@entry=0x0,
param1=param1@entry=0x7f7e42938fa0 "/.atoum.php", type=type@entry=2,
format=format@entry=0xa9cd27 "%s: %s")
at /home/pascalc/repos/github/php-src/main/main.c:944
#9 0x00000000006967e0 in php_stream_display_wrapper_errors (wrapper=wrapper@entry=0xe11b80
<php_plain_files_wrapper>, path=path@entry=0x7f7e44816a04 "/.atoum.php",
caption=caption@entry=0xadfed9 "failed to open stream") at
/home/pascalc/repos/github/php-src/main/streams/streams.c:225
#10 0x0000000000699752 in _php_stream_open_wrapper_ex (path=path@entry=0x7f7e44816a04
"/.atoum.php", mode=mode@entry=0xafb418 "rb", options=<optimized out>,
opened_path=opened_path@entry=0x7fff8aa63e70, context=context@entry=0x0) at
/home/pascalc/repos/github/php-src/main/streams/streams.c:2148
#11 0x000000000067ed38 in php_stream_open_for_zend_ex (filename=0x7f7e44816a04
"/.atoum.php", handle=0x7fff8aa63e60, mode=<optimized out>) at
/home/pascalc/repos/github/php-src/main/main.c:1392
#12 0x0000000000749fcb in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER (execute_data=0x7f7e4472d300) at
/home/pascalc/repos/github/php-src/Zend/zend_vm_execute.h:31321
#13 0x0000000000718070 in execute_ex (execute_data=0x7f7e4472d300) at
/home/pascalc/repos/github/php-src/Zend/zend_vm_execute.h:354
#14 0x00000000006d5421 in zend_call_function (fci=fci@entry=0x7fff8aa64070, fci_cache=<optimized
out>, fci_cache@entry=0x0) at /home/pascalc/repos/github/php-src/Zend/zend_execute_API.c:851
#15 0x00000000006d5818 in call_user_function_ex (function_table=<optimized out>,
object=object@entry=0x0, function_name=<optimized out>,
retval_ptr=retval_ptr@entry=0x7fff8aa64100,
param_count=<optimized out>, params=<optimized out>,
no_separation=no_separation@entry=1, symbol_table=symbol_table@entry=0x0) at
/home/pascalc/repos/github/php-src/Zend/zend_execute_API.c:656
#16 0x00000000006d5849 in call_user_function (function_table=<optimized out>,
object=object@entry=0x0, function_name=<optimized out>,
retval_ptr=retval_ptr@entry=0x7fff8aa64100,
param_count=<optimized out>, params=<optimized out>) at
/home/pascalc/repos/github/php-src/Zend/zend_execute_API.c:638
#17 0x0000000000610f80 in user_shutdown_function_call (zv=<optimized out>) at
/home/pascalc/repos/github/php-src/ext/standard/basic_functions.c:4869
#18 0x00000000006f80aa in zend_hash_apply (ht=0x7f7e448198a8, apply_func=apply_func@entry=0x610f10
<user_shutdown_function_call>) at /home/pascalc/repos/github/php-src/Zend/zend_hash.c:1022
#19 0x00000000006156f6 in php_call_shutdown_functions () at
/home/pascalc/repos/github/php-src/ext/standard/basic_functions.c:4961
#20 0x000000000067f7bd in php_request_shutdown (dummy=dummy@entry=0x0) at
/home/pascalc/repos/github/php-src/main/main.c:1803
#21 0x000000000077963a in do_cli (argc=4, argv=0x29f6870) at
/home/pascalc/repos/github/php-src/sapi/cli/php_cli.c:1157
#22 0x000000000042e4e0 in main (argc=4, argv=0x29f6870) at
/home/pascalc/repos/github/php-src/sapi/cli/php_cli.c:1358
------------------------------------------------------------------------
[2014-08-11 21:24:02] ingo dot walz at googlemail dot com
I got a backtrace running the composer test suite against phpng:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00000000009dbbbc in destroy_zend_class (pce=0x25c94b8)
at /home/dev/phpng/php-src/Zend/zend_opcode.c:273
273 if (--ce->refcount > 0) {
(gdb) bt
#0 0x00000000009dbbbc in destroy_zend_class (pce=0x25c94b8)
at /home/dev/phpng/php-src/Zend/zend_opcode.c:273
#1 0x0000000000a025ff in zend_hash_destroy (ht=0x22932a0)
at /home/dev/phpng/php-src/Zend/zend_hash.c:548
#2 0x00000000009eb924 in compiler_globals_dtor (compiler_globals=0x2292ef0,
tsrm_ls=0x228fd30) at /home/dev/phpng/php-src/Zend/zend.c:544
#3 0x0000000000926017 in tsrm_shutdown ()
at /home/dev/phpng/php-src/TSRM/TSRM.c:180
#4 0x0000000000ab7a6e in main (argc=4, argv=0x228fbe0)
at /home/dev/phpng/php-src/sapi/cli/php_cli.c:1399
It happened with this data provider value:
https://github.com/composer/composer/blob/master/tests/Composer/Test/Repository/PearRepositoryTest.php#L94-L99
------------------------------------------------------------------------
[2014-08-11 19:31:45] ingo dot walz at googlemail dot com
If you can provide additional information, I can try to reproduce it and generate the backtrace.
I saw a really strange behaviour in atoum, but no segfault.
I tried to run the atoum testsuite with phpng, installed via composer:
composer.json:
{
"require": {
"atoum/atoum": "*"
}
}
$ wget https://getcomposer.org/composer.phar
$ ../phpng/bin/php composer.phar update
$ cd vendor/atoum/atoum/
$ ../phpng/bin/php scripts/runner.php --test-it
[ Skip ]
Error: Data provider mageekguy\atoum\tests\units\asserters\float::testIsNearlyEqualToDataProvider()
is unknown
(linked to this condition https://github.com/atoum/atoum/blob/master/classes/test.php#L1310
)
The same with a regular git checkout (also with phpng):
$ git clone https://github.com/atoum/atoum .
$ ../phpng/bin/php scripts/runner.php --test-it
-> Works fine, no Exception
No errors with PHP 5.5.14 in both variants ...
Following could be helpful:
- The atoum testfile, causing the segfault
- The version of atoum
I can provide the backtrace if I'm able to reproduce it. Not sure if we're talking about
the same issue ...
------------------------------------------------------------------------
[2014-08-11 14:24:18] tyrael@php.net
as Julien mentioned previously here is how to generate a backtrace from a coredump:
https://bugs.php.net/bugs-generating-backtrace.php
basically you call gdb (which assumes you have gdb installed and it is also advised to have the
debug symbols installed otherwise the backtrace won't be much help) with the binary which was
used to generate the dump (the php cli in your case) and the crashdump:
gdb /path/to/php /path/to/the/core/file
then from gdb you execute:
bt
then you can copypaste the backtrace to the bugreport.
------------------------------------------------------------------------
[2014-08-11 14:10:19] imprec at gmail dot com
Just copy/paste the backtrace as bug comment
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=67735
--
Edit this bug report at https://bugs.php.net/bug.php?id=67735&edit=1