[PHP-DEV] PHP4 still segfaults on client request (without mysql & pthread) From: Roger Foskett (rog2 <email protected>)
Date: 05/29/00

Hi, I have a problem with php release 4.0.0 in that it segfaults whenever
a client
connection is made.

I am trying to install now just a minimum DSO php4 build *without* mysql,
gd etc but apache STILL segfaults - even when its linked with
LDFLAGS=-lpthread - so it doesnt look like this is the cause.

perhaps its a configuration file problem - php.ini is in /usr/local/lib/. I
saw someone mention to remove the sess* files in the session directory?
where is the session directory path set?

The backtrace below really doesnt seem to offer much info - how am I able to
debug this further?

It is just libphp4.so that is the problem apache module - seems to work ok
when not
enabled.

Please - Please someone help me - I have been headbutting the wall now for
days!! :-)

Roger Foskett

-------- VERSIONS INFO --------
Linux 2.2.14-15mdk (mandrake)
Apache 1.3.12 (built as APXS - works fine with mod_perl)
php 4.0.0 (built as APXS)

Related bug: 4558 (http://bugs.php.net/bugs.php?id=4558) - possibly?

-------- Error log message --------
[Mon May 29 19:02:14 2000] [notice] child pid 7985 exit signal Segmentation
fault (11)

-------- PHP CONFIG --------
 ./configure \
         --with-apxs=/usr/local/apache/bin/apxs \
         --with-config-file-path=/www/conf \

 -------- PHP INI --------
standard php.ini (php.ini-dist) in /www/conf/

-------- APACHE CONFIG --------
(largefile support required to stop mod_perl-1.23 segfaults - as perl is
largefile enabled)

     CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" \
     LDFLAGS=-lpthread
     ./configure \
        --sysconfdir=/www/conf \
        --logfiledir=/www/logs \
        --enable-module=most \
        --enable-shared=max

-------- BACKTRACE --------
(the seg fault was caused by telnetting into port 80 and typing `GET`
 - couldnt produce a core file)

[root <email protected> bin]# gdb ./httpd
GNU gdb 19991116
Copyright 1998 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 "i586-mandrake-linux"...
(gdb) run -X -f /www/conf/httpd.conf -d /tmp
Starting program: /usr/local/apache/bin/./httpd -X -f
/www/conf/httpd.conf -d /tmp

Program received signal SIGSEGV, Segmentation fault.
0x40560469 in ?? () from /usr/local/apache/libexec/libphp4.so
(gdb) bt
#0 0x40560469 in ?? () from /usr/local/apache/libexec/libphp4.so
#1 0x8054719 in ap_invoke_handler ()
#2 0x8068c9f in process_request_internal ()
#3 0x8069106 in ap_internal_redirect ()
#4 0x401c6e7a in ?? () from /usr/local/apache/libexec/mod_cgi.so
#5 0x8054719 in ap_invoke_handler ()
#6 0x8068c9f in process_request_internal ()
#7 0x8068d0a in ap_process_request ()
#8 0x805fea6 in child_main ()
#9 0x8060061 in make_child ()
#10 0x80601dc in startup_children ()
#11 0x806083d in standalone_main ()
#12 0x806106c in main ()
#13 0x400c19ee in __libc_start_main (main=0x8060cd4 <main>, argc=6,
argv=0xbffffa14,
    init=0x804e830 <_init>, fini=0x80968c4 <_fini>, rtld_fini=0x4000a570
<_dl_fini>,
    stack_end=0xbffffa0c) at ../sysdeps/generic/libc-start.c:90
--------------------------------------

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>