php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30196 SEGFAULT with apache2 on shutdown-child
Submitted: 2004-09-22 18:27 UTC Modified: 2005-01-12 16:17 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: j dot henge-ernst at interexa dot de Assigned:
Status: Closed Package: OCI8 related
PHP Version: 5.0 cvs from 20041027 OS: linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: j dot henge-ernst at interexa dot de
New email:
PHP Version: OS:

 

 [2004-09-22 18:27 UTC] j dot henge-ernst at interexa dot de
Description:
------------
PHP 5.0.1 is segfaulting after every request has been processed with our application. Disabling all register_shutdown_functions or custom-error handlers didn't help. Simple pages as phpinfo just work fine.

The commandline is not seg-faulting

Using SuSE 9.1 with apache2handler and PHP 5.0.1 self-compiled. Also tried the current CVS, but that also fails on the same point

If you need additional information to track that down, ask

Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1076980544 (LWP 31715)]
0x4061043f in zend_hash_apply (ht=Variable "ht" is not available.
) at /home/hernst/src/php-5.0.1/Zend/zend_hash.c:664
664                     if (apply_func(p->pData TSRMLS_CC)) {
(gdb) where
#0  0x4061043f in zend_hash_apply (ht=Variable "ht" is not available.
) at /home/hernst/src/php-5.0.1/Zend/zend_hash.c:664
#1  0x40601a80 in shutdown_executor () at /home/hernst/src/php-5.0.1/Zend/zend_execute_API.c:248
#2  0x40609a96 in zend_deactivate () at /home/hernst/src/php-5.0.1/Zend/zend.c:819
#3  0x405d2679 in php_request_shutdown (dummy=0x0) at /home/hernst/src/php-5.0.1/main/main.c:1212
#4  0x4063c82e in php_handler (r=0x826b1f0) at /home/hernst/src/php-5.0.1/sapi/apache2handler/sapi_apache2.c:435
#5  0x08069288 in ap_run_handler ()
#6  0x0000003b in ?? ()
#7  0x00000000 in ?? ()
#8  0x0809a36c in __JCR_LIST__ ()
#9  0x0826b1f0 in ?? ()
#10 0x0826b1f0 in ?? ()
#11 0xbfffd518 in ?? ()
#12 0x0806c8a7 in ap_invoke_handler ()

Using the CVS-version of 5.0
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1076980544 (LWP 29322)]
0x4061176f in zend_hash_apply (ht=Variable "ht" is not available.
) at /home/hernst/src/php-src/Zend/zend_hash.c:664
664                     if (apply_func(p->pData TSRMLS_CC)) {
(gdb) where
#0  0x4061176f in zend_hash_apply (ht=Variable "ht" is not available.
) at /home/hernst/src/php-src/Zend/zend_hash.c:664
#1  0x406024e0 in shutdown_executor () at /home/hernst/src/php-src/Zend/zend_execute_API.c:251
#2  0x4060a8c6 in zend_deactivate () at /home/hernst/src/php-src/Zend/zend.c:818
#3  0x405d3159 in php_request_shutdown (dummy=0x0) at /home/hernst/src/php-src/main/main.c:1212
#4  0x4063dd7e in php_handler (r=0x8265e10) at /home/hernst/src/php-src/sapi/apache2handler/sapi_apache2.c:435
#5  0x08069288 in ap_run_handler ()
#6  0x0000003b in ?? ()
#7  0x00000000 in ?? ()
#8  0x0809a36c in __JCR_LIST__ ()
#9  0x08265e10 in ?? ()
#10 0x08265e10 in ?? ()
#11 0xbfffd508 in ?? ()
#12 0x0806c8a7 in ap_invoke_handler ()
Previous frame inner to this frame (corrupt stack?)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-22 19:27 UTC] j dot henge-ernst at interexa dot de
Tracked down the error a little bit more. Seems to happen only  when using the oci8 module.

Using oracle 10g and oci8 as loadable module. Could also be the same as http://bugs.php.net/bug.php?id=26393
 [2004-10-20 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2004-10-21 11:24 UTC] j dot henge-ernst at interexa dot de
The segfault still occures, but not so reproduceable. When I have more time I will try to get a new backtrace and post that information.
 [2004-10-27 11:03 UTC] j dot henge-ernst at interexa dot de
At the moment I got  reproducable crash. After restarting the webserver the problem vanished. Hope it helps to track down that nasy error.

