Bug #72179 [Opn]: Segfault in gc_possible_root on CLI
| From: | webmaster at tom-geiger dot de | Date: | Mon, 09 May 2016 14:06:19 +0000 |
| Subject: | Bug #72179 [Opn]: Segfault in gc_possible_root on CLI | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-200959@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72179&edit=1
ID: 72179
User updated by: webmaster at tom-geiger dot de
Reported by: webmaster at tom-geiger dot de
Summary: Segfault in gc_possible_root on CLI
Status: Open
Type: Bug
Package: Reproducible crash
Operating System: Ubuntu 16.04
PHP Version: 7.0.6
Block user comment: N
Private report: N
New Comment:
The Stacktrace says 7.0.4, but the problem persists using the 7.0.6 packages from Ondrejs PPA.
Previous Comments:
------------------------------------------------------------------------
[2016-05-09 14:04:33] webmaster at tom-geiger dot de
Description:
------------
PHP CLI segfaults during a loop handling events from a database. At some point the GC segfaults the
script.
Adding gc_disable() at the start of the script will let it run through without error.
gdb bt attached.
See filed Ubuntu Bug: https://bugs.launchpad.net/bugs/1559693
"Segmentation fault (core dumped) while running an CLI "daemon" script that does a
multitude of database operations onto a mysql database. (mysqli)
Happens randomly, and not always at the same position of test data after processing multiple
thousand different SQL queries (Select, insert, update, delete).
Restarting the script after crash will successfully complete all test data.
Test data sadly can't be published because of privacy concerns."
StacktraceTop:
gc_possible_root (ref=0x7f1599693620) at /build/php7.0-XlnpcA/php7.0-7.0.4/Zend/zend_gc.c:262
zend_assign_to_variable (value_type=16 '\020', value=0x7f15996f4980,
variable_ptr=0x7f15afc15b30) at /build/php7.0-XlnpcA/php7.0-7.0.4/Zend/zend_execute.h:109
ZEND_FE_FETCH_R_SPEC_VAR_HANDLER () at
/build/php7.0-XlnpcA/php7.0-7.0.4/Zend/zend_vm_execute.h:15938
execute_ex (ex=ex@entry=0x7f15afc15ab0) at
/build/php7.0-XlnpcA/php7.0-7.0.4/Zend/zend_vm_execute.h:414
dtrace_execute_ex (execute_data=0x7f15afc15ab0) at
/build/php7.0-XlnpcA/php7.0-7.0.4/Zend/zend_dtrace.c:83
Expected result:
----------------
No segfault.
Actual result:
--------------
0x000055c1fb3dcabf in execute_ex ()
(gdb) cont
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x000055c1fb3c54bf in gc_possible_root ()
(gdb) bt
#0 0x000055c1fb3c54bf in gc_possible_root ()
#1 0x000055c1fb3e3870 in ?? ()
#2 0x000055c1fb3dcacb in execute_ex ()
#3 0x000055c1fb38c511 in dtrace_execute_ex ()
#4 0x00007fe1ceb434ef in xdebug_execute_ex (execute_data=0x7fe1cf4168c0) at
/build/xdebug-QTCpEl/xdebug-2.4.0/build-7.0/xdebug.c:1890
#5 0x000055c1fb4215ad in ?? ()
#6 0x000055c1fb3dcacb in execute_ex ()
#7 0x000055c1fb38c511 in dtrace_execute_ex ()
#8 0x00007fe1ceb434ef in xdebug_execute_ex (execute_data=0x7fe1cf416580) at
/build/xdebug-QTCpEl/xdebug-2.4.0/build-7.0/xdebug.c:1890
#9 0x000055c1fb4215ad in ?? ()
#10 0x000055c1fb3dcacb in execute_ex ()
#11 0x000055c1fb38c511 in dtrace_execute_ex ()
#12 0x00007fe1ceb434ef in xdebug_execute_ex (execute_data=0x7fe1cf4164c0) at
/build/xdebug-QTCpEl/xdebug-2.4.0/build-7.0/xdebug.c:1890
#13 0x000055c1fb4215ad in ?? ()
#14 0x000055c1fb3dcacb in execute_ex ()
#15 0x000055c1fb38c511 in dtrace_execute_ex ()
#16 0x00007fe1ceb434ef in xdebug_execute_ex (execute_data=0x7fe1cf4163f0) at
/build/xdebug-QTCpEl/xdebug-2.4.0/build-7.0/xdebug.c:1890
#17 0x000055c1fb4215ad in ?? ()
#18 0x000055c1fb3dcacb in execute_ex ()
#19 0x000055c1fb38c511 in dtrace_execute_ex ()
#20 0x00007fe1ceb434ef in xdebug_execute_ex (execute_data=0x7fe1cf415db0) at
/build/xdebug-QTCpEl/xdebug-2.4.0/build-7.0/xdebug.c:1890
#21 0x000055c1fb4215ad in ?? ()
#22 0x000055c1fb3dcacb in execute_ex ()
#23 0x000055c1fb38c511 in dtrace_execute_ex ()
#24 0x00007fe1ceb434ef in xdebug_execute_ex (execute_data=0x7fe1cf415b60) at
/build/xdebug-QTCpEl/xdebug-2.4.0/build-7.0/xdebug.c:1890
#25 0x000055c1fb4215ad in ?? ()
#26 0x000055c1fb3dcacb in execute_ex ()
#27 0x000055c1fb38c511 in dtrace_execute_ex ()
#28 0x00007fe1ceb434ef in xdebug_execute_ex (execute_data=0x7fe1cf415280) at
/build/xdebug-QTCpEl/xdebug-2.4.0/build-7.0/xdebug.c:1890
#29 0x000055c1fb4215ad in ?? ()
#30 0x000055c1fb3dcacb in execute_ex ()
#31 0x000055c1fb38c511 in dtrace_execute_ex ()
#32 0x00007fe1ceb434ef in xdebug_execute_ex (execute_data=0x7fe1cf414ae0) at
/build/xdebug-QTCpEl/xdebug-2.4.0/build-7.0/xdebug.c:1890
#33 0x000055c1fb4215ad in ?? ()
#34 0x000055c1fb3dcacb in execute_ex ()
#35 0x000055c1fb38c511 in dtrace_execute_ex ()
#36 0x00007fe1ceb434ef in xdebug_execute_ex (execute_data=0x7fe1cf4149b0) at
/build/xdebug-QTCpEl/xdebug-2.4.0/build-7.0/xdebug.c:1890
#37 0x000055c1fb4215ad in ?? ()
#38 0x000055c1fb3dcacb in execute_ex ()
#39 0x000055c1fb38c511 in dtrace_execute_ex ()
#40 0x00007fe1ceb434ef in xdebug_execute_ex (execute_data=0x7fe1cf414650) at
/build/xdebug-QTCpEl/xdebug-2.4.0/build-7.0/xdebug.c:1890
#41 0x000055c1fb4215ad in ?? ()
#42 0x000055c1fb3dcacb in execute_ex ()
#43 0x000055c1fb38c511 in dtrace_execute_ex ()
#44 0x00007fe1ceb434ef in xdebug_execute_ex (execute_data=0x7fe1cf4144d0) at
/build/xdebug-QTCpEl/xdebug-2.4.0/build-7.0/xdebug.c:1890
#45 0x000055c1fb4215ad in ?? ()
#46 0x000055c1fb3dcacb in execute_ex ()
#47 0x000055c1fb38c511 in dtrace_execute_ex ()
#48 0x00007fe1ceb434ef in xdebug_execute_ex (execute_data=0x7fe1cf414030) at
/build/xdebug-QTCpEl/xdebug-2.4.0/build-7.0/xdebug.c:1890
#49 0x000055c1fb430537 in zend_execute ()
---Type <return> to continue, or q <return> to quit---bt
#50 0x000055c1fb39c713 in zend_execute_scripts ()
#51 0x000055c1fb33d130 in php_execute_script ()
#52 0x000055c1fb4321f7 in ?? ()
#53 0x000055c1fb221f64 in main ()
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72179&edit=1