php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28008 apache 2 and php4 child segfaults when accessing php pages
Submitted: 2004-04-15 10:43 UTC Modified: 2004-04-16 06:44 UTC
From: dzila at tassadar dot physics dot auth dot gr Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 4CVS-2004-04-15 (stable) OS: Slackware 8 , kernel 2.4.25
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dzila at tassadar dot physics dot auth dot gr
New email:
PHP Version: OS:

 

 [2004-04-15 10:43 UTC] dzila at tassadar dot physics dot auth dot gr
Description:
------------
I am compiling apache2 and php for the first time. Every time a php page is accessed the apache child segfaults and no php page can be displayed. I tried with 4.3.5 and the latest 4 snap.Non php pages work fine

/configure --with-apxs2=/disk2/daemons/www2/bin/apxs --with-openssl  --enable-cli  --enable-ftp --with-zlib --with-zip --with-mysql=/disk2/daemons/mysql --enable-debug

(also tried only with-apxs and no other options , --with-mysql on its on, same results)

I am launching apache2 because I want ipv6 enabled web server , I tried binding it to both ipv6 and ipv4 addresses with same results

Reproduce code:
---------------
a postnuke site which works ok with apache 1.3

Actual result:
--------------
gdb ./httpd
GNU gdb 5.0
Copyright 2000 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 "i386-slackware-linux"...
(gdb) run -X
Starting program: /disk2/daemons/www2/bin/./httpd -X
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.

Program received signal SIGSEGV, Segmentation fault.
0x82e3d76 in ?? ()
(gdb) bt
#0  0x82e3d76 in ?? ()
#1  0x405e9ed0 in ?? ()
#2  0x405e962e in ?? ()
#3  0x405e98c3 in ?? ()
#4  0x403868c3 in getservbyname_r () from /lib/libc.so.6
#5  0x40386771 in getservbyname () from /lib/libc.so.6
#6  0x4056c3bf in ?? ()
#7  0x4056eeb4 in ?? ()
#8  0x403fe0a6 in ?? ()
#9  0x403fe3c5 in ?? ()
#10 0x405128e2 in ?? ()
#11 0x40512b2c in ?? ()
#12 0x40512b2c in ?? ()
#13 0x40512b2c in ?? ()
#14 0x40512b2c in ?? ()
#15 0x404ff484 in ?? ()
#16 0x404c310c in ?? ()
#17 0x4051939c in ?? ()
#18 0x8097929 in ap_run_handler (r=0x81b2f80) at config.c:151
#19 0x8097e73 in ap_invoke_handler (r=0x81b2f80) at config.c:358
#20 0x8087a76 in ap_process_request (r=0x81b2f80) at http_request.c:246
#21 0x808393a in ap_process_http_connection (c=0x81aef50) at http_core.c:250
#22 0x80a0e88 in ap_run_process_connection (c=0x81aef50) at connection.c:42
#23 0x80a115c in ap_process_connection (c=0x81aef50, csd=0x81aee78)
    at connection.c:175
#24 0x80965b0 in child_main (child_num_arg=0) at prefork.c:609
#25 0x809666c in make_child (s=0x80df138, slot=0) at prefork.c:649
#26 0x8096761 in startup_children (number_to_start=5) at prefork.c:721
#27 0x8096a63 in ap_mpm_run (_pconf=0x80dc270,plog=0x8114350, s=0x80df138)    at prefork.c:940
#28 0x809c26e in main (argc=2, argv=0xbffffa04) at ain.c:617
#29 0x402c82eb in __libc_start_main () from /lib/libc.so.6





Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-15 20:47 UTC] dzila at tassadar dot physics dot auth dot gr
I have installed gdb 6 which provides some more info , not sure if it is of any use

