Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1140209

Summary: Segfault in garbage collection
Product: Red Hat Enterprise Linux 6 Reporter: Leonard den Ottolander <leonard-rh-bugzilla>
Component: phpAssignee: Remi Collet <rcollet>
Status: CLOSED WONTFIX QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.5CC: jorton, rcollet
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1140247 (view as bug list) Environment:
Last Closed: 2017-10-17 07:41:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1140247    
Attachments:
Description Flags
test case causing crash none

Description Leonard den Ottolander 2014-09-10 13:46:58 UTC
Created attachment 936164 [details]
test case causing crash

Description of problem:

Segfault in garbage collection when running attached script.


Version-Release number of selected component (if applicable):

php-5.3.3-27.el6_5.1.x86_64


How reproducible:

Run attached script from the command line.


Steps to Reproduce:

ganon located in directory ganon (http://code.google.com/p/ganon)
directory files available
index.php and ganon-mod.php (attached)

$ php index.php


Actual results:

<snip>
dio_truncate
dio_write
Directories: ref.dir.php
Segmentation fault (core dumped)


Expected results:

No segfault.


Additional info:

CentOS 6.5 current.

(gdb) bt
#0  0x00000000005c5e29 in gc_zval_possible_root (zv=0x526ba68)
    at /usr/src/debug/php-5.3.3/Zend/zend_gc.c:143
#1  0x00000000005b4a1b in zend_hash_destroy (ht=0x27844e8)
    at /usr/src/debug/php-5.3.3/Zend/zend_hash.c:526
#2  0x00000000005c7419 in zend_object_std_dtor (object=0x2785108)
    at /usr/src/debug/php-5.3.3/Zend/zend_objects.c:45
#3  0x00000000005c7439 in zend_objects_free_object_storage (object=0x2785108)
    at /usr/src/debug/php-5.3.3/Zend/zend_objects.c:128
#4  0x00000000005cadfc in zend_objects_store_del_ref_by_handle_ex (
    handle=1516, handlers=<value optimized out>)
    at /usr/src/debug/php-5.3.3/Zend/zend_objects_API.c:220
#5  0x00000000005c5988 in gc_collect_cycles ()
    at /usr/src/debug/php-5.3.3/Zend/zend_gc.c:703
#6  0x00000000005c5e74 in gc_zval_possible_root (zv=<value optimized out>)
    at /usr/src/debug/php-5.3.3/Zend/zend_gc.c:166
#7  0x000000000062c774 in gc_zval_check_possible_root (
    execute_data=0x7f102330ace0) at /usr/src/debug/php-5.3.3/Zend/zend_gc.h:183
#8  zend_pzval_unlock_func (execute_data=0x7f102330ace0)
    at /usr/src/debug/php-5.3.3/Zend/zend_execute.c:80
#9  _get_zval_ptr_ptr_var (execute_data=0x7f102330ace0)
    at /usr/src/debug/php-5.3.3/Zend/zend_execute.c:292
#10 ZEND_ASSIGN_DIM_SPEC_VAR_CONST_HANDLER (execute_data=0x7f102330ace0)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:10332
#11 0x00000000005cd990 in execute (op_array=0x7f10232c5678)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:107
#12 0x00007f102ab8b4b8 in xdebug_execute ()
   from /usr/lib64/php/modules/xdebug.so
#13 0x00000000005f6366 in zend_do_fcall_common_helper_SPEC (
    execute_data=<value optimized out>)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:340
#14 0x00000000005cd990 in execute (op_array=0x1b346e0)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:107
#15 0x00007f102ab8b4b8 in xdebug_execute ()
   from /usr/lib64/php/modules/xdebug.so
#16 0x00000000005f6366 in zend_do_fcall_common_helper_SPEC (
    execute_data=<value optimized out>)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:340
#17 0x00000000005cd990 in execute (op_array=0x7f10232c4fe8)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:107
#18 0x00007f102ab8b4b8 in xdebug_execute ()
   from /usr/lib64/php/modules/xdebug.so
