Bug #72670 [NEW]: PHP segfaults when accessing website
| From: | rene at renekliment dot cz | Date: | Mon, 25 Jul 2016 16:51:36 +0000 |
| Subject: | Bug #72670 [NEW]: PHP segfaults when accessing website | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-202584@lists.php.net to get a copy of this message | ||
From: rene at renekliment dot cz
Operating system: Arch Linux
PHP version: 7.0.9
Package: Reproducible crash
Bug Type: Bug
Bug description:PHP segfaults when accessing website
Description:
------------
I have a website based on an old version of the Nette framework. In
order to run it under PHP 7, I've updated it to use Nette 2.4, which
works fine under PHP 5.6. When I try to run it under PHP 7, the PHP
segfaults. I see no output from PHP, it just crashes.
I'm running Arch Linux with PHP 7.0.9 re-compiled with the 'debug'
option. The website also crashes under PHP 7.0.8 @ Ubuntu 16.04.1. I've
tested running it under nginx and php built-in webserver - there's no
difference there.
Appreciate any help on this.
Actual result:
--------------
renekl@piggy ~/workspace/... (git)-[new-nette] % coredumpctl gdb
PID: 4963 (php-fpm)
UID: 1000 (renekl)
GID: 1000 (renekl)
Signal: 11 (SEGV)
Timestamp: Po 2016-07-25 18:37:03 CEST (13s ago)
Command Line: php-fpm: pool www
Executable: /usr/bin/php-fpm
Control Group: /system.slice/php-fpm.service
Unit: php-fpm.service
Slice: system.slice
Boot ID: 7ec588f9d12a43fd8d9d26baafa56c93
Machine ID: a7f71c7482e8478c8c56abd5b16288a6
Hostname: piggy
Coredump:
/var/lib/systemd/coredump/core.php-fpm.1000.7ec588f9d12a43fd8d9d26baafa56c93.4963.1469464623000000000000.lz4
Message: Process 4963 (php-fpm) of user 1000 dumped core.
Stack trace of thread 4963:
#0 0x0000000000683e25 _zval_get_string_func (php-fpm)
#1 0x00000000005490b8 _zval_get_string (php-fpm)
#2 0x000000000054aa8c
zim_reflection_parameter___toString (php-fpm)
#3 0x000000000067d423 zend_call_function (php-fpm)
#4 0x00000000006aa412 zend_call_method (php-fpm)
#5 0x00000000006c5d53 zend_std_cast_object_tostring
(php-fpm)
#6 0x0000000000683d6e _zval_get_string_func (php-fpm)
#7 0x00000000005cab6e _zval_get_string (php-fpm)
#8 0x00000000005cafd3 zif_implode (php-fpm)
#9 0x0000000000710cbf
ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (php-fpm)
#10 0x00000000006cda1b execute_ex (php-fpm)
#11 0x0000000000720557 zend_execute (php-fpm)
#12 0x000000000068bad3 zend_execute_scripts (php-fpm)
#13 0x000000000062c140 php_execute_script (php-fpm)
#14 0x0000000000433ccc main (php-fpm)
#15 0x00007f8ca3447741 __libc_start_main (libc.so.6)
#16 0x0000000000434af9 _start (php-fpm)
GNU gdb (GDB) 7.11.1
...
This GDB was configured as "x86_64-pc-linux-gnu".
...
Reading symbols from /usr/bin/php-fpm...done.
[New LWP 4963]
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `php-fpm: pool www
'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000000000683e25 in _zval_get_string_func
(op=op@entry=0x7fff071b36f0) at
/tmp/php/src/php-7.0.9/Zend/zend_operators.c:845
845 zval *z = Z_OBJ_HT_P(op)->get(op, &tmp);
(gdb) bt
#0 0x0000000000683e25 in _zval_get_string_func
(op=op@entry=0x7fff071b36f0) at
/tmp/php/src/php-7.0.9/Zend/zend_operators.c:845
#1 0x00000000005490b8 in _zval_get_string (op=0x7fff071b36f0) at
/tmp/php/src/php-7.0.9/Zend/zend_operators.h:266
#2 _parameter_string (str=str@entry=0x7fff071b3740,
fptr=0x7f8c97804bb8, arg_info=<optimized out>, offset=<optimized out>,
required=<optimized out>, indent=0xbdac0f "") at
/tmp/php/src/php-7.0.9/ext/reflection/php_reflection.c:716
#3 0x000000000054aa8c in zim_reflection_parameter___toString
(execute_data=<optimized out>, return_value=0x7fff071b39d0)
at /tmp/php/src/php-7.0.9/ext/reflection/php_reflection.c:2529
#4 0x000000000067d423 in zend_call_function
(fci=fci@entry=0x7fff071b38f0,
fci_cache=fci_cache@entry=0x7fff071b38c0)
at /tmp/php/src/php-7.0.9/Zend/zend_execute_API.c:885
#5 0x00000000006aa412 in zend_call_method
(object=object@entry=0x7f8c978a51a8, obj_ce=<optimized out>,
obj_ce@entry=0x2066460,
fn_proxy=fn_proxy@entry=0x2066590,
function_name=function_name@entry=0xc1c288 "__tostring",
function_name_len=function_name_len@entry=10,
retval_ptr=retval_ptr@entry=0x7fff071b39d0, param_count=0, arg1=0x0,
arg2=0x0)
at /tmp/php/src/php-7.0.9/Zend/zend_interfaces.c:104
#6 0x00000000006c5d53 in zend_std_cast_object_tostring
(readobj=0x7f8c978a51a8, writeobj=0x7fff071b3a50, type=<optimized out>)
at /tmp/php/src/php-7.0.9/Zend/zend_object_handlers.c:1568
#7 0x0000000000683d6e in _zval_get_string_func
(op=op@entry=0x7f8c978a51a8) at
/tmp/php/src/php-7.0.9/Zend/zend_operators.c:841
#8 0x00000000005cab6e in _zval_get_string (op=0x7f8c978a51a8) at
/tmp/php/src/php-7.0.9/Zend/zend_operators.h:266
#9 php_implode (delim=delim@entry=0x1f13570, arr=<optimized out>,
return_value=return_value@entry=0x7f8ca2016910)
at /tmp/php/src/php-7.0.9/ext/standard/string.c:1244
#10 0x00000000005cafd3 in zif_implode (execute_data=0x7f8ca2016b50,
return_value=0x7f8ca2016910)
at /tmp/php/src/php-7.0.9/ext/standard/string.c:1325
#11 0x0000000000710cbf in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER () at
/tmp/php/src/php-7.0.9/Zend/zend_vm_execute.h:714
#12 0x00000000006cda1b in execute_ex (ex=<optimized out>) at
/tmp/php/src/php-7.0.9/Zend/zend_vm_execute.h:414
#13 0x0000000000720557 in zend_execute
(op_array=op_array@entry=0x7f8ca2076000,
return_value=return_value@entry=0x7f8c97c407a0)
at /tmp/php/src/php-7.0.9/Zend/zend_vm_execute.h:458
#14 0x000000000068bad3 in zend_execute_scripts (type=-1576966512,
type@entry=8, retval=0x7f8c97c407a0, retval@entry=0x0,
file_count=file_count@entry=3) at
/tmp/php/src/php-7.0.9/Zend/zend.c:1427
#15 0x000000000062c140 in php_execute_script
(primary_file=primary_file@entry=0x7fff071b61a0)
at /tmp/php/src/php-7.0.9/main/main.c:2494
#16 0x0000000000433ccc in main (argc=<optimized out>, argv=<optimized
out>) at /tmp/php/src/php-7.0.9/sapi/fpm/fpm/fpm_main.c:1968
--
Edit bug report at https://bugs.php.net/bug.php?id=72670&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72670&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72670&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72670&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=72670&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=72670&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=72670&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=72670&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=72670&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=72670&r=support
Expected behavior: https://bugs.php.net/fix.php?id=72670&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=72670&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=72670&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=72670&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72670&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=72670&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=72670&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=72670&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72670&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=72670&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=72670&r=mysqlcfg