Here is the backtrace:
#0  0x430dcc10 in kpufhndl0 () from /opt/oracle/product/10.1.0/db_1/lib/libclntsh.so.10.1
#1  0x430dcbc8 in kpufhndl () from /opt/oracle/product/10.1.0/db_1/lib/libclntsh.so.10.1
#2  0x4314cf9b in OCIHandleFree () from /opt/oracle/product/10.1.0/db_1/lib/libclntsh.so.10.1
#3  0x42f0c396 in _oci_close_session (session=Variable "session" is not available.
) at /home/hernst/src/php-src/ext/oci8/oci8.c:3015
#4  0x4061387e in list_entry_destructor (ptr=Variable "ptr" is not available.
) at /home/hernst/src/php-src/Zend/zend_list.c:173
#5  0x40611d58 in zend_hash_del_key_or_index (ht=0x40693f54, arKey=0x0, nKeyLength=0, h=418, flag=1) at /home/hernst/src/php-src/Zend/zend_hash.c:490
#6  0x40613a23 in _zend_list_delete (id=Variable "id" is not available.
) at /home/hernst/src/php-src/Zend/zend_list.c:58
#7  0x42f0c763 in _oci_conn_list_dtor (connection=Variable "connection" is not available.
) at /home/hernst/src/php-src/ext/oci8/oci8.c:1021
#8  0x4061387e in list_entry_destructor (ptr=Variable "ptr" is not available.
) at /home/hernst/src/php-src/Zend/zend_list.c:173
#9  0x40611d58 in zend_hash_del_key_or_index (ht=0x40693f54, arKey=0x0, nKeyLength=0, h=419, flag=1) at /home/hernst/src/php-src/Zend/zend_hash.c:490
#10 0x40613a23 in _zend_list_delete (id=Variable "id" is not available.
) at /home/hernst/src/php-src/Zend/zend_list.c:58
#11 0x40609d10 in _zval_dtor (zvalue=Variable "zvalue" is not available.
) at /home/hernst/src/php-src/Zend/zend_variables.c:69
#12 0x406313ed in zend_assign_to_variable (result=Variable "result" is not available.
) at /home/hernst/src/php-src/Zend/zend_execute.c:640
#13 0x40635b55 in zend_assign_dim_handler (execute_data=0xbfff0410, opline=0x84d21e8, op_array=0x84cf470) at /home/hernst/src/php-src/Zend/zend_execute.c:2233
#14 0x4063d7fc in execute (op_array=0x84cf470) at /home/hernst/src/php-src/Zend/zend_execute.c:1400
#15 0x4288bdb9 in db_ () from /interexa/php/5.0.1/usr/share/extensions/no-debug-non-zts-20040412/ZendDebugger.so
#16 0x40633940 in zend_do_fcall_common_helper (execute_data=0xbfff1440, opline=0x8343c5c, op_array=0x8346ed8) at /home/hernst/src/php-src/Zend/zend_execute.c:2740
#17 0x40634279 in zend_do_fcall_by_name_handler (execute_data=0x0, opline=0x8343c5c, op_array=0x8346ed8) at /home/hernst/src/php-src/Zend/zend_execute.c:2825
#18 0x4063d7fc in execute (op_array=0x8346ed8) at /home/hernst/src/php-src/Zend/zend_execute.c:1400
#19 0x4288bdb9 in db_ () from /interexa/php/5.0.1/usr/share/extensions/no-debug-non-zts-20040412/ZendDebugger.so
#20 0x40633940 in zend_do_fcall_common_helper (execute_data=0xbfff27b0, opline=0x834b06c, op_array=0x8348060) at /home/hernst/src/php-src/Zend/zend_execute.c:2740
#21 0x4063406e in zend_do_fcall_handler (execute_data=Variable "execute_data" is not available.
) at /home/hernst/src/php-src/Zend/zend_execute.c:2843
#22 0x4063d7fc in execute (op_array=0x8348060) at /home/hernst/src/php-src/Zend/zend_execute.c:1400
#23 0x4288bdb9 in db_ () from /interexa/php/5.0.1/usr/share/extensions/no-debug-non-zts-20040412/ZendDebugger.so
#24 0x40633940 in zend_do_fcall_common_helper (execute_data=0xbfffc560, opline=0x43f5f88c, op_array=0x82d975c) at /home/hernst/src/php-src/Zend/zend_execute.c:2740
#25 0x40634279 in zend_do_fcall_by_name_handler (execute_data=0x0, opline=0x43f5f88c, op_array=0x82d975c) at /home/hernst/src/php-src/Zend/zend_execute.c:2825
#26 0x4063d7fc in execute (op_array=0x82d975c) at /home/hernst/src/php-src/Zend/zend_execute.c:1400
#27 0x4288bdb9 in db_ () from /interexa/php/5.0.1/usr/share/extensions/no-debug-non-zts-20040412/ZendDebugger.so
#28 0x40609fd9 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/hernst/src/php-src/Zend/zend.c:1060
#29 0x405d2891 in php_execute_script (primary_file=0xbfffe870) at /home/hernst/src/php-src/main/main.c:1629
#30 0x4063df4a in php_handler (r=0x82ca370) at /home/hernst/src/php-src/sapi/apache2handler/sapi_apache2.c:535
#31 0x08069258 in ap_run_handler ()
#32 0x0000003b in ?? ()
#33 0x00000000 in ?? ()
#34 0x0809a36c in __JCR_LIST__ ()
#35 0x082ca370 in ?? ()
#36 0x082ca370 in ?? ()
#37 0xbfffe9c8 in ?? ()
#38 0x0806c877 in ap_invoke_handler ()
Previous frame inner to this frame (corrupt stack?)
 [2004-10-27 11:09 UTC] tony2001@php.net
