php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20029 Apache + PHP + OCI8 = core when "apachectl stop" on HPUX
Submitted: 2002-10-22 13:45 UTC Modified: 2002-11-10 18:24 UTC
From: slemieux at videotron dot ca Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 4.2.3 OS: HPUX 11
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2002-10-22 13:45 UTC] slemieux at videotron dot 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;

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-22 15:47 UTC] sniper@php.net
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.
 [2002-11-10 18:24 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Aug 13 09:05:44 2022 UTC