ID: 30563
Updated by: [EMAIL PROTECTED]
Reported By: david at donpiso dot com
-Status: Open
+Status: Bogus
-Bug Type: Apache2 related
+Bug Type: Reproducible crash
Operating System: Linux 2.4.25
PHP Version: 4.3.9
New Comment:
This looks suspiciously like a bad glibc installation:
#0 0x00000000 in ?? ()
#1 0x407f9cec in db_open () from /lib/libnss_db.so.2
I doubt there is a PHP or Apache bug here. Try a simple program
calling getprotobyname("tcp") to see if that segfaults; try it again
when linked against -ldb.
Previous Comments:
------------------------------------------------------------------------
[2004-10-26 15:06:19] david at donpiso dot com
Yes, you're right. There is a Segmentation Violation:
(gdb) run -DSSL -e debug -k start -X
Starting program: /uxd/apache-server2/bin/httpd -DSSL -e
debug -k start -X
[Tue Oct 26 15:03:42 2004] [debug] mod_so.c(247): loaded
module include_module
[Tue Oct 26 15:03:42 2004] [debug] mod_so.c(247): loaded
module deflate_module
[Tue Oct 26 15:03:42 2004] [debug] mod_so.c(247): loaded
module log_config_module
[Tue Oct 26 15:03:42 2004] [debug] mod_so.c(247): loaded
module env_module
[Tue Oct 26 15:03:42 2004] [debug] mod_so.c(247): loaded
module ssl_module
[Tue Oct 26 15:03:42 2004] [debug] mod_so.c(247): loaded
module status_module
[Tue Oct 26 15:03:42 2004] [debug] mod_so.c(247): loaded
module info_module
[Tue Oct 26 15:03:43 2004] [debug] mod_so.c(247): loaded
module negotiation_module
[Tue Oct 26 15:03:43 2004] [debug] mod_so.c(247): loaded
module dir_module
[Tue Oct 26 15:03:43 2004] [debug] mod_so.c(247): loaded
module alias_module
[Tue Oct 26 15:03:43 2004] [debug] mod_so.c(247): loaded
module php4_module
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x407f9cec in db_open () from /lib/libnss_db.so.2
#2 0x407f9dac in internal_setent () from /lib/libnss_db.so.2
#3 0x407f85dd in _nss_db_endprotoent () from
/lib/libnss_db.so.2
#4 0x407f8887 in _nss_db_getprotobyname_r () from
/lib/libnss_db.so.2
#5 0x403fd080 in getprotobyname_r () from /lib/libc.so.6
#6 0x403fcf31 in getprotobyname () from /lib/libc.so.6
#7 0x40551484 in zm_startup_sockets (type=1,
module_number=4) at
/uxd/temp/php-4.3.9/ext/sockets/sockets.c:461
#8 0x405f59b3 in zend_startup_module (module=0x406fa040)
at /uxd/temp/php-4.3.9/Zend/zend_API.c:1005
#9 0x405c9294 in php_startup_extensions (ptr=0x40705908,
count=19) at /uxd/temp/php-4.3.9/main/main.c:1044
#10 0x4060e54f in php_startup_internal_extensions () at
main/internal_functions.c:81
#11 0x405c9845 in php_module_startup (sf=0x407055e0,
additional_modules=0x407058c0, num_additional_modules=1)
at /uxd/temp/php-4.3.9/main/main.c:1216
#12 0x4060c1e6 in php_apache2_startup
(sapi_module=0x407055e0) at
/uxd/temp/php-4.3.9/sapi/apache2handler/sapi_apache2.c:289
#13 0x4060c34d in php_apache_server_startup
(pconf=0x80a5090, plog=0x80d9160, ptemp=0x80f7958,
s=0x80a9198) at
/uxd/temp/php-4.3.9/sapi/apache2handler/sapi_apache2.c:388
#14 0x0806eaa1 in ap_run_post_config (pconf=0x80a5090,
plog=0x80d9160, ptemp=0x80f7958, s=0x80a9198) at
config.c:87
#15 0x0807364c in main (argc=7, argv=0xbffff854) at
main.c:606
#16 0x4033117d in __libc_start_main () from /lib/libc.so.6
------------------------------------------------------------------------
[2004-10-26 14:47:25] [EMAIL PROTECTED]
Can you try with -X added to the flags passed to run in gdb, to try a
single-process startup.
------------------------------------------------------------------------
[2004-10-26 13:21:32] david at donpiso dot com
Description:
------------
Apache simply fails to start after loading all modules, it seems it
exits after loading, probably following initialization phase of the
modules. No error neither at console nor log files. This happens
since Apache 2.0.48 + PHP 4.3.4 in this machine, but I succeeded
to start Apache 2.0.49 + PHP 4.3.6 in a different machine. Now
tried Apache 2.0.52 + PHP 4.3.9 and still doesn't work.
This is PHP configure:
./configure --with-apxs2=/usr/local/apache-server2/bin/apxs
--enable-ctype --with-gd --enable-gd-native-ttf
--with-jpeg-dir=/usr --with-png --with-gmp --with-pgsql
--enable-shmop --enable-memory-limit --enable-shared
--disable-debug --with-zlib=/usr --disable-cgi
--disable-path-info-check --enable-safe-mode --with-openssl
--with-bz2 --enable-calendar --enable-exif --enable-ftp
--enable-sockets --without-mysql
This are Apache modules:
Server version: Apache/2.0.52
Server built: Oct 25 2004 18:59:00
Server's Module Magic Number: 20020903:9
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/usr/local/apache-server2"
-D SUEXEC_BIN="/usr/local/apache-server2/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
The php.ini changes:
precision = 14
y2k_compliance = Off
output_buffering = 4096
allow_call_time_pass_reference = Off
safe_mode_gid = On
highlight.*
;max_input_time = 60
memory_limit = 6M
error_reporting = E_ALL
display_errors = Off
log_errors = On
error_log = /(...)/apache2/logs/php.log
variables_order = "GPCS"
register_argc_argv = Off
post_max_size = 4M
magic_quotes_gpc = Off
upload_tmp_dir = /(...)/tmp
upload_max_filesize = 4M
;SMTP = localhost
;sendmail_from = [EMAIL PROTECTED]
session.cache_expire = 60
session.use_trans_sid = 1
Actual result:
--------------
Running "gdb httpd" gives:
GNU gdb 5.2
(...)
This GDB was configured as "i386-slackware-linux"...
(gdb) run -DSSL -e debug -k start
Starting program: /uxd/apache-server2/bin/httpd -DSSL -e
debug -k start
[Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded
module include_module
[Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded
module deflate_module
[Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded
module log_config_module
[Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded
module env_module
[Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded
module ssl_module
[Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded
module status_module
[Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded
module info_module
[Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded
module negotiation_module
[Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded
module dir_module
[Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded
module alias_module
[Tue Oct 26 13:16:43 2004] [debug] mod_so.c(247): loaded
module php4_module
Program exited normally.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30563&edit=1