php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15591 Apache2 (compiled w/-lpthread) + PHP4 + OCI8 + Mandrake8.1= Segmentation Fault
Submitted: 2002-02-17 03:26 UTC Modified: 2002-04-25 18:11 UTC
Votes:17
Avg. Score:4.9 ± 0.5
Reproduced:2 of 16 (12.5%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: manish at dataavenue dot com Assigned:
Status: Closed Package: Apache2 related
PHP Version: 4.1.1 OS: Mandrake 8.1
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: manish at dataavenue dot com
New email:
PHP Version: OS:

 

 [2002-02-17 03:26 UTC] manish at dataavenue dot com
Problem: Apache 2.0.32 + php4-200202162100 + Oracle (9.0.1 or 8.1.7) + 2.4.17-16mdkenterprise == segmentation fault
Report: My understanding that this keeps popping up despite compiling Apache w/ pthreads, any regression problems ?

Apache2 compiled with following command:
LDFLAGS="-lpthread" ./configure --prefix=/web --enable-ssl --enable-mods-shared=all
[root@gabriel bin]# ldd httpd
libaprutil.so.0 => /web/lib/libaprutil.so.0 (0x40016000)
libapr.so.0 => /web/lib/libapr.so.0 (0x40027000)
libm.so.6 => /lib/libm.so.6 (0x40054000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x40076000)
libnsl.so.1 => /lib/libnsl.so.1 (0x400a3000)
libdl.so.2 => /lib/libdl.so.2 (0x400b9000)
libssl.so.0 => /usr/lib/libssl.so.0 (0x400bd000)
libcrypto.so.0 => /usr/lib/libcrypto.so.0 (0x400eb000)
libexpat.so.0 => /web/lib/libexpat.so.0 (0x401ad000)
<b>libpthread.so.0 => /lib/libpthread.so.0 (0x401cb000)</b>
libc.so.6 => /lib/libc.so.6 (0x401e1000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
### Now compiling PHP w/ Oracle oci8 support
[root@gabriel bin]# ./configure --prefix=/web --with-apxs2=/web/bin/apxs --with-oci8=/opt/oracle/901/ --without-mysql --enable-sigchild
### No problems compiling, this ran with an older CVS 3-4 days ago but crashed in about an hour, has not run since with any CVS
### Now running it with LoadModule in httpd.conf
[root@gabriel bin]# ./apachectl start
./apachectl: line 192: 13516 Segmentation fault(core dumped) $HTTPD
./apachectl start: httpd could not be started
### ok, let's get a backtrace ...
[root@gabriel bin]# gdb ./httpd core
...
Core was generated by `/web/bin/httpd'.
Program terminated with signal 11, Segmentation fault.
...
#0  php_apache_sapi_send_headers (sapi_headers=0x814c3b0, tsrm_ls=0x814c348)
    at sapi_apache2.c:106
106		ctx->f->r->status = SG(sapi_headers).http_response_code;
(gdb)bt#0  php_apache_sapi_send_headers (sapi_headers=0x814c3b0, tsrm_ls=0x814c348)
    at sapi_apache2.c:106
#1  0x404296b5 in sapi_send_headers (tsrm_ls=0x814c348) at SAPI.c:578
#2  0x4046de86 in php_header () at head.c:58
#3  0x4042e38e in php_ub_body_write (
    str=0xbfffe100 "OCIDebug: START php_mshutdown_oci<br />\n", str_length=40, 
    tsrm_ls=0x814c348) at output.c:460
#4  0x4042d85e in php_body_write (
    str=0xbfffe100 "OCIDebug: START php_mshutdown_oci<br />\n", str_length=40, 
    tsrm_ls=0x814c348) at output.c:99
#5  0x40423e16 in php_printf (format=0x404c9ce3 "OCIDebug: %s<br />\n")
    at main.c:355
#6  0x40435826 in oci_debug (format=0x404c9ae6 "START php_mshutdown_oci")
    at oci8.c:1043
#7  0x40434b5c in zm_shutdown_oci (type=1, module_number=7, tsrm_ls=0x814c348)
    at oci8.c:592
#8  0x4041aead in module_destructor (module=0x81895c8) at zend_API.c:1124
#9  0x4041caf8 in zend_hash_destroy (ht=0x404f1620) at zend_hash.c:541
#10 0x4041794c in zend_shutdown (tsrm_ls=0x814c348) at zend.c:490
#11 0x404254f7 in php_module_shutdown (tsrm_ls=0x814c348) at main.c:1000
#12 0x404254b4 in php_module_shutdown_wrapper (sapi_globals=0x404d6f40) at main.c:977
#13 0x40422fa1 in php_apache_server_shutdown (tmp=0x0) at sapi_apache2.c:408#14 0x40040f8a in run_cleanups (c=0x814bdf0) at apr_pools.c:1664
#15 0x400402c2 in apr_pool_clear (pool=0x8096d38) at apr_pools.c:532
#16 0x0806a00c in main (argc=1, argv=0xbffff784) at main.c:464
#17 0x401f9370 in __libc_start_main () from /lib/libc.so.6


	

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-17 04:02 UTC] manish at dataavenue dot com
Comment 1: I compiled apache with both --enable-so and without

Comment 2: Looking at readme in apache2filter, I added the following to httpd.conf, still segmentation fault :
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>

Keep up the great work guys!
 [2002-02-17 05:07 UTC] sander@php.net
What is your configure line (of PHP)?
Does it also segfault without OCI8?
 [2002-02-17 05:07 UTC] sander@php.net
What is your configure line (of PHP)?
Does it also segfault without OCI8?
 [2002-02-17 05:44 UTC] manish at dataavenue dot com
Opps, PHP4 configuration line:
./configure --prefix=/web --with-apxs2=/web/bin/apxs --with-oci8=/opt/oracle/901/ --without-mysql
 --enable-sigchild

I have tried compiling it with the --with-tsrm-pth=pth-config option and GNU Pth but it has too many conflicts with Mandrake 8.2's libpthread and I did not feel like messing up the rest of my environmental by renaming lib files, etc.

It won't core dump without --oci8 but WILL NOT START. 
apachectl start .. sends stuff to log file (initializing, etc.) then kaput.

Muchas gracias!
 [2002-02-17 05:56 UTC] manish at dataavenue dot com
It coredumped without --oci8 as well:
#0  0x404a5761 in ts_resource_ex (id=1, th_id=0x0) at TSRM.c:310
310	TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id, thread_resources->count);
(gdb) bt
#0  0x404a5761 in ts_resource_ex (id=1, th_id=0x0) at TSRM.c:310
#1  0x4042366a in php_module_startup (sf=0x404c96c0) at main.c:807
#2  0x404216cc in php_apache_server_startup (pconf=0x8096c78, plog=0x80bed18, 
    ptemp=0x8149470, s=0x8098598) at sapi_apache2.c:428
#3  0x08065e3f in ap_run_post_config (pconf=0x8096c78, plog=0x80bed18, 
    ptemp=0x8149470, s=0x8098598) at config.c:124
#4  0x0806a086 in main (argc=2, argv=0xbffff944) at main.c:491
#5  0x401f9370 in __libc_start_main () from /lib/libc.so.6

There ya go .. something is fishy in sapi_apache2.c
 [2002-02-22 02:37 UTC] manish at dataavenue dot com
Anyone got a fix for this ? I just tried the latest PHP4 and Apache2 snapshot ... same thing .. segmentation fault
 [2002-03-09 22:34 UTC] manish at dataavenue dot com
Well,

PHP4 is officially broken on Mandrake 8.2 + Oracle 9i. I tested this with the latest
CVS from PHP4 as well as Apache. Still coredumps:
#0  php_apache_sapi_send_headers (sapi_headers=0x813a328, tsrm_ls=0x8133458)
    at /software/compile/php4-200203091200/sapi/apache2filter/sapi_apache2.c:106
106		ctx->f->r->status = SG(sapi_headers).http_response_code;
(gdb) bt
#0  php_apache_sapi_send_headers (sapi_headers=0x813a328, tsrm_ls=0x8133458)
    at /software/compile/php4-200203091200/sapi/apache2filter/sapi_apache2.c:106
#1  0x40480875 in sapi_send_headers (tsrm_ls=0x8133458)
    at /software/compile/php4-200203091200/main/SAPI.c:578
#2  0x4042ec86 in php_header ()
    at /software/compile/php4-200203091200/ext/standard/head.c:58
#3  0x4048560e in php_ub_body_write (
    str=0xbfffdef0 "OCIDebug: START php_mshutdown_oci<br />\n", str_length=40, 
    tsrm_ls=0x8133458) at /software/compile/php4-200203091200/main/output.c:475
#4  0x40484a1e in php_body_write (
    str=0xbfffdef0 "OCIDebug: START php_mshutdown_oci<br />\n", str_length=40, 
    tsrm_ls=0x8133458) at /software/compile/php4-200203091200/main/output.c:99
#5  0x4047abe6 in php_printf (format=0x404c9fb3 "OCIDebug: %s<br />\n")
    at /software/compile/php4-200203091200/main/main.c:355
#6  0x403f2e16 in oci_debug (format=0x404c9dd7 "START php_mshutdown_oci")
    at /software/compile/php4-200203091200/ext/oci8/oci8.c:1043
#7  0x403f214c in zm_shutdown_oci (type=1, module_number=8, tsrm_ls=0x8133458)
    at /software/compile/php4-200203091200/ext/oci8/oci8.c:592
#8  0x404a52ad in module_destructor (module=0x8177c40)
    at /software/compile/php4-200203091200/Zend/zend_API.c:1127
#9  0x404a6ef8 in zend_hash_destroy (ht=0x404f6160)
    at /software/compile/php4-200203091200/Zend/zend_hash.c:541
---Type <return> to continue, or q <return> to quit---
#10 0x404a1d3c in zend_shutdown (tsrm_ls=0x8133458)
    at /software/compile/php4-200203091200/Zend/zend.c:490
#11 0x4047c637 in php_module_shutdown (tsrm_ls=0x8133458)
    at /software/compile/php4-200203091200/main/main.c:1050
#12 0x4047c5f4 in php_module_shutdown_wrapper (sapi_globals=0x404e3dc0)
    at /software/compile/php4-200203091200/main/main.c:1027
#13 0x404b6f11 in php_apache_server_shutdown (tmp=0x0)
    at /software/compile/php4-200203091200/sapi/apache2filter/sapi_apache2.c:408
#14 0x4004025a in run_cleanups (c=0x8131970) at apr_pools.c:1653
#15 0x4003f592 in apr_pool_clear (pool=0x8092b98) at apr_pools.c:521
#16 0x0806635c in main (argc=2, argv=0xbffff574) at main.c:463
#17 0x401f7280 in __libc_start_main () from /lib/libc.so.6
(gdb) quit
[root@domin
 [2002-03-18 00:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, 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".
 [2002-04-25 18:11 UTC] jwoolley@php.net
This bug has been fixed in CVS.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 11:01:30 2024 UTC