Re: PHP 4.0 Bug #4558: segfault on client request (linux,mod_php,mysql)

From: Date: Sun, 28 May 2000 18:04:24 +0000
Subject: Re: PHP 4.0 Bug #4558: segfault on client request (linux,mod_php,mysql)
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-19644@lists.php.net to get a copy of this message
Hi, sorry about this but I am still not having any luck. I blatted the mysql rpm and got the source(3.22.32), compiling with '--without-pthread' (the only switch I used in the compile - think its the default option anyway), though still had the segfault problem. I have seen it mentioned elsewhere to compile apache with LDFLAGS='-lpthread' so I tried that also but that too didnt work. I know I must am doing something blatently stupid here in order to compile the mysql client library without pthreads but cant figure it out. I have been through the mysql install documentation but am unable to find references on how to do this (ie just compile the client library). This seems to be quite a common problem - what should the build procedure exactly be? I'd appreciate some help on this - I'ts been resisting me for far too long now :-) many thanks Roger Foskett ----- Original Message ----- From: Rasmus Lerdorf <rasmus@php.net> To: Roger Foskett (2) <rog2@foskett.f9.co.uk> Cc: <php-dev@lists.php.net> Sent: Wednesday, May 24, 2000 11:41 PM Subject: Re: [PHP-DEV] PHP 4.0 Bug #4558: segfault on client request (linux& mod_php ) > If you installed MySQL from a recent rpm release chances are you installed > a client library that was linked against pthreads. There is a bug in > glibc-2.1 that causes problems from something that isn't linked against > pthreads loading something that is. The easiest fix is to grab the MySQL > source tarball and compile the non-threaded client library and link > against that instead. The MySQL guys are aware of this and will be > putting a non-threaded client rpm on their site soon now. > > -Rasmus > > On Wed, 24 May 2000, Roger Foskett (2) wrote: > > > Hello, I have a problem with php release 4.0.0 in that it segfaults whenever a client > > connection is made. All components below are clean built with gcc. > > > > The details of my configuration are below - I am not sure if its exactly the same as BUG > > 4558 but it looks like it. How can I debug the backtrace below further?? > > > > Has anyone come across this as well - or is it just me doing a dodgy installation?? > > > > many thanks, > > > > 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) > > > > -------- Error log message -------- > > [Mon May 22 22:09:16 2000] [notice] child pid 2101 exit signal Segmentation > > fault (11) > > > > -------- PHP CONFIG -------- > > ./configure \ > > --with-apxs=/usr/local/apache/bin/apxs \ > > --with-config-file-path=/www/conf \ > > --with-gd \ > > --with-mysql > > > > (gd, zlib & mysql all installed ok) > > -------- 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" \ > > ./configure \ > > --sysconfdir=/www/conf \ > > --logfiledir=/www/logs \ > > --enable-module=most \ > > --enable-shared=max \ > > --enable-module=rewrite \ > > --enable-shared=rewrite > > > > > > -------- BACKTRACE -------- > > (the seg fault was caused by telnetting into port 80 and typing > > GET > > - couldnt produce a core file) > > > > [root@mako 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 > > -------------------------------------- > > > >

« previous php.dev (#19644) next »