Every few mins (2-15min) mysqld crashes with a signal 11 (SEGV). I am
running FreeBSD 4.2 with mysql 3.23.36, I used to have 3.23.32 it had the
same problem, I upgraded to 3.23.36 today and it had the same problem. I
have recompiled mysql in full debug and done a stack trace and it keeps on
crashing in mysql_select(), here they are:
trace #1:
www# cd /usr/local/mysql/libexec
www# gdb mysqld
(gdb) run --user=mysql
Starting program: /usr/local/mysql/libexec/mysqld --user=mysql
010415 19:08:47 Warning: setrlimit returned ok, but didn't change limits.
Max open files is 1064
010415 19:08:47 Warning: Changed limits: max_connections: 300 table_cache:
377
/usr/local/mysql/libexec/mysqld: ready for connections
Program received signal SIGSEGV, Segmentation fault.
0x80bd208 in mysql_select (thd=0x824a818, tables=0x92da1c8,
fields=@0x824aa64, conds=0x92da4a0, ftfuncs=@0x824aa98, order=0x0,
group=0x0, having=0x0, proc_param=0x0, select_options=42505217,
result=0x92da518) at sql_select.cc:799
799 DBUG_RETURN(error);
...
(gdb) back
#0 0x80bd208 in mysql_select (thd=0x824a818, tables=0x92da1c8,
fields=@0x824aa64, conds=0x92da4a0, ftfuncs=@0x824aa98, order=0x0,
group=0x0, having=0x0, proc_param=0x0, select_options=42505217,
result=0x92da518) at sql_select.cc:799
#1 0x808e919 in mysql_execute_command () at sql_parse.cc:1136
#2 0x809219f in mysql_parse (thd=0x824a818,
inBuf=0x92da028 "select distinct pfs.shiptypeid, s.shipname from
planetfleetships pfs, shiptypes s where s.shiptypeid=pfs.shiptypeid and
pfs.planetid=3647", length=137) at sql_parse.cc:2298
#3 0x808d948 in do_command (thd=0x824a818) at sql_parse.cc:828
#4 0x808cba0 in handle_one_connection (arg=0x824a818) at sql_parse.cc:551
#5 0x2823a9a7 in _thread_start () from /usr/lib/libc_r.so.4
#6 0xbfadcffc in ?? ()
#7 0x28277fe7 in _thread_fd_unlock_debug () from /usr/lib/libc_r.so.4
#8 0x807c9e8 in THD::THD (this=0x92cb018) at sql_class.cc:78
#9 0x808889f in handle_connections_sockets (arg=0x0) at mysqld.cc:2274
#10 0x8087968 in main (argc=15, argv=0x8244140) at mysqld.cc:1890
#11 0x804b29d in _start ()
...
(gdb) info locals
tmp_table = (TABLE *) 0x92cc018
error = 0
tmp = 0
need_tmp = true
hidden_group_fields = false
simple_order = false
simple_group = false
no_order = false
cond_value = COND_OK
select = (SQL_SELECT *) 0x92dab20
keyuse = {buffer = 0x0, elements = 0, max_element = 0, alloc_increment = 64,
size_of_element = 20}
join = {join_tab = 0x92db050, best_ref = 0xbfaba2ec, map2table = 0x92da760,
table = 0x0, all_tables = 0x92da7e0,
sort_by_table = 0x0, tables = 1, const_tables = 0, send_group_parts = 0,
sort_and_group = false, first_record = false,
full_join = true, group = false, no_field_update = 76, const_table_map =
0, outer_join = 0, send_records = 1, found_records = 2,
positions = {{records_read = 14, table = 0x92da648, key = 0x0},
{records_read = 14, table = 0x92da648, key = 0x0}, {
records_read = 3.497926695968519e-115, table = 0x92e0180, key =
0x92d9274}, {records_read = 8.8208146916688224e-314,
table = 0xbfaba66c, key = 0x92d9274}, {records_read =
6.8236811656094081e-313, table = 0x282393b5, key = 0xbfaba6ac}, {
records_read = 1.9019183611868367e-269, table = 0x92d9000, key =
0xbfaba6ac}, {records_read = 3.497926695968519e-115,
table = 0x820d6ac, key = 0x92d9274}, {records_read =
1.5818070537455784e-264, table = 0xbfaba6ac, key = 0xbfaba7ec}, {
records_read = 1.9019183611868367e-269, table = 0x1, key =
0xbfaba7e0}, {records_read = 3.497926695968519e-115,
table = 0x820d6ac, key = 0x0}, {records_read =
1.8993304345295969e-269, table = 0xbfaba6dc, key = 0xbfaba71c}, {
records_read = 3.497926695968519e-115, table = 0x822c4d4, key =
0x92d9274}, {records_read = 3.4979266959743929e-115,
table = 0xbfaba6fc, key = 0x92d9274}, {records_read =
1.8993304345295969e-269, table = 0x822c4d8, key = 0xbfaba74c}, {
records_read = 3.497926695968519e-115, table = 0x822c4d4, key =
0x92d9274}, {records_read = 1.8992611150717832e-269,
table = 0xbfaba72c, key = 0xbfaba74c}, {records_read =
1.8993304345295969e-269, table = 0x92e0198, key = 0x92d9274}, {
records_read = 3.497926695968519e-115, table = 0x822c4d4, key = 0x0},
{records_read = 3.4978027730273331e-115,
table = 0xbfaba75c, key = 0x0}, {records_read =
3.497926695968519e-115, table = 0xbfaab000, key = 0x3c}, {
records_read = 1.8611437758736926e-264, table = 0xbfaba77c, key =
0x43f}, {records_read = 1.8520806496858815e-264,
table = 0x12e0198, key = 0xbfaba7cc}, {records_read =
1.8520805311109313e-264, table = 0xbfaba7f8, key = 0x1}, {
records_read = 3.4979266959805738e-115, table = 0x820d6ac, key =
0xbfaba7dc}, {records_read = 1.901849041729023e-269,
table = 0x282b11c0, key = 0xbfaba7dc}, {records_read =
3.7004632531246594e-115, table = 0x1, key = 0x92d9274}, {
records_read = 3.4979266959743929e-115, table = 0x822c4d8, key =
0x92d9274}, {records_read = 1.4777061514227843e-264,
table = 0x822c4d8, key = 0xbfaba82c}, {records_read =
3.497926695968519e-115, table = 0x9282248, key = 0x2}, {
records_read = 3.4979266959743929e-115, table = 0xbfaba80c, key =
0x92d9274}, {records_read = 1.4777061514227843e-264,
table = 0x822c4d8, key = 0xbfaba85c}, {records_read =
1.4775850068789208e-264, table = 0x9282248, key = 0x0}},
best_positions = {{records_read = 1, table = 0x92da530, key = 0x92ca418},
{records_read = 14, table = 0x92da648, key = 0x0}, {
records_read = 1.4775850068789208e-264, table = 0x0, key =
0xbfaba88c}, {records_read = 3.497926695968519e-115,
table = 0x92821f8, key = 0x0}, {records_read =
1.7300523033662307e-269, table = 0xbfaba87c, key = 0x92d9274}, {
records_read = 1.2765269380312171e-312, table = 0x282393b5, key =
0xbfaba8bc}, {records_read = 1.7763633011224387e-269,
table = 0x92d9000, key = 0xbfaba8bc}, {records_read =
1.7300521225261299e-269, table = 0xbfaab000, key = 0xbfaba9fc}, {
records_read = 1.861166371894758e-264, table = 0x8224790, key =
0xbfaba9fc}, {records_read = 4.4144220388218763e-312,
table = 0xbfaba9f4, key = 0xbfaba9f0}, {records_read =
1.7300531581110172e-269, table = 0x92da0b8, key = 0x1}, {
records_read = 2.198075303660321e-314, table = 0x1, key = 0xbfabaa78},
{records_read = 3.4979278420017467e-115,
table = 0xbfaab000, key = 0x92d9274}, {records_read =
3.4979266959805738e-115, table = 0x9282248, key = 0xbfaba93c}, {
records_read = 1.4776607222229115e-264, table = 0x282b11c0, key =
0xbfaba93c}, {records_read = 3.4979266959777939e-115,
table = 0xbfaab000, key = 0x2}, {records_read =
3.4979266959805738e-115, table = 0x0, key = 0xbfaba96c}, {
records_read = 3.4979266959805738e-115, table = 0x92821f8, key =
0xbfaba97c}, {records_read = 1.477539577679048e-264,
table = 0x282b11c0, key = 0xbfaba97c}, {records_read =
3.4979266959777939e-115, table = 0xbfaab000, key = 0x92d9274}, {
records_read = 3.4979266959805738e-115, table = 0x0, key =
0xbfaba9ac}, {records_read = 1.4968545608909657e-264,
table = 0x0, key = 0xbfaba9ac}, {records_read =
9.9194142539491769e-270, table = 0xbfaab000, key = 0x92d9274}, {
records_read = 5.0510198949898446e-312, table = 0x282393b5, key =
0xbfaba9dc}, {records_read = 1.4968544423756729e-264,
table = 0x92d9000, key = 0xbfaba9dc}, {records_read =
9.2500469978518521e+242, table = 0x676e696e, key = 0xbfabaa1c}, {
records_read = 1.5464840726753708e-269, table = 0x0, key =
0xbfabaa1c}, {records_read = 1.230824666992489e-311,
table = 0xbfabaa10, key = 0xbfabaa0c}, {records_read =
1.8387742388101894e-264, table = 0x1, key = 0xbfabaa5c}, {
records_read = 1.7296825995527133e-269, table = 0xbfaab000, key =
0x92e817c}, {records_read = -0.054032926466411037,
table = 0x0, key = 0xbfabaa6c}, {records_read =
1.9550286239291039e-269, table = 0xbfaab000, key = 0xbfabaa5c}},
best_read = 4.7999999999999998, fields = 0x824aa64, group_fields =
{<base_list> = {<Sql_alloc> = {<No data fields>},
first = 0x0, last = 0xbfabaa40, elements = 0}, <No data fields>},
tmp_table = 0x0, thd = 0x824a818, sum_funcs = 0x0,
procedure = 0x0, having = 0x0, select_options = 42505217, result =
0x92da518, tmp_table_param = {
copy_funcs = {<base_list> = {<Sql_alloc> = {<No data fields>}, first =
0x0, last = 0xbfabaa6c,
elements = 0}, <No data fields>}, copy_field = 0x0, group_buff =
0xbfabaa9c "", funcs = 0x92cc360, recinfo = 0x92cc408,
start_recinfo = 0x92cc3a8, keyinfo = 0x92cc368, end_write_records =
4294967295, copy_field_count = 0, field_count = 2,
sum_func_count = 0, func_count = 0, hidden_field_count = 0, group_parts
= 0, group_length = 0, quick_group = 1,
using_indirect_summary_function = false}, lock = 0x0}
procedure = (Procedure *) 0x0
all_fields = {<base_list> = {<Sql_alloc> = {<No data fields>}, first =
0x92da110, last = 0x92da17c,
elements = 2}, <No data fields>}
select_distinct = false
_db_func_ = 0x2826f3fb "\203Ä\020\205À\017\205Nÿÿÿ\213\203ô\013"
_db_file_ = 0x1 <Error reading address 0x1: Bad address>
_db_level_ = 1
_db_framep_ = (char **) 0x282d2940
...
(gdb) up
#1 0x808e919 in mysql_execute_command () at sql_parse.cc:1136
1136 result);
...
result = (class select_result *) 0x92da518
res = 0
thd = (THD *) 0x824a818
lex = (LEX *) 0x824a934
tables = (TABLE_LIST *) 0x92da1c8
_db_func_ = 0x824a934 "\001"
_db_file_ = 0x81d503d "mysql_parse"
_db_level_ = 134816073
_db_framep_ = (char **) 0xbfabaddc
...
(gdb) up
#2 0x809219f in mysql_parse (thd=0x824a818,
inBuf=0x92da028 "select distinct pfs.shiptypeid, s.shipname from
planetfleetships pfs, shiptypes s where s.shiptypeid=pfs.shiptypeid and
pfs.planetid=3647", length=137) at sql_parse.cc:2298
2298 mysql_execute_command();
...
(gdb) info locals
_db_func_ = 0x824a818 "\034¸,\t\030\230,\th2\"\b\230f,\tS"
_db_file_ = 0x820e1e0 ""
_db_level_ = 134797554
_db_framep_ = (char **) 0xbfabaf7c
lex = (LEX *) 0x824a934
...
(gdb) up
#3 0x808d948 in do_command (thd=0x824a818) at sql_parse.cc:828
828 mysql_parse(thd,thd->query,packet_length-1);
...
(gdb) info locals
pos = 0x929a0a2 ""
packet = 0x929a018 "\001"
old_timeout = 30
packet_length = 138
error = false
net = (NET *) 0x824a824
command = COM_QUERY
slow_command = false
_db_func_ = 0xbfabaf7c "¼¯«¿ Ë\b\b\030¨$\b"
_db_file_ = 0xbfaab000 ""
_db_level_ = 136621264
_db_framep_ = (char **) 0x0
start_of_query = 153723042
...
(gdb) up
#4 0x808cba0 in handle_one_connection (arg=0x824a818) at sql_parse.cc:551
551 if (do_command(thd))
...
(gdb) info locals
error = 0
net = (NET *) 0x824a824
thd = (THD *) 0x824a818
launch_time = 0
set = {__bits = {0, 0, 0, 0}}
...
(gdb) up
#5 0x2823a9a7 in _thread_start () from /usr/lib/libc_r.so.4
...
(gdb) info locals
No symbol table info available.
...
#6 0xbfadcffc in ?? ()
...
(gdb) info locals
No symbol table info available.
...
(gdb) up
#7 0x28277fe7 in _thread_fd_unlock_debug () from /usr/lib/libc_r.so.4
...
(gdb) info locals
No symbol table info available.
...
(gdb) up
#8 0x807c9e8 in THD::THD (this=0x92cb018) at sql_class.cc:78
78 THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0),
...
(gdb) info locals
No locals.
...
(gdb) up
#9 0x808889f in handle_connections_sockets (arg=0x0) at mysqld.cc:2274
2274 if (!(thd= new THD))
...
(gdb) info locals
sock = 9
new_sock = 107
error_count = 0
max_used_connection = 10
readFDs = {fds_bits = {512, 0 <repeats 31 times>}}
clientFDs = {fds_bits = {768, 0 <repeats 31 times>}}
thd = (THD *) 0x92cb818
cAddr = {sin_len = 16 '\020', sin_family = 1 '\001', sin_port = 0, sin_addr
= {s_addr = 0},
sin_zero = "\000\000\000\000\000\000\000"}
ip_flags = 2
socket_flags = 2
flags = 2
vio_tmp = (Vio *) 0x92dfb18
_db_func_ = 0x1000002 <Error reading address 0x1000002: Bad address>
_db_file_ = 0x2821c100 "z¸PÕ\001"
_db_level_ = 3217029212
_db_framep_ = (char **) 0xbfbff860
...
(gdb) up
#10 0x8087968 in main (argc=15, argv=0x8244140) at mysqld.cc:1890
1890 handle_connections_sockets(0);
...
(gdb) info locals
No locals.
...
(gdb) up
#11 0x804b29d in _start ()
...
(gdb) info locals
No symbol table info available.
trace #2:
www# cd /usr/local/mysql/libexec
www# gdb mysqld
...
(gdb) run --user=mysql
Starting program: /usr/local/mysql/libexec/mysqld --user=mysql
010415 19:21:40 Warning: setrlimit returned ok, but didn't change limits.
Max open files is 1064
010415 19:21:40 Warning: Changed limits: max_connections: 300 table_cache:
377
/usr/local/mysql/libexec/mysqld: ready for connections
Program received signal SIGSEGV, Segmentation fault.
0x80bd208 in mysql_select (thd=0x9269018, tables=0x92c30d0,
fields=@0x9269264, conds=0x92c3198, ftfuncs=@0x9269298, order=0x0,
group=0x0, having=0x0, proc_param=0x0, select_options=42505216,
result=0x92c3208) at sql_select.cc:799
799 DBUG_RETURN(error);
...
#0 0x80bd208 in mysql_select (thd=0x9269018, tables=0x92c30d0,
fields=@0x9269264, conds=0x92c3198, ftfuncs=@0x9269298, order=0x0,
group=0x0, having=0x0, proc_param=0x0, select_options=42505216,
result=0x92c3208) at sql_select.cc:799
#1 0x808e919 in mysql_execute_command () at sql_parse.cc:1136
#2 0x809219f in mysql_parse (thd=0x9269018, inBuf=0x92c3028 "select probes
from planets where planetid=4051", length=46)
at sql_parse.cc:2298
#3 0x808d948 in do_command (thd=0x9269018) at sql_parse.cc:828
#4 0x808cba0 in handle_one_connection (arg=0x9269018) at sql_parse.cc:551
#5 0x2823a9a7 in _thread_start () from /usr/lib/libc_r.so.4
#6 0xbfabaffc in ?? ()
#7 0x28277fe7 in _thread_fd_unlock_debug () from /usr/lib/libc_r.so.4
#8 0x807c9e8 in THD::THD (this=0x92b1818) at sql_class.cc:78
#9 0x808889f in handle_connections_sockets (arg=0x0) at mysqld.cc:2274
#10 0x8087968 in main (argc=15, argv=0x8244140) at mysqld.cc:1890
#11 0x804b29d in _start ()
...
#1 0x808e919 in mysql_execute_command () at sql_parse.cc:1136
1136 result);
...
(gdb) info locals
result = (class select_result *) 0x92c3208
res = 0
thd = (THD *) 0x9269018
lex = (LEX *) 0x9269134
tables = (TABLE_LIST *) 0x92c30d0
_db_func_ = 0x9269134 "\001"
_db_file_ = 0x81d503d "mysql_parse"
_db_level_ = 134816073
_db_framep_ = (char **) 0xbfadcddc
...
(gdb) up
#2 0x809219f in mysql_parse (thd=0x9269018, inBuf=0x92c3028 "select probes
from planets where planetid=4051", length=46)
at sql_parse.cc:2298
2298 mysql_execute_command();
...
(gdb) info locals
_db_func_ = 0x9269018 "ðà \bôà \bh2\"\b\230[)\t\f"
_db_file_ = 0x820e1e0 ""
_db_level_ = 134797554
_db_framep_ = (char **) 0xbfadcf7c
lex = (LEX *) 0x9269134
...
(gdb) up
#3 0x808d948 in do_command (thd=0x9269018) at sql_parse.cc:828
828 mysql_parse(thd,thd->query,packet_length-1);
...
(gdb) info locals
pos = 0x9265047 ""
packet = 0x9265018 "\001"
old_timeout = 30
packet_length = 47
error = false
net = (NET *) 0x9269024
command = COM_QUERY
slow_command = false
_db_func_ = 0xbfadcf7c "¼Ï¿ Ë\b\b\030\220&\t"
_db_file_ = 0xbfacd000 ""
_db_level_ = 153523408
_db_framep_ = (char **) 0x0
start_of_query = 153505863
...
#4 0x808cba0 in handle_one_connection (arg=0x9269018) at sql_parse.cc:551
551 if (do_command(thd))
...
(gdb) info locals
error = 0
net = (NET *) 0x9269024
thd = (THD *) 0x9269018
launch_time = 0
set = {__bits = {0, 0, 0, 0}}
...
(gdb) up
#5 0x2823a9a7 in _thread_start () from /usr/lib/libc_r.so.4
...
(gdb) info locals
No symbol table info available.
...
(gdb) up
#6 0xbfabaffc in ?? ()
...
(gdb) info locals
No symbol table info available.
...
(gdb) up
#7 0x28277fe7 in _thread_fd_unlock_debug () from /usr/lib/libc_r.so.4
...
(gdb) info locals
No symbol table info available.
...
(gdb) up
#8 0x807c9e8 in THD::THD (this=0x92b1818) at sql_class.cc:78
78 THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0),
...
(gdb) info locals
No locals.
...
(gdb) up
#9 0x808889f in handle_connections_sockets (arg=0x0) at mysqld.cc:2274
2274 if (!(thd= new THD))
...
(gdb) info locals
sock = 9
new_sock = 73
error_count = 0
max_used_connection = 10
readFDs = {fds_bits = {512, 0 <repeats 31 times>}}
clientFDs = {fds_bits = {768, 0 <repeats 31 times>}}
thd = (THD *) 0x9269018
cAddr = {sin_len = 16 '\020', sin_family = 1 '\001', sin_port = 0, sin_addr
= {s_addr = 0},
sin_zero = "\000\000\000\000\000\000\000"}
ip_flags = 2
socket_flags = 2
flags = 2
vio_tmp = (Vio *) 0x9295b98
_db_func_ = 0x1000002 <Error reading address 0x1000002: Bad address>
_db_file_ = 0x2821c100 "z¸PÕ\001"
_db_level_ = 3217029212
_db_framep_ = (char **) 0xbfbff860
...
(gdb) up
#10 0x8087968 in main (argc=15, argv=0x8244140) at mysqld.cc:1890
1890 handle_connections_sockets(0);
...
(gdb) info locals
No locals.
...
(gdb) up
#11 0x804b29d in _start ()
...
(gdb) info locals
No symbol table info available.
If any of the developers would like access to my machine, I can provide it
through ssh and you can see for yourself. I hope the solution to this
problem is found soon. Thanks for your help.
-Andrei Cojocaru
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php