php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39568 Random Segmentation faults in error log
Submitted: 2006-11-21 09:59 UTC Modified: 2006-11-22 08:23 UTC
From: s dot pfalz at teles dot de Assigned:
Status: Closed Package: OCI8 related
PHP Version: 5.2.0 OS: Linux x86-64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: s dot pfalz at teles dot de
New email:
PHP Version: OS:

 

 [2006-11-21 09:59 UTC] s dot pfalz at teles dot de
Description:
------------
Our PHP installation randomly segfaults when OCI8 functions are used.
We have three Webservers running PHP 5.2.0, the Oracle Database is on a different server (9.2.0.4.0) and we are using shared server to connect to database.

Reproduce code:
---------------
We are not able to supply PHP code that reproduces these sigfaults, however we have some coredumps and gdb backtraces available.
The described error seems to randomly occur whenever OCI functions are used.

Expected result:
----------------
No segmentation faults at all.

Actual result:
--------------
Snippet from error_log:

[Tue Nov 21 10:41:40 2006] [notice] child pid 11756 exit signal Segmentation fault (11), possible coredump in /tmp
[Tue Nov 21 10:50:02 2006] [notice] child pid 14245 exit signal Segmentation fault (11), possible coredump in /tmp
/

Because of these sigfaults we have many "dead" (aka inactive) connections in our database and the list keeps growing until we have to restart the DB because of maximum sessions reached. A restart of Apache does not help, the inactive connections remains connected in our DB.

Our configure line for PHP:

'./configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/etc/httpd/conf/magic' '--without-sqlite' '--without-pdo-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-oci8=shared' '--enable-sigchild' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter'

And the backtrace (we have more if required):

(gdb) bt
#0  0x0000002a9be9016b in nttwr () from /opt/oracle/9iR2/lib/libclntsh.so.9.0
#1  0x0000002a9bd04289 in nsdosb () from /opt/oracle/9iR2/lib/libclntsh.so.9.0
#2  0x0000002a9bd4305c in nioqsm () from /opt/oracle/9iR2/lib/libclntsh.so.9.0
#3  0x0000002a9bd41931 in nioqrs () from /opt/oracle/9iR2/lib/libclntsh.so.9.0
#4  0x0000002a9bf03034 in ttcdrv () from /opt/oracle/9iR2/lib/libclntsh.so.9.0
#5  0x0000002a9bd47721 in nioqwa () from /opt/oracle/9iR2/lib/libclntsh.so.9.0
#6  0x0000002a9bbcd637 in upirtrc () from /opt/oracle/9iR2/lib/libclntsh.so.9.0
#7  0x0000002a9bbcd936 in upirtr () from /opt/oracle/9iR2/lib/libclntsh.so.9.0
#8  0x0000002a9bbb8c00 in upilof () from /opt/oracle/9iR2/lib/libclntsh.so.9.0
#9  0x0000002a9bad8bec in kputac () from /opt/oracle/9iR2/lib/libclntsh.so.9.0
#10 0x0000002a9bb947ab in OCISessionEnd () from /opt/oracle/9iR2/lib/libclntsh.so.9.0
#11 0x0000002a9b838d20 in php_oci_connection_close (connection=0x2a9fd60790) at /usr/src/redhat/BUILD/php-5.2.0/ext/oci8/oci8.c:1499
#12 0x0000002a9b83ab4c in php_oci_connection_list_dtor (entry=Variable "entry" is not available.
) at /usr/src/redhat/BUILD/php-5.2.0/ext/oci8/oci8.c:714
#13 0x0000002a9973976e in list_entry_destructor (ptr=Variable "ptr" is not available.
) at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend_list.c:184
#14 0x0000002a99737002 in zend_hash_del_key_or_index (ht=0x2a999d3308, arKey=Variable "arKey" is not available.
) at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend_hash.c:492
#15 0x0000002a9973940e in _zend_list_delete (id=10) at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend_list.c:58
#16 0x0000002a9b83eb3a in php_oci_statement_free (statement=0x2aa006b708) at /usr/src/redhat/BUILD/php-5.2.0/ext/oci8/oci8_statement.c:695
#17 0x0000002a9973976e in list_entry_destructor (ptr=Variable "ptr" is not available.
) at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend_list.c:184
#18 0x0000002a99737002 in zend_hash_del_key_or_index (ht=0x2a999d3308, arKey=Variable "arKey" is not available.
) at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend_hash.c:492
#19 0x0000002a9973940e in _zend_list_delete (id=23) at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend_list.c:58
#20 0x0000002a9971f4f5 in _zval_ptr_dtor (zval_ptr=0x7fbfff8ea0) at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend_variables.h:35
#21 0x0000002a99745ef5 in zend_std_write_property (object=0x2aa07dd8d0, member=Variable "member" is not available.
) at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend_object_handlers.c:412
#22 0x0000002a99748f6c in zend_assign_to_object (result=0x2a9fde0f80, object_ptr=0x2a999d32d8, op2=Variable "op2" is not available.
)
    at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend_execute.c:605
