php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17841 oci8 causing segfault but works with 1.3.26
Submitted: 2002-06-19 11:49 UTC Modified: 2002-06-19 11:57 UTC
From: travis at deakin dot edu dot au Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 4.2.1 OS: Linux 2.4.18
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
47 - 37 = ?
Subscribe to this entry?

 
 [2002-06-19 11:49 UTC] travis at deakin dot edu dot au
Any help much appreciated...

Versions tried:
php: 4.2.0/4.2.1/cvs
apache2: 2.0.35, 2.0.36, 2.0.39 (works fine with the 1.3.x series)
OS: Linux 2.4.17 and 2.4.18, and Solaris 8 and 9
oracle: 9.0.1, 9.2.0, 8.1.6.2, 8.1.7

When testing oci8 functionality with php (all versions from 4.2.0/4.2.1 up to todays cvs) as soon as you attempt an ocilogon the httpd child process dies.. you can then try again and another will die:

From error.log:

[Thu Jun 20 01:34:35 2002] [notice] child pid 4764 exit signal Segmentation fault (11)

The configure line for apache2:

export VERSION=2.0.39
export LOCATION=httpd
./configure -v \
        --with-mpm=prefork \
        --build=i686-pc-linux-gnu \
        --prefix=/opt/local/packages/$LOCATION-$VERSION \
        --exec-prefix=/opt/local/packages/$LOCATION-$VERSION \
        --libexecdir=/opt/local/packages/$LOCATION-$VERSION/libexec \
        --localstatedir=/var/log/$LOCATION \
        --sysconfdir=/local/etc/httpd \
        --with-perl=/opt/local/bin/perl \
        --enable-so \
        --enable-shared \
        --enable-shared \
        --enable-ssl \
        --enable-access \
        --enable-actions \
        --enable-alias \
        --enable-asis \
        --enable-auth \
        --enable-auth_anon \
        --enable-autoindex \
        --enable-cern_meta \
        --enable-cgi \
        --enable-digest \
        --enable-dir \
        --enable-env \
        --enable-expires \
        --enable-headers \
        --enable-include \
        --enable-info \
        --enable-log_agent \
        --enable-log_config \
        --enable-log_referer \
        --enable-mime \
        --enable-mime_magic \
        --enable-mmap_static \
        --enable-negotiation \
        --enable-rewrite \
        --enable-setenvif \
        --enable-so \
        --enable-speling \
        --enable-status \
        --enable-unique_id \
        --enable-userdir \
        --enable-usertrack \
        --enable-deflate \
        --enable-bucketeer \
        --enable-http \
        --enable-dav \
        --enable-dav-fs \
        --enable-suexec

Configure line for php:

export VERSION=4.2.1
export APACHE_VERSION=2.0.39
./configure \
        --enable-debug \
        --prefix=/opt/local/packages/php-$VERSION \
        --with-jpeg-dir=/opt/local/ \
        --with-png-dir=/opt/local/ \
        --with-zlib-dir=/opt/local/ \
        --with-xpm-dir=/opt/local/ \
        --with-imap \
        --enable-apc \
        --enable-inline-optimization \
        --enable-bcmath \
        --enable-calendar \
        --with-regex=system \
        --with-ftp \
        --with-oci8=/opt/local/packages/oracle-9.2.0 \
        --with-snmp=/opt/local/ \
        --with-yp \
        --with-openssl \
        --with-config-file-path=/local/etc/httpd/ \
        --enable-safe-mode \
        --enable-track-vars \
        --enable-trans-sid \
        --enable-magic-quotes \
        --with-gd=/opt/local/ \
        --enable-gd-imgstrttf \
        --enable-xml \
        --with-apxs2

A backtrace of the error:

