Bug #72179 [NEW]: Segfault in gc_possible_root on CLI
| From: | webmaster at tom-geiger dot de | Date: | Mon, 09 May 2016 14:04:39 +0000 |
| Subject: | Bug #72179 [NEW]: Segfault in gc_possible_root on CLI | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-200958@lists.php.net to get a copy of this message | ||
From: webmaster at tom-geiger dot de
Operating system: Ubuntu 16.04
PHP version: 7.0.6
Package: Reproducible crash
Bug Type: Bug
Bug description:Segfault in gc_possible_root on CLI
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 bug report at https://bugs.php.net/bug.php?id=72179&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72179&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72179&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72179&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=72179&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=72179&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=72179&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=72179&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=72179&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=72179&r=support
Expected behavior: https://bugs.php.net/fix.php?id=72179&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=72179&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=72179&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=72179&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72179&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=72179&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=72179&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=72179&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72179&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=72179&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=72179&r=mysqlcfg