Bug #17589 | select count(*) from general_log; with file size of 27GB results in core | ||
---|---|---|---|
Submitted: | 20 Feb 2006 17:24 | Modified: | 23 Jun 2006 4:43 |
Reporter: | Jonathan Miller | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Logging | Severity: | S1 (Critical) |
Version: | 5.1.8 | OS: | Linux (Linux 64 bit OS) |
Assigned to: | Petr Chardin | CPU Architecture: | Any |
[20 Feb 2006 17:24]
Jonathan Miller
[23 Feb 2006 1:57]
Brian Aker
Jonathan, what distribution were you using? Could you run this and tell me what the output was: cat >> foo.c #include <stdio.h> #include <sys/types.h> int main() { printf("Foo %d\n", sizeof(off_t)); return 0; } gcc foo.c ./a.out Thanks, -Brian
[25 Feb 2006 18:33]
Jonathan Miller
Per Brians request, it shows 4 on 32 bit systems and 8 on 64 bit systems
[28 Mar 2006 19:49]
Jonathan Miller
Hi, Running cluster stress test today, wanted to see if I needed to truncate the general_log table so I did select count(*) from it and boom mysqld gone :-( #0 0x008f6465 in mempcpy () from /lib/libc.so.6 #1 0x008ea9ed in _IO_new_file_xsputn () from /lib/libc.so.6 #2 0x008c59e3 in buffered_vfprintf () from /lib/libc.so.6 #3 0x008c5c37 in vfprintf () from /lib/libc.so.6 #4 0x008df9aa in __fxprintf () from /lib/libc.so.6 #5 0x008ac2d5 in __assert_fail () from /lib/libc.so.6 #6 0x0841cf48 in __cxa_pure_virtual () #7 0x0818e144 in Item_func_now_local::store_now_in_TIME () #8 0x0818e0a9 in Item_func_now::fix_length_and_dec () #9 0x081611d8 in Item_func::fix_fields () #10 0x082166ed in setup_fields () #11 0x08251ca3 in mysql_update () #12 0x081eafc4 in mysql_execute_command () #13 0x08305a2b in sp_instr_stmt::exec_core () #14 0x0830584e in sp_lex_keeper::reset_lex_and_exec_core () #15 0x08307f61 in sp_instr_stmt::execute () #16 0x0830322d in sp_head::execute () #17 0x083040c4 in sp_head::execute_procedure () #18 0x081eee13 in mysql_execute_command () #19 0x081f0ba0 in mysql_parse () #20 0x081f142c in dispatch_command () #21 0x081f256e in do_command () #22 0x081f2925 in handle_one_connection () #23 0x009fdb80 in start_thread () from /lib/libpthread.so.0 #24 0x009559ce in clone () from /lib/libc.so.6
[28 Mar 2006 19:51]
Jonathan Miller
Also got this nice stack trace in the error log: 0x81cfe00 handle_segfault + 438 0xc4f420 (?) 0x81 (?) 0x829a13d _Z13rr_sequentialP14st_read_record + 115 0x8233567 _Z10sub_selectP4JOINP13st_join_tableb + 333 0x823386c _Z9do_selectP4JOINP4ListI4ItemEP8st_tableP9Procedure + 668 0x8243783 _ZN4JOIN4execEv + 6235 0x82439ff _Z12mysql_selectP3THDPPP4ItemP13st_table_listjR4ListIS1_ES2_jP8st_orderSB_S2_SB_mP13select_resultP18st_select_lex_unitP13st_sel + 561 0x8243c2f _Z13handle_selectP3THDP6st_lexP13select_resultm + 309 0x81e92f9 _Z21mysql_execute_commandP3THD + 1877 0x81f0ba0 _Z11mysql_parseP3THDPcj + 608
[16 Jun 2006 22:05]
Petr Chardin
Fixed in scope of WL#3244 "CSV engine: convert mmap to read/write calls"
[21 Jun 2006 4:28]
Paul DuBois
Need the three-part version number for the patch. Thanks.
[22 Jun 2006 19:29]
Petr Chardin
the patch was pushed to 5.1.12-beta
[23 Jun 2006 4:43]
Paul DuBois
Noted in 5.1.12 changelog. If the general log table reached a large enough file size (27GB), SELECT COUNT(*) on the table caused a server crash.