InnoDB: Assertion failure in thread in file row0sel.cc line 3932 | abort (sig=6) in row_search_for_mysql
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.1 |
Won't Fix
|
Undecided
|
Unassigned | |||
5.5 |
New
|
Undecided
|
Unassigned | |||
5.6 |
Triaged
|
High
|
Unassigned | |||
5.7 |
Triaged
|
High
|
Unassigned |
Bug Description
(gdb) bt
#0 0x00007fa08f79b771 in pthread_kill () from /lib64/
#1 0x0000000000a90dda in my_write_core (sig=6) at /bzr/5.
#2 0x0000000000722176 in handle_fatal_signal (sig=6) at /bzr/5.
#3 <signal handler called>
#4 0x00007fa08dd4e5c9 in raise () from /lib64/libc.so.6
#5 0x00007fa08dd4fcd8 in abort () from /lib64/libc.so.6
#6 0x0000000000c8bbe1 in row_search_
#7 0x0000000000b66dd1 in ha_innobase:
#8 0x0000000000647a4a in handler:
#9 0x0000000000644ffd in handler:
#10 0x000000000063cbfc in handler:
#11 0x00000000007a36e8 in join_read_const (tab=0x7f9fe280
#12 0x00000000007a320a in join_read_
#13 0x00000000009a9b1d in make_join_
#14 0x00000000009a18a7 in JOIN::optimize (this=0x7f9fe28
#15 0x00000000007ff413 in mysql_execute_
#16 0x00000000007ff74c in mysql_select (thd=0x7f9fe041
#17 0x00000000007fd872 in handle_select (thd=0x7f9fe041
#18 0x00000000007d6fb3 in execute_
#19 0x00000000007cf72a in mysql_execute_
#20 0x00000000007d976b in mysql_parse (thd=0x7f9fe041
#21 0x00000000007cc0b7 in dispatch_command (command=COM_QUERY, thd=0x7f9fe0419000, packet=
#22 0x00000000007cb038 in do_command (thd=0x7f9fe041
#23 0x000000000079591e in do_handle_
#24 0x0000000000795435 in handle_
#25 0x0000000000add6af in pfs_spawn_thread (arg=0x7f9fecb4
#26 0x00007fa08f796df3 in start_thread () from /lib64/
#27 0x00007fa08de0f01d in clone () from /lib64/libc.so.6
This assert was seen during a very long sysbench run which was kill -9'ed regularly, then re-started. Hopefully the coredump + a code review show the bug, but will add testcase I used also. PZ first found this bug doing Sysbench runs + ctrl+c.
This bug was seen on a minor-patched mysqld, including patch for completeness;
$ bzr diff
=== modified file 'storage/
--- storage/
+++ storage/
@@ -1808,6 +1808,8 @@
+fprintf(stderr, "innodb_
+
if (srv_stats.
description: | updated |
Testcase setup (in my case it took about a night of runtime to trigger);
1. Attached tar is a recent version of sysbench. Extract in home dir, creates ~/sysbenchnew qa/startup. sh 0; ./start) ${PWD}/ bundle/ libmysqlclient_ r.so.16 ew/sysbench --num-threads=64 --report- interval= 10 --max-time=0 --max-requests=0 --rand-type=pareto --oltp- table-size= 1000000 --mysql-user=root --test= /home/roel/ sysbenchnew/ oltp.lua --mysql- socket= /sda/Percona- Server- 5.6.21- rel70.0- 676-debug. Linux.x86_ 64/socket. sock --mysql-db=test prepare w/sysbench --num-threads=64 --report- interval= 10 --max-time=0 --max-requests=0 --rand-type=pareto --oltp- table-size= 1000000 --mysql-user=root --test= /home/roel/ sysbenchnew/ oltp.lua --mysql- socket= /sda/Percona- Server- 5.6.21- rel70.0- 676-debug. Linux.x86_ 64/socket. sock --mysql-db=test run & w/sysbench --num-threads=64 --report- interval= 10 --max-time=0 --max-requests=0 --rand-type=pareto --oltp- table-size= 1000000 --mysql-user=root --test= /home/roel/ sysbenchnew/ oltp.lua --mysql- socket= /sda/Percona- Server- 5.6.21- rel70.0- 676-debug. Linux.x86_ 64/socket. sock --threads=120 --mysql-db=test run & scripts/ 4 scripts/ 2 Percona- Server- 5.6.21- rel70.0- 676-debug. Linux.x86_ 64/socket. sock test -e"show global status like 'Innodb_ row_lock_ current_ waits'; show global status like 'questions'; show global status like 'queries'; "; sleep 0.2; done
2. Start server (cd basedir; ~/percona-
3. Prep sysbech:
export LD_PRELOAD=
~/sysbenchn
4. Put the following line which starts two sysbench runs at the same time (notice the &) in a script named "3"
~/sysbenchne
~/sysbenchne
5. Make a script named 4 and start it;
$ cat sysbenchnew_
while(true); do
./3 &
DELAY=$[1 + ( $RANDOM % ( 3600 ) ) ]
sleep $DELAY
kill -9 `pidof sysbench`
done
6. Setup a light monitoring script (maybe not needed, just adding for completeness) and start it (all script in different shells);
$ cat sysbenchnew_
while(true); do ./bin/mysql -uroot -S/sda/
7. Wait a night orso for the crash to happen.