php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16836 Crash of Webserver
Submitted: 2002-04-25 18:55 UTC Modified: 2002-07-08 12:47 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mac at w4b dot at Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.2.0 OS: Linux debian/woody
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mac at w4b dot at
New email:
PHP Version: OS:

 

 [2002-04-25 18:55 UTC] mac at w4b dot at
Dear PHP Developers!

May there be some kind of error in build in MySql support?

Backtracing tells me:
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x40ba9682 in __db_err () from /lib/libdb.so.3
#2  0x40ba2e1d in db_open () from /lib/libdb.so.3
#3  0x40b8dd0a in _nss_db_getprotobynumber_r () from /lib/libnss_db.so.2
#4  0x40b8defa in _nss_db_endservent () from /lib/libnss_db.so.2
#5  0x40b8e181 in _nss_db_getservbyname_r () from /lib/libnss_db.so.2
#6  0x401bbac3 in getservbyname_r () from /lib/libc.so.6
#7  0x401bb971 in getservbyname () from /lib/libc.so.6
#8  0x402cc752 in OnMySQLPort (entry=0x80c9768, new_value=0x0,
    new_value_length=3, mh_arg1=0x0, mh_arg2=0x0, mh_arg3=0x0, stage=1)
    at php_mysql.c:285
#9  0x402b2ac1 in zend_register_ini_entries (ini_entry=0x403b7148,
    module_number=7) at zend_ini.c:150
#10 0x402cc821 in zm_startup_mysql (type=1, module_number=7) at php_mysql.c:334
#11 0x402a89ec in zend_startup_module (module=0x403b7100) at zend_API.c:1007
#12 0x402b7d16 in php_startup_extensions (ptr=0x403b68b4, count=8)
    at main.c:831
#13 0x402c41f6 in php_startup_internal_extensions () at internal_functions.c:60
#14 0x402b821c in php_module_startup (sf=0x403b1680) at main.c:989
#15 0x402b3e03 in php_apache_startup (sapi_module=0x403b1680) at mod_php4.c:279
#16 0x402b4e94 in php_init_handler (s=0x8088a2c, p=0x8088a04) at mod_php4.c:836
#17 0x0805549e in ap_init_modules ()
#18 0x0805d98a in main ()

Its Apache 1.3.23 and PHP 4.2.0 compiled with mysql and debug.

Best Regards,


MaC

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-25 22:07 UTC] sniper@php.net
Please get fresh sources of PHP 4.2.0 and replace
the configure with this:

http://www.edin.dk/php/configure.gz

This might be yet another side effect of the buggy autoconf 2.52 which was used to generate the configure in the distribution package.

 [2002-04-26 09:10 UTC] mac at w4b dot at
Dear Sniper,

yet PHP Apache does not crash on requesting phpinfo() but does if I try to make MySql connection.
I took sources from download section at php.net (Apr.22) and the config you told me.
strace tells me:
open("/lib/libdb.so.3", O_RDONLY)       = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300*\0"..., 1024) = 1024
fstat64(5, {st_mode=S_IFREG|0644, st_size=233488, ...}) = 0
old_mmap(NULL, 236572, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x40411000
mprotect(0x4044a000, 3100, PROT_NONE)   = 0
old_mmap(0x4044a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0x38000) = 0x4044a000
close(5)                                = 0
munmap(0x4037e000, 22601)               = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

gdb shows:

#0  0x00000000 in ?? ()
#1  0x40428682 in __db_err () from /lib/libdb.so.3
#2  0x40421e1d in db_open () from /lib/libdb.so.3
#3  0x4040cd0a in _nss_db_getprotobynumber_r () from /lib/libnss_db.so.2
#4  0x4040cefa in _nss_db_endservent () from /lib/libnss_db.so.2
#5  0x4040d181 in _nss_db_getservbyname_r () from /lib/libnss_db.so.2
#6  0x401bbac3 in getservbyname_r () from /lib/libc.so.6
#7  0x401bb971 in getservbyname () from /lib/libc.so.6
#8  0x402b87cd in mysql_once_init () at libmysql.c:1022
#9  0x402b871c in mysql_init (mysql=0x80f114c) at libmysql.c:989
#10 0x402b3fe5 in php_mysql_do_connect (ht=3, return_value=0x80f10b4,
    this_ptr=0x0, return_value_used=1, persistent=0) at php_mysql.c:661
#11 0x402b41ed in zif_mysql_connect (ht=3, return_value=0x80f10b4, this_ptr=0x0,
    return_value_used=1) at php_mysql.c:714
#12 0x4028a007 in execute (op_array=0x8102848) at ./zend_execute.c:1598
#13 0x4028a211 in execute (op_array=0x80d9a1c) at ./zend_execute.c:1638
#14 0x40297dce in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at zend.c:810
#15 0x402a5556 in php_execute_script (primary_file=0xbffff968) at main.c:1381
#16 0x402a114e in apache_php_module_main (r=0x80d2fc4, display_source_mode=0)
    at sapi_apache.c:90
#17 0x402a1c4e in send_php (r=0x80d2fc4, display_source_mode=0, filename=0x0)
    at mod_php4.c:575
#18 0x402a1cb2 in send_parsed_php (r=0x80d2fc4) at mod_php4.c:590

BR


MaC
 [2002-04-26 09:26 UTC] mfischer@php.net
Please provide the full configure line of PHP. Also can you paste the relevant lines of the /etc/services file containing mysql? Btw, which version of libc are you using exactly (use dpkg -s libc6|grep Version ) ?

It looks like a problem with your system libraries, not related to php or mysql at all.
 [2002-04-26 09:40 UTC] mac at w4b dot at
Dear Developers,

thank you a lot for quick reply.

I tried it using minimal configuration:
./configure --enable-debug --with-mysql --with-apxs=/usr/bin/apxs

Apache is libthread linked.
Libc is Version: 2.2.5-4

MySql lines from /etc/services:
grep mysql /etc/services
mysql           3306/tcp                        # MySQL
mysql           3306/udp                        # MySQL

I think myself that it is a lib problem, but I reinstalled all libs, made hardware check before writing this bug report :(
All libs are from woody, apt installed.

BR

MaC
 [2002-04-26 14:10 UTC] sniper@php.net
Does PHP 4.1.2 work any better then?

 [2002-04-26 15:46 UTC] mac at w4b dot at
Nope, has same effect :(

How can I check that libdb2 is ok?

Maybe some bug in that lib?

BG

MaC
 [2002-07-07 22:11 UTC] sniper@php.net
Please try this snapshot:

http://snaps.php.net/php4-latest.tar.gz

 [2002-07-08 12:42 UTC] mac at w4b dot at
Yet it does work, thanx a lot!


BR

MaC
 [2002-07-08 12:47 UTC] eru@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.


 [2021-04-06 10:19 UTC] git@php.net
Automatic comment on behalf of 
Revision: https://github.com/php/pecl-system-expect/commit/5578d898371b7fb55bbaa934c21b1acd374157f8
Log: Fixed bug #16836 (introduce expect.match_max .ini parameter for asterisk match buffer size)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 16:01:31 2024 UTC