#43186 [Opn]: Apache / oci8 crash

2007-11-05 Thread gw at gnc dot at
 ID:   43186
 User updated by:  gw at gnc dot at
 Reported By:  gw at gnc dot at
 Status:   Open
-Bug Type: Reproducible crash
+Bug Type: OCI8 related
 Operating System: redhat enterprise linux server 5
 PHP Version:  5.2.4
 New Comment:

addition to the line 'env for oracle:'
this environment is also set in apachectl
so apache has the same env as oracle


Previous Comments:


[2007-11-04 17:40:42] gw at gnc dot at

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=, 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=) 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 this bug report at http://bugs.php.net/?id=43186&edit=1


#43186 [NEW]: Apache / oci8 crash

2007-11-04 Thread gw at gnc dot at
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=, 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=) 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
F

#36293 [NEW]: zend/php crashes with server side includes in 5.0.4

2006-02-05 Thread gw at gnc dot at
From: gw at gnc dot at
Operating system: suse sles9 kernel 2.6.5
PHP version:  5.1.2
PHP Bug Type: Reproducible crash
Bug description:  zend/php crashes with server side includes in 5.0.4 

Description:

php 5.0.4,httpd 2.0.55 on a suse sles 9

httpd crashes when using server side includes.

no idea if this belongs to php only...i'm not using any 3rd party
products.just a plain php504 installation.
no changes to php.ini.
upgrade is not possible due to external customer scripts
.
php config:

'./configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql'
'--enable-ftp' '--enable-trans-sid' '--enable-track-vars' '--enable-imap'
'--with-gettext' '--with-oci8=/opt/oracle/ora9i' '--without-sqlite'






Reproduce code:
---


Actual result:
--
zaphod:/usr/local/apache/bin # gdb ./httpd
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i586-suse-linux"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".

(gdb) run -X
Starting program: /usr/local/apache2/bin/httpd -X
[Thread debugging using libthread_db enabled]
[New Thread 1076812448 (LWP 29354)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1076812448 (LWP 29354)]
zend_hash_index_find (ht=0x90a3e69, h=2, pData=0x90a3e69) at
/root/software/php-5.0.4/Zend/zend_hash.c:955
955 if ((p->h == h) && (p->nKeyLength == 0)) {
(gdb) bt
#0  zend_hash_index_find (ht=0x90a3e69, h=2, pData=0x90a3e69) at
/root/software/php-5.0.4/Zend/zend_hash.c:955
#1  0x4045b038 in _zend_list_delete (id=2) at
/root/software/php-5.0.4/Zend/zend_list.c:55
#2  0x404305fc in _php_stream_free (stream=0x82f988c, close_options=3) at
/root/software/php-5.0.4/main/streams/streams.c:310
#3  0x40420461 in stream_closer_for_zend (handle=0x82f988c) at
/root/software/php-5.0.4/main/main.c:843
#4  0x4043f913 in zend_file_handle_dtor (fh=0x82f99ac) at
zend_language_scanner.l:246
#5  0x4044cb29 in zend_llist_del_element (l=0x404cf2d4,
element=0xbfffef40, compare=0x4043b770 ) at
/root/software/php-5.0.4/Zend/zend_llist.c:104
#6  0x4043f769 in zend_destroy_file_handle (file_handle=0xbfffef40) at
zend_language_scanner.l:284
#7  0x40452909 in zend_execute_scripts (type=2, retval=0x0, file_count=1)
at /root/software/php-5.0.4/Zend/zend.c:1066
#8  0x40482466 in php_handler (r=0x82f76e0) at
/root/software/php-5.0.4/sapi/apache2handler/sapi_apache2.c:557
#9  0x0808612b in ap_run_handler (r=0x82f76e0) at config.c:152
#10 0x08088aa5 in ap_invoke_handler (r=0x82f76e0) at config.c:364
#11 0x0809b278 in ap_run_sub_req (r=0x82f76e0) at request.c:1855
#12 0x080658cc in handle_include (ctx=0x82d7878, bb=0xb1bc,
r=0x82e3298, f=0x82dd438, head_ptr=0x82db850, inserted_head=0xb1c0) at
mod_include.c:742
#13 0x080638f9 in includes_filter (f=0x82dd438, b=0x82dd578) at
mod_include.c:3309
#14 0x0809200b in ap_pass_brigade (next=0x82dd438, bb=0x82dd578) at
util_filter.c:512
#15 0x08099aad in default_handler (r=0x82e3298) at core.c:3640
#16 0x0808612b in ap_run_handler (r=0x82e3298) at config.c:152
#17 0x08088aa5 in ap_invoke_handler (r=0x82e3298) at config.c:364
#18 0x0806e7af in ap_process_request (r=0x82e3298) at http_request.c:249
#19 0x08069e1c in ap_process_http_connection (c=0x82d7340) at
http_core.c:251
#20 0x0809007b in ap_run_process_connection (c=0x82d7340) at
connection.c:43
#21 0x08085238 in child_main (child_num_arg=) at
prefork.c:610
#22 0x0808538e in make_child (s=0x80c6c88, slot=0) at prefork.c:650
#23 0x08085451 in startup_children (number_to_start=5) at prefork.c:722
#24 0x08085b1d in ap_mpm_run (_pconf=0x80c20a8, plog=0x80fc190,
s=0x80c6c88) at prefork.c:941
#25 0x0808ac7c in main (argc=2, argv=0xb614) at main.c:618
#0  zend_hash_index_find (ht=0x90a3e69, h=2, pData=0x90a3e69) at
/root/software/php-5.0.4/Zend/zend_hash.c:955
nIndex = 2
p = (Bucket *) 0x90a3e69
#1  0x4045b038 in _zend_list_delete (id=2) at
/root/software/php-5.0.4/Zend/zend_list.c:55
le = 
#2  0x404305fc in _php_stream_free (stream=0x82f988c, close_options=3) at
/root/software/php-5.0.4/main/streams/streams.c:310
ret = 1
remove_rsrc = 
release_cast = 1
#3  0x40420461 in stream_closer_for_zend (handle=0x82f988c) at
/root/software/php-5.0.4/main/main.c:843
No locals.
#4  0x4043f913 in zend_file_handle_dtor (fh=0x82f99ac) at
zend_language_scanner.l:246
No locals.
#5  0x4044cb29 in zend_llist_del_element (l=0x404cf2d4,
element=0xbfffef40, compare=0x4043b770 ) at
/root/software/php-5.0.4/Zend/zend_llist.c:104