Please, try _latest_ CVS snapshot. There were some changes after 2004-10-12.
 [2004-10-27 15:11 UTC] j dot henge-ernst at interexa dot de
ok, updated, rebuild oci8.so and is still segfaulting. Here is the backtracke. Looks similar to my last post.

#0  0x4311dc10 in kpufhndl0 () from /opt/oracle/product/10.1.0/db_1/lib/libclntsh.so.10.1
#1  0x4311dbc8 in kpufhndl () from /opt/oracle/product/10.1.0/db_1/lib/libclntsh.so.10.1
#2  0x4318df9b in OCIHandleFree () from /opt/oracle/product/10.1.0/db_1/lib/libclntsh.so.10.1
#3  0x42f4d359 in _oci_close_session (session=Variable "session" is not available.
) at /home/hernst/src/php-src/ext/oci8/oci8.c:2997
#4  0x4061387e in list_entry_destructor (ptr=Variable "ptr" is not available.
) at /home/hernst/src/php-src/Zend/zend_list.c:173
#5  0x406117b9 in zend_hash_apply_deleter (ht=Variable "ht" is not available.
) at /home/hernst/src/php-src/Zend/zend_hash.c:574
#6  0x40611927 in zend_hash_graceful_reverse_destroy (ht=Variable "ht" is not available.
) at /home/hernst/src/php-src/Zend/zend_hash.c:640
#7  0x4061371c in zend_destroy_rsrc_list (ht=0x40693f54) at /home/hernst/src/php-src/Zend/zend_list.c:234
#8  0x4060249e in shutdown_executor () at /home/hernst/src/php-src/Zend/zend_execute_API.c:285
#9  0x4060aa06 in zend_deactivate () at /home/hernst/src/php-src/Zend/zend.c:818
#10 0x405d3399 in php_request_shutdown (dummy=0x0) at /home/hernst/src/php-src/main/main.c:1212
#11 0x4063debe in php_handler (r=0x828ea60) at /home/hernst/src/php-src/sapi/apache2handler/sapi_apache2.c:435
#12 0x08069258 in ap_run_handler ()
#13 0x0000003b in ?? ()
#14 0x00000000 in ?? ()
#15 0x0809a36c in __JCR_LIST__ ()
#16 0x0828ea60 in ?? ()
#17 0x0828ea60 in ?? ()
#18 0xbfffe418 in ?? ()
#19 0x0806c877 in ap_invoke_handler ()
Previous frame inner to this frame (corrupt stack?)
 [2004-10-31 04:12 UTC] jeffiel at jeffiel dot com
I want to report the existence of this bug in PHP 5.0.2 on linux, in particular using the CLI.
 [2005-01-12 16:17 UTC] j dot henge-ernst at interexa dot de
Using $Revision: 1.257.2.5 $ of oci8.c I had no crashes for a longer time so it seemd this issue is solved
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jun 02 18:01:26 2025 UTC