PHP 4.0 Bug #3595: Segfault on startup
| From: | johan at ekenberg dot nu | Date: | Wed, 23 Feb 2000 23:29:18 +0000 |
| Subject: | PHP 4.0 Bug #3595: Segfault on startup | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-15914@lists.php.net to get a copy of this message | ||
From: johan@ekenberg.nu
Operating system: Linux 2.2.14 SMP
PHP version: 4.0 Latest CVS (23/02/2000)
PHP Bug Type: Reproduceable crash
Bug description: Segfault on startup
Apache with latest PHP4 segfaults at startup. I feel uncomfortable submitting this bugreport without
a better backtrace, but I can't seem to find a way of producing one. This is Apache1.3.11, php4
beta4, mod_ssl-2.5.0-1.3.11, openssl-0.9.4. I tried CVS as of 10:45 today (feb 23), but the same
crash happens.
Strange thing is that a few times it actually started and ran fine. At those times it appears to be
very stable, I have one w/ PHP4 beta 4 running now since a few days. But most times there is an
immediate segfault after running all the config-checks and getting the pass phrase for SSL. Running
without SSL makes no difference.
When running through gdb there is no segfault, it reports "exited normally".
strace httpd also reports an exit immediately after the startup process:
brk(0x8ea5000) = 0x8ea5000
brk(0x8ea8000) = 0x8ea8000
chdir("/") = 0
fork() = 26348
_exit(0) = ?
Although I build with all the debug-switches I know about,
I can't get a better backtrace than this:
(gdb) bt
#0 0x400e4044 in ?? ()Cannot access memory at address 0x40007138.
(gdb) l
4947
4948 #ifdef TPF
4949 EBW_AREA input_parms;
4950 ecbptr()->ebrout = PRIMECRAS;
4951 input_parms = * (EBW_AREA *)(&(ecbptr()->ebw000));
4952 #endif
4953
4954 MONCONTROL(0);
4955
4956 common_init();
(gdb)
Below is my entire conf/build sequence.
I'd really appreciate suggestions on how to get a better backtrace.
----------------------------
- Config/build sequence -
----------------------------
cd openssl-0.9.4
./config linux-elf:'/usr/bin/gcc -ggdb3'
make
make test
make install
cd ../mod_ssl-2.5.0-1.3.11
./configure \
--with-apache=../apache_1.3.11 \
--with-ssl=../openssl-0.9.4
cd ../php-4.0b4
CFLAGS=' -ggdb3 -I../openssl-0.9.4/include' \
./configure \
--with-apache=../apache_1.3.11 \
--with-mysql=/usr/local \
--with-gd \
--with-ttf \
--enable-memory-limit=yes \
--enable-track-vars \
--enable-debug
make
make install
cd ../mod_perl-1.21
perl Makefile.PL \
APACHE_SRC=../apache_1.3.11/src \
DO_HTTPD=1 \
USE_APACI=1 \
PREP_HTTPD=1 \
EVERYTHING=1
make
make install
cd ../apache_1.3.11
SSL_BASE=../openssl-0.9.4 \
OPTIM="-g -ggdb3" \
./configure \
--prefix=/usr/local/apache \
--enable-module=ssl \
--enable-module=rewrite \
--activate-module=src/modules/php4/libphp4.a \
--enable-module=php4 \
--activate-module=src/modules/throttle/mod_throttle.o \
--activate-module=src/modules/perl/libperl.a \
--enable-module=perl \
--enable-suexec \
--suexec-caller=nobody \
--suexec-uidmin=500 \
--suexec-gidmin=100 \
--suexec-userdir=/home