From: gw at gnc dot at
Operating system: redhat enterprise linux server 5
PHP version: 5.2.4
PHP Bug Type: Reproducible crash
Bug description: Apache / oci8 crash
Description:
------------
Apache crashes when running an oci8 script.
PHP is 5.2.4
Apache is 2.2.6
Oracle Client is: 10.2.0.3.0 (which is the latest patch version..)
OS: Oracle Enterprise Linux Enterprise Linux Server release 5 (Carthage)
env for oracle:
export ORACLE_HOME=/opt/oracle/product/10.2.0/client_1
export TNS_ADMIN=$ORACLE_HOME/network/admin
export NLS_LANG=german_germany.we8iso8859p15
export LC_ALL="de_DE"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
apache uses wwwrun user,which is member of dba group
oracle sw belongs to oracle:dba
php configure:
'./configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql'
'--with-oci8=/opt/oracle/product/10.2.0/client_1' '--enable-ftp'
'--with-gettext' '--with-zlib' '--with-gd' '--enable-gd-native-ttf'
'--with-ttf' '--with-mcrypt' '--with-curl' '--enable-pdo'
'--with-pdo-oci=/opt/oracle/product/10.2.0/client_1'
'--with-imap=/root/software/imap-2006k.DEV.SNAP-0711021517'
played around with:
;oci8.default_prefetch = 10
OR
oci8.default_prefetch = 10
OR
oci8.default_prefetch = 0
no change...
Reproduce code:
---------------
?php
error_reporting(255);
echo "connecting...\n";
$db = oci_connect("gwtest","gwtest","ENTW");
if(!$db)
die("oci_connect error");
$s = oci_parse($db,"select * from cat");
oci_execute($s);
oci_fetch_all($s,$res);
print_r($res);
oci_close($db);
?>
Expected result:
----------------
objects of schema gwtest
Actual result:
--------------
(gdb) run -X
Starting program: /usr/local/apache2/bin/httpd -X
[Thread debugging using libthread_db enabled]
[New Thread -1208908096 (LWP 17198)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208908096 (LWP 17198)]
0x0203414c in lxhcsn () from
/opt/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
(gdb) bt
#0 0x0203414c in lxhcsn () from
/opt/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
#1 0x018caad2 in kpcsnevget () from
/opt/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
#2 0x0184ff56 in OCINlsEnvironmentVariableGet ()
from /opt/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
#3 0x011e74c3 in php_oci_do_connect_ex (username=0x99f8090 "gwtest",
username_len=6,
password=0x99f80a0 "gwtest", password_len=6, new_password=0x0,
new_password_len=0,
dbname=0x99f80c8 "ENTW", dbname_len=4, charset=0x0, session_mode=0,
persistent=0, exclusive=0)
at /root/software/php-5.2.4/ext/oci8/oci8.c:1067
#4 0x011e8dc7 in php_oci_do_connect (ht=3, return_value=0x99f80d8,
return_value_ptr=0x0, this_ptr=0x0,
return_value_used=1, persistent=0, exclusive=0) at
/root/software/php-5.2.4/ext/oci8/oci8.c:983
#5 0x011f41cd in zif_oci_connect (ht=3, return_value=0x99f80d8,
return_value_ptr=0x0, this_ptr=0x0,
return_value_used=1) at
/root/software/php-5.2.4/ext/oci8/oci8_interface.c:1557
#6 0x0138aac8 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbf855420)
at /root/software/php-5.2.4/Zend/zend_vm_execute.h:200
#7 0x01389b1d in execute (op_array=0x99f73c8) at
/root/software/php-5.2.4/Zend/zend_vm_execute.h:92
#8 0x0136c582 in zend_execute_scripts (type=8, retval=<value optimized
out>, file_count=3)
at /root/software/php-5.2.4/Zend/zend.c:1134
#9 0x0132cae3 in php_execute_script (primary_file=0xbf8576c8) at
/root/software/php-5.2.4/main/main.c:1982
#10 0x013e49ac in php_handler (r=0x9a33f50) at
/root/software/php-5.2.4/sapi/apache2handler/sapi_apache2.c:631
#11 0x08079c39 in ap_run_handler (r=0x9a33f50) at config.c:157
#12 0x0807cda7 in ap_invoke_handler (r=0x9a33f50) at config.c:372
#13 0x080a9608 in ap_process_request (r=0x9a33f50) at http_request.c:258
#14 0x080a690b in ap_process_http_connection (c=0x9a2dd78) at
http_core.c:184
#15 0x08080b79 in ap_run_process_connection (c=0x9a2dd78) at
connection.c:43
#16 0x080c49b0 in child_main (child_num_arg=<value optimized out>) at
prefork.c:640
#17 0x080c4c13 in make_child (s=0x982b668, slot=0) at prefork.c:680
#18 0x080c59ec in ap_mpm_run (_pconf=0x98250a8, plog=0x98671b0,
s=0x982b668) at prefork.c:956
#19 0x080679c5 in main (argc=159527072, argv=0x9a2bba0) at main.c:730
(gdb)
--
Edit bug report at http://bugs.php.net/?id=43186&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=43186&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=43186&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=43186&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=43186&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43186&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=43186&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=43186&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=43186&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=43186&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=43186&r=support
Expected behavior: http://bugs.php.net/fix.php?id=43186&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=43186&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=43186&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43186&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43186&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43186&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=43186&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=43186&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=43186&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=43186&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=43186&r=mysqlcfg