httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Fosdick <b...@bfoz.net>
Subject DBD/MySQL crash
Date Thu, 28 Dec 2006 06:19:13 GMT
For the last week I've been fighting a weird segfault that I just couldn't pin down. I finally
got a workable gdb (6.5 and 6.6) running on my FreeBSD box and now I'm even more confused.
I'm not quite sure its an httpd problem, but you guys tend to be more helpful :)

This is all on a 6.2-PRE box rebuilt last night, fresh ports tree with fresh installs of www/apache22
and database/mysql50-client, both compiled with debugging. I'm working on a mod_log_dbd that
for now only opens a connection to a different test machine running database/mysql50-server.
The mysql client lib is segfaulting while trying to stat /usr/local/share/mysql/charsets/Index.xml,
which doesn't exist and isn't installed by the client lib (not in pkg-plist). It is, however,
installed on the server. If I touch Index.xml on the client, no more segfault.

Interestingly, running the mysql client from the command line doesn't segfault, which is why
I think httpd/dbd is doing something odd.

Anyone else seen this? I'm probably missing something obvious, but I'm not seeing it.

Here's the backtrace...
---
#gdb httpd
GNU gdb 6.5 [GDB v6.x for FreeBSD]
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-portbld-freebsd6.2"...
(gdb) r -X
Starting program: /usr/local/sbin/httpd -X
[Wed Dec 27 21:43:04 2006] [warn] (2)No such file or directory: Failed to enable the 'httpready'
Accept Filter

Program received signal SIGSEGV, Segmentation fault.
0x2811c9fe in my_stat (
    path=0xbfbfd370 "/usr/local/share/mysql/charsets/Index.xml", 
    stat_area=0xbfbfd2d0, my_flags=0) at my_lib.c:650
650       my_errno= errno;
(gdb) bt
#0  0x2811c9fe in my_stat (
    path=0xbfbfd370 "/usr/local/share/mysql/charsets/Index.xml", 
    stat_area=0xbfbfd2d0, my_flags=0) at my_lib.c:650
#1  0x28113868 in my_read_charset_file (
    filename=0xbfbfd370 "/usr/local/share/mysql/charsets/Index.xml", myflags=0)
    at charset.c:318
#2  0x28113c6c in init_available_charsets (myflags=0) at charset.c:422
#3  0x28114149 in get_charset_by_csname (cs_name=0x8186170 "latin1", 
    cs_flags=2, flags=16) at charset.c:558
#4  0x281283ee in mysql_init_character_set (mysql=0x8136800) at client.c:1704
#5  0x28129c8c in mysql_real_connect (mysql=0x8136800, 
    host=0x814e190 "bfoz.net", user=0x814e1a0 "logger", passwd=0x28135e38 "", 
    db=0x0, port=3306, unix_socket=0x0, client_flag=0) at client.c:2093
#6  0x280ed86c in dbd_mysql_open (pool=0x80b9018, 
    params=0x80eb60c "host=bfoz.net,user=logger")
    at /usr/tmp/usr/ports/www/apache22/work/httpd-2.2.3/srclib/apr-util/dbd/apr_dbd_mysql.c:728
#7  0x280ebc3c in apr_dbd_open (driver=0x280ef800, pool=0x80b9018, 
    params=0x80eb60c "host=bfoz.net,user=logger", handle=0x8175b9c)
    at /usr/tmp/usr/ports/www/apache22/work/httpd-2.2.3/srclib/apr-util/dbd/apr_dbd.c:163
#8  0x28652ab3 in log_dbd::ServerConfig::connect (this=0x8175b68)
    at src/apr_pool_base.h:66
#9  0x2864ff25 in child_init (p=0x818a018, s=0x8131cb8) at src/hooks.cc:40
#10 0x0807743e in ap_run_child_init (pchild=0x818a018, s=0x80baeb8)
    at config.c:153
#11 0x0808ae32 in child_main (child_num_arg=0) at prefork.c:513
#12 0x0808b178 in make_child (s=0x80baeb8, slot=0) at prefork.c:680
#13 0x0808b685 in ap_mpm_run (_pconf=0x80b9018, plog=0x80e7018, s=0x80baeb8)
    at prefork.c:956
#14 0x080623be in main (argc=2, argv=0xbfbfeb18) at main.c:717
(gdb) 
---


Mime
View raw message