#19 0x00000000005f6366 in zend_do_fcall_common_helper_SPEC (
    execute_data=<value optimized out>)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:340
#20 0x00000000005cd990 in execute (op_array=0x7f10232c57d8)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:107
#21 0x00007f102ab8b4b8 in xdebug_execute ()
   from /usr/lib64/php/modules/xdebug.so
#22 0x00000000005f6366 in zend_do_fcall_common_helper_SPEC (
    execute_data=<value optimized out>)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:340
#23 0x00000000005cd990 in execute (op_array=0x1b42af0)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:107
#24 0x00007f102ab8b4b8 in xdebug_execute ()
   from /usr/lib64/php/modules/xdebug.so
#25 0x00000000005f6366 in zend_do_fcall_common_helper_SPEC (
    execute_data=<value optimized out>)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:340
#26 0x00000000005cd990 in execute (op_array=0x7f10232c52a8)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:107
#27 0x00007f102ab8b4b8 in xdebug_execute ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib64/php/modules/xdebug.so
#28 0x00000000005f6366 in zend_do_fcall_common_helper_SPEC (
    execute_data=<value optimized out>)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:340
#29 0x00000000005cd990 in execute (op_array=0x1af8e78)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:107
#30 0x00007f102ab8b4b8 in xdebug_execute ()
   from /usr/lib64/php/modules/xdebug.so
#31 0x00000000005f6366 in zend_do_fcall_common_helper_SPEC (
    execute_data=<value optimized out>)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:340
#32 0x00000000005cd990 in execute (op_array=0x1b57818)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:107
#33 0x00007f102ab8b4b8 in xdebug_execute ()
   from /usr/lib64/php/modules/xdebug.so
#34 0x00000000005f6366 in zend_do_fcall_common_helper_SPEC (
    execute_data=<value optimized out>)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:340
#35 0x00000000005cd990 in execute (op_array=0x1aea630)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:107
#36 0x00007f102ab8b4b8 in xdebug_execute ()
   from /usr/lib64/php/modules/xdebug.so
#37 0x00000000005f6366 in zend_do_fcall_common_helper_SPEC (
    execute_data=<value optimized out>)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:340
#38 0x00000000005cd990 in execute (op_array=0x1ae9200)
    at /usr/src/debug/php-5.3.3/Zend/zend_vm_execute.h:107
#39 0x00007f102ab8b4b8 in xdebug_execute ()
   from /usr/lib64/php/modules/xdebug.so
#40 0x00000000005a7b9d in zend_execute_scripts (type=8, retval=0x0, 
    file_count=3) at /usr/src/debug/php-5.3.3/Zend/zend.c:1235
#41 0x0000000000555c28 in php_execute_script (primary_file=0x7fff35e04900)
    at /usr/src/debug/php-5.3.3/main/main.c:2261
#42 0x0000000000631ff5 in main (argc=2, argv=0x7fff35e04b08)
    at /usr/src/debug/php-5.3.3/sapi/cli/php_cli.c:1192

Seems to be a known issue:

https://bugs.php.net/bug.php?id=64960

http://git.php.net/?p=php-src.git;a=commitdiff;h=3c87945c95c9c31986e690bb046c70e58c8d8896;hp=93e0d78ec655f59ebfa82b2c6f8486c43651c1d0

Comment 1 Leonard den Ottolander 2014-09-10 13:51:08 UTC
To complete the test case you need the file "files/funcref.html" which is a copy of http://www.php.net/manual/en/funcref.php.

Comment 4 Leonard den Ottolander 2014-09-10 14:57:08 UTC
php54 probably also affected as this segfault is also reproducible on CentOS 7 (bug #1140247).

Comment 6 Remi Collet 2014-12-19 08:12:51 UTC
Could also be related to https://bugs.php.net/65372

Comment 10 Red Hat Bugzilla Rules Engine 2017-10-17 07:41:53 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.