Bug #68127 | RACE CONDITION IN TABLE PERFORMANCE_SCHEMA.THREADS | ||
---|---|---|---|
Submitted: | 20 Jan 2013 10:47 | Modified: | 22 Jan 2013 12:57 |
Reporter: | erkan yanar | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Performance Schema | Severity: | S2 (Serious) |
Version: | 5.6.9-rc | OS: | Linux (ubuntu 12.04) |
Assigned to: | Marc ALFF | CPU Architecture: | Any |
[20 Jan 2013 10:47]
erkan yanar
[20 Jan 2013 11:12]
Valeriy Kravchuk
This is easy to verify: [valerii.kravchuk@cisco1 mysql-5.6.9-rc-linux-glibc2.5-x86_64]$ bin/mysqlslap -uroot -q 'SELECT * from threads' --create-schema=performance_schema --number-of-queries=100000 -c 4 bin/mysqlslap: Cannot run query SELECT * from threads ERROR : Lost connection to MySQL server during query bin/mysqlslap: Cannot run query SELECT * from threads ERROR : Lost connection to MySQL server during query [valerii.kravchuk@cisco1 mysql-5.6.9-rc-linux-glibc2.5-x86_64]$ 130120 03:07:47 mysqld_safe Number of processes running now: 0 130120 03:07:47 mysqld_safe mysqld restarted In the error log I see: 11:07:47 UTC - mysqld got signal 11 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. key_buffer_size=8388608 read_buffer_size=131072 max_used_connections=5 max_threads=151 thread_count=5 connection_count=5 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 68215 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x2e98030 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 7fbbe36b3e10 thread_stack 0x40000 /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(my_print_stacktrace+0x35)[0x8edc75] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(handle_fatal_signal+0x3e8)[0x66a6e8] /lib64/libpthread.so.0(+0xf4a0)[0x7fbbfbc5d4a0] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld[0xb3d9be] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(my_well_formed_len_mb+0x61)[0xb31851] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(_Z23well_formed_copy_ncharsPK15charset_info_stPcjS1_PKcjjPS4_S5_S5_+0x1c6)[0x725be6] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(_ZN10Field_blob14store_internalEPKcjPK15charset_info_st+0x18b)[0x7cfdcb] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(_ZN13table_threads15read_row_valuesEP5TABLEPhPP5Fieldb+0x206)[0xb019c6] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(_ZN13ha_perfschema8rnd_nextEPh+0x68)[0xaddb18] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(_ZN7handler11ha_rnd_nextEPh+0x9c)[0x58637c] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(_Z13rr_sequentialP11READ_RECORD+0x37)[0x824ef7] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x181)[0x6c3451] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(_ZN4JOIN4execEv+0x26c)[0x6c121c] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld[0x704a19] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(_Z12mysql_selectP3THDP10TABLE_LISTjR4ListI4ItemEPS4_P10SQL_I_ListI8st_orderESB_S7_yP13select_resultP18st_select_lex_unitP13st_select_lex+0xbc)[0x704f4c] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(_Z13handle_selectP3THDP13select_resultm+0x175)[0x705155] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld[0x6e1ae9] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(_Z21mysql_execute_commandP3THD+0x3554)[0x6e6bd4] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x318)[0x6ea2b8] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x848)[0x6eabf8] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(_Z10do_commandP3THD+0xd7)[0x6ebe37] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(_Z24do_handle_one_connectionP3THD+0x116)[0x6b6806] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(handle_one_connection+0x45)[0x6b68e5] /home/valerii.kravchuk/mysql-5.6.9-rc-linux-glibc2.5-x86_64/bin/mysqld(pfs_spawn_thread+0x13b)[0xb072db] /lib64/libpthread.so.0(+0x77f1)[0x7fbbfbc557f1] /lib64/libc.so.6(clone+0x6d)[0x7fbbfa9bfccd] Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (7fbbc4004bc0): SELECT * from threads Connection ID (thread ID): 4 Status: NOT_KILLED
[21 Jan 2013 6:26]
Erlend Dahl
Thank you for the bug report. Verified as described, but I had to try several times before it crashed.
[22 Jan 2013 12:57]
Paul DuBois
Noted in 5.6.11, 5.7.1 changelogs. Due to a thread race condition, the server could exit while attempting to read the Performance Schema threads.PROCESSLIST_INFO column.
[22 Jan 2013 16:00]
Paul DuBois
Noted in 5.6.10 (not 5.6.11) changelog.