php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20678 segmentation fault (without PHP, things work fine)
Submitted: 2002-11-27 10:33 UTC Modified: 2002-11-27 17:22 UTC
From: henka at isp dot org dot za Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.2.3 OS: linux 2.4.19
Private report: No CVE-ID: None
 [2002-11-27 10:33 UTC] henka at isp dot org dot za
Sample script:
<?php
   print "hello world!";
?>

apache-1.3.27 configured with:
./configure --enable-module=unique_id --enable-module=rewrite --enable-module=usertrack --enable-module=so

PHP-4.2.3 configured with:
./configure --with-pgsql --with-interbase --with-mysql=/usr/local/mysql/ --with-apxs=/www/bin/apxs --with-openssl --enable-debug

gdb backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x4020f466 in ?? ()
(gdb) bt
#0  0x4020f466 in ?? ()
#1  0x4020b4e2 in ?? ()
#2  0x401f92a3 in ?? ()
#3  0x401d1181 in ?? ()
#4  0x401f9993 in ?? ()
#5  0x4020d4c7 in ?? ()
#6  0x40207a30 in ?? ()
#7  0x402089c8 in ?? ()
#8  0x40208a52 in ?? ()
#9  0x808dd69 in ap_invoke_handler (r=0x81bafdc) at http_config.c:538
#10 0x80a38cf in process_request_internal (r=0x81bafdc) at http_request.c:1312
#11 0x80a3d36 in ap_internal_redirect (new_uri=0x81bafb4 "/index.php", 
    r=0x81ba354) at http_request.c:1440
#12 0x8074336 in handle_dir (r=0x81ba354) at mod_dir.c:174
#13 0x808dd69 in ap_invoke_handler (r=0x81ba354) at http_config.c:538
#14 0x80a38cf in process_request_internal (r=0x81ba354) at http_request.c:1312
#15 0x80a393a in ap_process_request (r=0x81ba354) at http_request.c:1328
#16 0x809a150 in child_main (child_num_arg=0) at http_main.c:4629
#17 0x809a315 in make_child (s=0x816acdc, slot=0, now=1038414204)
    at http_main.c:4744
#18 0x809a496 in startup_children (number_to_start=1) at http_main.c:4826
#19 0x809ab2d in standalone_main (argc=4, argv=0xbffff8d4) at http_main.c:5134
#20 0x809b39c in main (argc=4, argv=0xbffff8d4) at http_main.c:5482
#21 0x400892e7 in __libc_start_main () from /lib/libc.so.6

/www/logs/error_log:
...[notice] child pid 18177 exit signal Segmentation fault (11)

-----------------

If you'd like me to try different configs, etc, let me know.

Regards
Henry

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-27 16:45 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

The crash appears to occur deep inside the Apache code (last 9 steps). You may get more meaningful data if you compile Apache with debug symbols, but given the provided backtrace the crash does not appear to be the fault of PHP.
 [2002-11-27 17:05 UTC] michael dot mauch at gmx dot de
Try configuring your Apache with the pthread library:

LDFLAGS="-lpthread" ./configure ...

(or if your platform doesn't have a pthread library: use "ldd libphp4.so" and "ldd httpd" and make sure that both of them are linked to the same thread library).
 [2002-11-27 17:22 UTC] iliaa@php.net
Apache 1 & PHP do not need to be linked against a threading library. Apache 1 operates on a pre-fork model, meaning that it forks child processes rather then making threads.
 [2002-11-27 17:52 UTC] michael dot mauch at gmx dot de
Yes, but some libraries are sometimes linked against libpthread, and if you load such a library into an Apache without libpthread, it dies sometimes.

See  <http://bugs.php.net/bug.php?id=10643>,
<http://bugs.php.net/bug.php?id=8298> and 
<http://www.php.net/manual/en/ref.oci8.php>
(the last one seems to imply that it's not only a bug in glibc-2.1.3, but also happens elsewhere).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 02 08:01:31 2024 UTC