php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39099 Segmentation fault on mysql_connect()
Submitted: 2006-10-09 17:19 UTC Modified: 2006-10-09 17:55 UTC
From: dwerder at gmx dot net Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.1.6 OS: Linux 2.4.24-oom
Private report: No CVE-ID: None
 [2006-10-09 17:19 UTC] dwerder at gmx dot net
Description:
------------
The apache child process crashes (SEGV) on mysql_connect().
It works with the PHP CLI.

Software:

Linux 2.4.24
Apache 2.2.3 (prefork of course)
MySQL 5.0.24a (latest production release)
PHP 5.1.6

All compiled from source.


Expected result:
----------------
I'd like to connect to the DB :)

Actual result:
--------------
#0  0x081f5a44 in ?? ()
#1  0x408f0996 in _nss_db_getspnam_r () from /lib/libnss_db.so.2
#2  0x408f0b0b in _nss_db_getspnam_r () from /lib/libnss_db.so.2
#3  0x408f01bf in _nss_db_endservent () from /lib/libnss_db.so.2
#4  0x408f0470 in _nss_db_getservbyname_r () from /lib/libnss_db.so.2
#5  0x4031c5eb in getservbyname_r () from /lib/libc.so.6
#6  0x4031c496 in getservbyname () from /lib/libc.so.6
#7  0x4072eee0 in mysql_server_init ()
   from /usr/local/lib/mysql/libmysqlclient.so.15
#8  0x4075120f in mysql_init () from /usr/local/lib/mysql/libmysqlclient.so.15
#9  0x404eb3d1 in php_mysql_do_connect (ht=136267956, return_value=0x81f0344, 
    return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, persistent=0)
    at /root/software/php-5.1.6/ext/mysql/php_mysql.c:789
#10 0x404ecda3 in zif_mysql_connect (ht=136271648, return_value=0x81f5720, 
    return_value_ptr=0x81f5720, this_ptr=0x81f5720,
    return_value_used=136271648)
    at /root/software/php-5.1.6/ext/mysql/php_mysql.c:845
#11 0x40612b88 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfffd660)
    at zend_vm_execute.h:200
#12 0x406122a8 in execute (op_array=0x81f0074) at zend_vm_execute.h:92
#13 0x405f5380 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /root/software/php-5.1.6/Zend/zend.c:1109
#14 0x405b2fa6 in php_execute_script (primary_file=0xbffff9c0)
    at /root/software/php-5.1.6/main/main.c:1737
#15 0x40669ba9 in php_handler (r=0x81e0758)
    at /root/software/php-5.1.6/sapi/apache2handler/sapi_apache2.c:586
#16 0x080748f5 in ap_run_handler (r=0x81e0758) at config.c:157
#17 0x08074f00 in ap_invoke_handler (r=0x81e0758) at config.c:371
#18 0x0808168f in ap_process_request (r=0x81e0758) at http_request.c:258
#19 0x0807f098 in ap_process_http_connection (c=0x81da7b0) at http_core.c:184
#20 0x0807b255 in ap_run_process_connection (c=0x81da7b0) at connection.c:43
#21 0x08085eda in child_main (child_num_arg=136271648) at prefork.c:640
#22 0x08086012 in make_child (s=0x0, slot=0) at prefork.c:680
#23 0x08086c3f in ap_mpm_run (_pconf=0x80a79e0, plog=0x80d5a98, s=0x80a9880)
    at prefork.c:956
#24 0x0806219c in main (argc=2, argv=0xbffffd84) at main.c:717


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-09 17:55 UTC] tony2001@php.net
We cannot fix nor libc, neither libnss.
Not PHP problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Oct 14 08:01:27 2024 UTC