#20029 [Opn->Fbk]: Apache + PHP + OCI8 = core when "apachectl stop" on HPUX
| From: | sniper@php.net | Date: | Tue, 22 Oct 2002 20:47:09 +0000 |
| Subject: | #20029 [Opn->Fbk]: Apache + PHP + OCI8 = core when "apachectl stop" on HPUX | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-23066@lists.php.net to get a copy of this message | ||
ID: 20029
Updated by: sniper@php.net
Reported By: slemieux@videotron.ca
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: HPUX 11
PHP Version: 4.2.3
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
The other report I found about similar crash was closed as it's
supposed to be fixed in CVS..so please try the snapshot.
Previous Comments:
------------------------------------------------------------------------
[2002-10-22 13:45:53] slemieux@videotron.ca
I'm using Apache 2.0.43 and PHP 4.2.3 on HPUX 11.00. I also have OCI8
enabled.
PHP is compiled with: --with-oci8 --with-apxs2
Starting Apache/PHP works fine. Accessing PHP pages also works great.
However, when stopping Apache using "apachectl stop" I get a core
dump.
Here is the stack trace:
#0 0xc01f2740 in kill () from /usr/lib/libc.2
#1 0xad158 in sig_coredump (sig=-1) at prefork.c:367
#2 <signal handler called>
#3 0xc22b1cc0 in php_apache_sapi_send_headers
(sapi_headers=0x400e18d8, tsrm_ls=0x400e1368) at sapi_apache2.c:126
#4 0xc22bdffc in sapi_send_headers (tsrm_ls=0x400e1368) at SAPI.c:600
#5 0xad158 in sig_coredump (sig=2078470596) at prefork.c:367
#6 0xc22c4bb0 in php_ub_body_write (str=0x7bff27d0 "OCIDebug: START
php_mshutdown_oci<br />\n", str_length=40, tsrm_ls=0x400e1368)
at output.c:479
#7 0xc22c396c in php_body_write (str=0x400e18d8 "",
str_length=1074664296, tsrm_ls=0x400e1888) at output.c:101
#8 0xc22b4b24 in php_printf (format=0x7be590b4 "OCIDebug: %s<br />\n")
at main.c:355
#9 0xc22ed738 in oci_debug (format=0x7be58d1c "START
php_mshutdown_oci") at oci8.c:1046
#10 0xad158 in sig_coredump (sig=1074664296) at prefork.c:367
#11 0xc22a6ab4 in module_destructor (module=0x7be2f1c4) at
zend_API.c:1127
#12 0xad158 in sig_coredump (sig=1074972864) at prefork.c:367
#13 0xc22a18b0 in zend_shutdown (tsrm_ls=0x7be2f1c4) at zend.c:492
#14 0xc22b75a0 in php_module_shutdown (tsrm_ls=0x400e1368) at
main.c:1052
#15 0xad158 in sig_coredump (sig=2078470596) at prefork.c:367
#16 0xc22b2b08 in php_apache_server_shutdown (tmp=0x400e18d8) at
sapi_apache2.c:430
#17 0xc13239a4 in run_cleanups (c=0x0) at apr_pools.c:1961
#18 0xc1322cc4 in apr_pool_clear (pool=0x4004b528) at apr_pools.c:709
#19 0xb7c04 in main (argc=4, argv=0x7bff1d3c) at main.c:600
A print of the ctx variable in sapi_apache2.c at line 126 shows a value
of 0x0. This is why to core dump occurs.
Adding the following line just before line 126 fixes the problem:
if (!ctx) return SAPI_HEADER_SEND_FAILED;
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20029&edit=1