Bug #3466: Apache segfaults/dumps core whenever PHP3 module enabled in config
| From: | turinsky at somesites dot com | Date: | Sat, 12 Feb 2000 11:38:44 +0000 |
| Subject: | Bug #3466: Apache segfaults/dumps core whenever PHP3 module enabled in config | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-15422@lists.php.net to get a copy of this message | ||
From: turinsky@somesites.com
Operating system: Linux 2.2.14/Mandrake 7.0
PHP version: 3.0.14
PHP Bug Type: Reproduceable crash
Bug description: Apache segfaults/dumps core whenever PHP3 module enabled in config
System: Mandrake 7.0, Linux 2.2.14
Do RPM --rebuild MySQL-3.22.30-1.src.rpm and install resulting binary RPMS. They appear to work
fine.
Compile OpenSSL 0.9.4 (no RSAREF) with -fPIC and install
Make mod_perl 1.21 with USE_APACI=1 EVERYTHING=1 PERL_MARK_WHERE=1 and install
Make mod_ssl 2.5.0-1.3.11
Compile and install Apache 1.3.11 with
./configure --with-layout=RedHat --enable-module=all --enable-shared=max --enable-module=ssl
--enable-shared=ssl --activate-module=src/modules/perl/libperl.a
[make, make certificate, make install all go okay]
Run apache, works fine.
Configure PHP 3.0.14: ./configure --with-apxs=/usr/sbin/apxs
--with-config-file-path=/etc/httpd/conf/ --with-xml --with-gd --with-mysql
finds everything it wants.
make and make install work
Apache won't start (no ssl), "LoadModule php3_module lib/apache/libphp3.so "
is in <IfDefine SSL> section.
Move that part out of <IfDefine SSL> and try to start Apache.
Apache segfaults, dumps core, complains about "Cannot access memory at address 0x(address).
Try several other things, Apache does the same thing with or without using SSL. Comment out PHP
module, Apache runs FINE.
run "gdb /usr/sbin/httpd ./core"
Core was generated with "httpd -X"
Program terminated with signal 11, Segmentation fault.
Reading symbols (etc.)
#0 0x4037f0f8 in ?? ()
(gdb) set args -X
(gdb) run
Starting program: /usr/sbin/httpd -X
Cannot access memory at address 0x402f84d4
(gdb) bt
#0 0x4000a611 in ?? () from /lib/ld-linux.so.2
#1 0x4000c038 in ?? () from /lib/ld-linux.so.2
#2 0x40001fc7 in ?? () from /lib/ld-linux.so.2
#3 0x40001f32 in ?? () from /lib/ld-linux.so.2
If I do it without -X:
(gdb) bt
#0 0x4037f0f8 in ?? ()
#1 0x40178313 in __getservbyname_r (name=0x4041aa36 "mysql",
proto=0x4041acd0 "tcp", resbuf=0x401a4f5c, buffer=0x817d330 "mysql",
buflen=1024, result=0xbfffd6d8) at ../nss/getXXbyYY_r.c:182
#2 0x401781c5 in getservbyname (name=0x4041aa36 "mysql",
proto=0x4041acd0 "tcp") at ../nss/getXXbyYY.c:137
#3 0x403e1e5a in php3_minit_mysql (type=1, module_number=9)
at functions/mysql.c:258
#4 0x403c2d2a in module_startup_modules () at internal_functions.c:533
#5 0x403bb9a7 in php3_module_startup () at main.c:1237
#6 0x403b92e0 in php3_create_dir () from /usr/lib/apache/libphp3.so
#7 0x80816fc in ap_single_module_configure ()
#8 0x8062014 in load_module ()
#9 0x807fdce in invoke_cmd ()
#10 0x8080791 in ap_handle_command ()
#11 0x808082f in ap_srm_command_loop ()
#12 0x8080c84 in ap_process_resource_config ()
#13 0x808160c in ap_read_config ()
#14 0x808b6f0 in standalone_main ()
#15 0x808c03c in main ()
#16 0x400d99ee in __libc_start_main (main=0x808bc84 <main>, argc=2, argv=0xbffffa84,
init=0x8060cd4 <_init>, fini=0x812c8b4 <_fini>,
rtld_fini=0x4000a570 <_dl_fini>, stack_end=0xbffffa7c)
at ../sysdeps/generic/libc-start.c:90
Anyone know what's going on here?