gdb ./httpd
GNU gdb 6.0
Copyright 2003 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 "i386-slackware-linux"...
(gdb) run -X
Starting program: /disk2/daemons/www2/bin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
0x082e1ca0 in ?? ()
(gdb) bt
#0  0x082e1ca0 in ?? ()
#1  0x405e9e1e in db_open () from /lib/libnss_db.so.2
#2  0x405e9ed0 in internal_setent () from /lib/libnss_db.so.2
#3  0x405e962e in _nss_db_endservent () from /lib/libnss_db.so.2
#4  0x405e98c3 in _nss_db_getservbyname_r () from /lib/libnss_db.so.2
#5  0x403868c3 in getservbyname_r () from /lib/libc.so.6
#6  0x40386771 in getservbyname () from /lib/libc.so.6
#7  0x4056c3bf in mysql_once_init ()
   from /disk2/daemons/mysql/lib/mysql/libmysqlclient.so.12
#8  0x4056eeb4 in mysql_init ()
   from /disk2/daemons/mysql/lib/mysql/libmysqlclient.so.12
#9  0x403fe0a6 in php_mysql_do_connect (ht=3, return_value=0x81c8444,
    this_ptr=0x0, return_value_used=1, persistent=0)
    at /disk2/builder/web2/php4-STABLE-200404151230/ext/mysql/php_mysql.c:771
#10 0x403fe3c5 in zif_mysql_connect (ht=3, return_value=0x81c8444,
    this_ptr=0x0, return_value_used=1)
    at /disk2/builder/web2/php4-STABLE-200404151230/ext/mysql/php_mysql.c:827
#11 0x405128e2 in execute (op_array=0x82c091c)
    at /disk2/builder/web2/php4-STABLE-200404151230/Zend/zend_execute.c:1635
#12 0x40512b2c in execute (op_array=0x82b1264)
    at /disk2/builder/web2/php4-STABLE-200404151230/Zend/zend_execute.c:1679
#13 0x40512b2c in execute (op_array=0x81df2b8)
    at /disk2/builder/web2/php4-STABLE-200404151230/Zend/zend_execute.c:1679
#14 0x40512b2c in execute (op_array=0x81dda08)
    at /disk2/builder/web2/php4-STABLE-200404151230/Zend/zend_execute.c:1679
#15 0x40512b2c in execute (op_array=0x81be10c)
    at /disk2/builder/web2/php4-STABLE-200404151230/Zend/zend_execute.c:1679
#16 0x404ff484 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /disk2/builder/web2/php4-STABLE-200404151230/Zend/zend.c:886
#17 0x404c310c in php_execute_script (primary_file=0xbffff61c)
    at /disk2/builder/web2/php4-STABLE-200404151230/main/main.c:1731
#18 0x4051939c in php_handler (r=0x81b0ef0)
    at /disk2/builder/web2/php4-STABLE-200404151230/sapi/apache2handler/sapi_apache2.c:561
#19 0x08097929 in ap_run_handler (r=0x81b0ef0) at config.c:151
#20 0x08097e73 in ap_invoke_handler (r=0x81b0ef0) at config.c:358
#21 0x08087a76 in ap_process_request (r=0x81b0ef0) at http_request.c:246
#22 0x0808393a in ap_process_http_connection (c=0x81acec0) at http_core.c:250
#23 0x080a0e88 in ap_run_process_connection (c=0x81acec0) at connection.c:42
#24 0x080a115c in ap_process_connection (c=0x81acec0, csd=0x81acde8)
    at connection.c:175
#25 0x080965b0 in child_main (child_num_arg=0) at prefork.c:609
#26 0x0809666c in make_child (s=0x80df138, slot=0) at prefork.c:649
#27 0x08096761 in startup_children (number_to_start=5) at prefork.c:721
#28 0x08096a63 in ap_mpm_run (_pconf=0x80dc270, plog=0x8114350, s=0x80df138)
    at prefork.c:940
---Type <return> to continue, or q <return> to quit---
#29 0x0809c26e in main (argc=2, argv=0xbffffa04) at main.c:617
 [2004-04-15 22:47 UTC] sniper@php.net
See bug #25400 and bug #26929

 [2004-04-16 06:44 UTC] dzila at tassadar dot physics dot auth dot gr
bug #26929 did it :) I worked around it the same way by editing nsswitch.conf. Everything works ok now.


Thank you very much:)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 19:01:31 2024 UTC