#23 0x0000002a9978b1d2 in ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_HANDLER (execute_data=0x7fbfff9440)
    at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend_vm_execute.h:15346
#24 0x0000002a9974ac91 in execute (op_array=0x2a9fde1d08) at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend_vm_execute.h:92
#25 0x0000002a9974af96 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fbfff96c0) at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend_vm_execute.h:234
#26 0x0000002a9974ac91 in execute (op_array=0x2a9fdd7bc8) at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend_vm_execute.h:92
#27 0x0000002a9974af96 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fbfffb1c0) at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend_vm_execute.h:234
#28 0x0000002a9974ac91 in execute (op_array=0x552b144cc0) at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend_vm_execute.h:92
#29 0x0000002a9974af96 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fbfffb4c0) at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend_vm_execute.h:234
#30 0x0000002a9974ac91 in execute (op_array=0x2a9ff49c28) at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend_vm_execute.h:92
#31 0x0000002a997526b6 in ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER (execute_data=0x7fbfffc820) at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend_vm_execute.h:2033
#32 0x0000002a9974ac91 in execute (op_array=0x2a9560aa40) at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend_vm_execute.h:92
#33 0x0000002a9972de55 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src/redhat/BUILD/php-5.2.0/Zend/zend.c:1097
#34 0x0000002a996ee25d in php_execute_script (primary_file=0x7fbfffed70) at /usr/src/redhat/BUILD/php-5.2.0/main/main.c:1758
#35 0x0000002a997baf36 in php_handler (r=0x552b146d48) at /usr/src/redhat/BUILD/php-5.2.0/sapi/apache2handler/sapi_apache2.c:592
#36 0x000000552aac79f3 in ap_run_handler () from /usr/sbin/httpd
#37 0x000000552aac7eb1 in ap_invoke_handler () from /usr/sbin/httpd
#38 0x000000552aac4cb8 in ap_process_request () from /usr/sbin/httpd
#39 0x000000552aac0089 in _start () from /usr/sbin/httpd
#40 0x000000552aad1693 in ap_run_process_connection () from /usr/sbin/httpd
#41 0x000000552aac5b20 in ap_graceful_stop_signalled () from /usr/sbin/httpd
#42 0x000000552aac5dfa in ap_graceful_stop_signalled () from /usr/sbin/httpd
#43 0x000000552aac642a in ap_mpm_run () from /usr/sbin/httpd
#44 0x000000552aacccef in main () from /usr/sbin/httpd


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-21 10:17 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

If you're still able to reproduce it with the snapshot - please provide a short but complete reproduce code, so that I can copy/paste it and replicate the problem.
 [2006-11-22 08:23 UTC] s dot pfalz at teles dot de
The CVS Version seems to solve these problems, at least we cannot find segfaults anymore.
Thanks for your fast response!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 16:01:27 2024 UTC