bash-2.05# gdb /bin/httpd
GNU gdb 5.2
Copyright 2002 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 "i686-pc-linux-gnu"...
(gdb) run -X
Starting program: /opt/local/packages/httpd-2.0.39/bin/httpd -X
[New Thread 1024 (LWP 4806)]
[Thu Jun 20 01:37:21 2002] [warn] module php4_module is already loaded, skipping
WARNING: detected MinSpareServers set to non-positive.
Resetting to 1 to avoid almost certain Apache failure.
Please read the documentation.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 4806)]
0x40bf7fa1 in snauca_check_adapter () from /opt/local//lib/libclntsh.so.9.0
(gdb) bt
#0  0x40bf7fa1 in snauca_check_adapter () from /opt/local//lib/libclntsh.so.9.0
#1  0x40bf6724 in nau_viat () from /opt/local//lib/libclntsh.so.9.0
#2  0x40befa1c in nau_gettab () from /opt/local//lib/libclntsh.so.9.0
#3  0x40bee09b in nau_ini () from /opt/local//lib/libclntsh.so.9.0
#4  0x40be3a03 in nainit () from /opt/local//lib/libclntsh.so.9.0
#5  0x40b98087 in nsnainit () from /opt/local//lib/libclntsh.so.9.0
#6  0x40b8d3ca in nsopen () from /opt/local//lib/libclntsh.so.9.0
#7  0x40b764e9 in nscall1 () from /opt/local//lib/libclntsh.so.9.0
#8  0x40b75a20 in nscall () from /opt/local//lib/libclntsh.so.9.0
#9  0x40c0ca44 in niotns () from /opt/local//lib/libclntsh.so.9.0
#10 0x40c08759 in nigcall () from /opt/local//lib/libclntsh.so.9.0
#11 0x40ba5ca3 in osncon () from /opt/local//lib/libclntsh.so.9.0
#12 0x409e1a23 in kpuadef () from /opt/local//lib/libclntsh.so.9.0
#13 0x40a64bf5 in upiini () from /opt/local//lib/libclntsh.so.9.0
#14 0x40a53f4b in upiah0 () from /opt/local//lib/libclntsh.so.9.0
#15 0x409bbfe6 in kpuatch () from /opt/local//lib/libclntsh.so.9.0
#16 0x40a480cc in OCIServerAttach () from /opt/local//lib/libclntsh.so.9.0
#17 0x404e94e8 in _oci_open_server (dbname=0x8216100 "", persistent=136483416)
    at /src/archive/a/apache/srcs/php_cvs/php4/ext/oci8/oci8.c:2427
#18 0x404e9a3a in oci_do_connect (ht=3, return_value=0x823c638, this_ptr=0x0,
    return_value_used=1, tsrm_ls=0x81a5d98, persistent=0, exclusive=0)
    at /src/archive/a/apache/srcs/php_cvs/php4/ext/oci8/oci8.c:2578
#19 0x404ee3dd in zif_ocilogon (ht=0, return_value=0x0, this_ptr=0x0,
---Type <return> to continue, or q <return> to quit---
    return_value_used=0, tsrm_ls=0x0)
    at /src/archive/a/apache/srcs/php_cvs/php4/ext/oci8/oci8.c:4203
#20 0x405d8148 in execute (op_array=0x8237400, tsrm_ls=0x81a5d98)
    at /src/archive/a/apache/srcs/php_cvs/php4/Zend/zend_execute.c:1587
#21 0x405c6167 in zend_execute_scripts (type=8, tsrm_ls=0x81a5d98, retval=0x0,
    file_count=3) at /src/archive/a/apache/srcs/php_cvs/php4/Zend/zend.c:810
#22 0x40593cbf in php_execute_script (primary_file=0xbffffa30,
    tsrm_ls=0x81a5d98)
    at /src/archive/a/apache/srcs/php_cvs/php4/main/main.c:1376
#23 0x405ddde9 in php_output_filter (f=0x8232540, bb=0x82330d0)
    at /src/archive/a/apache/srcs/php_cvs/php4/sapi/apache2filter/sapi_apache2.c
:405
#24 0x080c6c0c in ap_pass_brigade (next=0x0, bb=0x41131a40)
    at util_filter.c:534
#25 0x080ce247 in default_handler (r=0x8229338) at core.c:3276
#26 0x080b9b65 in ap_run_handler (r=0x8229338) at config.c:194
#27 0x080ba10a in ap_invoke_handler (r=0x8229338) at config.c:373
#28 0x0808cee6 in ap_process_request (r=0x8229338) at http_request.c:257
#29 0x080883f9 in ap_process_http_connection (c=0x8222898) at http_core.c:291
#30 0x080c45c5 in ap_run_process_connection (c=0x8222898) at connection.c:85
#31 0x080b8198 in child_main (child_num_arg=0) at prefork.c:692
#32 0x080b83ba in make_child (s=0x0, slot=0) at prefork.c:732
#33 0x080b8599 in perform_idle_server_maintenance (p=0x810aab0)
---Type <return> to continue, or q <return> to quit---
    at prefork.c:921
#34 0x080b8c40 in ap_mpm_run (_pconf=0x1, plog=0x814abb0, s=0x1)
    at prefork.c:1116
#35 0x080bea9f in main (argc=2, argv=0xbffffe14) at main.c:642
#36 0x40297463 in __libc_start_main (main=0x80be3e0 <main>, argc=2,
    ubp_av=0xbffffe14, init=0x80615f8 <_init>, fini=0x80d9040 <_fini>,
    rtld_fini=0x4000b300 <_dl_fini>, stack_end=0xbffffe0c)
    at ../sysdeps/generic/libc-start.c:129

The php page which produced the error:

<HTML>
<BODY>
<?
print "<h1>testing</h1>";
$c1 = ocilogon("<username>", "<password>", "<tnsname>");
?>
</BODY>
</HTML>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-19 11:55 UTC] travis at deakin dot edu dot au
Ignore this.. I knew if I kept looking I'd eventually find the fix.. (yer right .. ) .. turned out to be an oracle environment issue.
 [2002-06-19 11:57 UTC] derick@php.net
user error > bogus
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 08:02:42 2024 UTC