abort in handler::ha_thd | sql/handler.cc:2419: THD* handler::ha_thd() const: Assertion `!table || !table->in_use || table->in_use == _current_thd()' failed. (sig6)

Bug #1204880 reported by Roel Van de Paar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Invalid
High
Unassigned
5.1
Won't Fix
Undecided
Unassigned
5.5
Invalid
High
Unassigned
5.6
Invalid
High
Unassigned

Bug Description

Thread 1 (LWP 18612):
+bt
#0 0x000000340cc0c69c in pthread_kill () from /lib64/libpthread.so.0
#1 0x0000000000686bde in handle_fatal_signal (sig=6) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/signal_handler.cc:251
#2 <signal handler called>
#3 0x000000340c4328a5 in raise () from /lib64/libc.so.6
#4 0x000000340c434085 in abort () from /lib64/libc.so.6
#5 0x000000340c42ba1e in __assert_fail_base () from /lib64/libc.so.6
#6 0x000000340c42bae0 in __assert_fail () from /lib64/libc.so.6
#7 0x00000000005b9dec in handler::ha_thd (this=0x7fde341e2390) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/handler.cc:2419
#8 0x00000000009f6f81 in ha_innobase::table_flags (this=0x7fde341e2390) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/storage/innobase/handler/ha_innodb.cc:4188
#9 0x00000000005b376c in handler::ha_external_lock (this=0x7fde341e2390, thd=<optimized out>, lock_type=1) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/handler.cc:7350
#10 0x000000000085050a in lock_external (count=2, tables=<optimized out>, thd=0x3062a60) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/lock.cc:362
#11 mysql_lock_tables (thd=0x3062a60, tables=0x7fde34006b88, count=<optimized out>, flags=<optimized out>) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/lock.cc:306
#12 0x00000000006c35fb in lock_tables (thd=0x3062a60, tables=0x7fde34004d78, count=<optimized out>, flags=0) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_base.cc:5961
#13 0x00000000007490ff in mysql_select (thd=0x3062a60, tables=0x7fde34005490, wild_num=1, fields=..., conds=0x0, order=<optimized out>, group=0x3065638, having=0x0, select_options=3489925888, result=0x7fde34005a08, unit=0x3064ef0, select_lex=0x3065538) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_select.cc:1202
#14 0x0000000000749dbb in handle_select (thd=0x3062a60, result=0x7fde34005a08, setup_tables_done_option=1073741824) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_select.cc:111
#15 0x0000000000726748 in mysql_execute_command (thd=0xffffffffffffdc58) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_parse.cc:3727
#16 0x0000000000727818 in mysql_parse (thd=0x3062a60, rawbuf=0x3064e28 "\360R7\001", length=<optimized out>, parser_state=<optimized out>) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_parse.cc:6477
#17 0x000000000072871f in dispatch_command (command=COM_QUERY, thd=0x3062a60, packet=0x310fae1 " INSERT INTO z SELECT * FROM `table100_int_autoinc`", packet_length=51) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_parse.cc:1374
#18 0x0000000000729a47 in do_command (thd=0x3062a60) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_parse.cc:1049
#19 0x00000000006ed63f in do_handle_one_connection (thd_arg=<optimized out>) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_connect.cc:1615
#20 0x00000000006ed727 in handle_one_connection (arg=0x3062a60) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_connect.cc:1526
#21 0x00000000009dd6c9 in pfs_spawn_thread (arg=0x2f13790) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/storage/perfschema/pfs.cc:1855
#22 0x000000340cc07851 in start_thread () from /lib64/libpthread.so.0
#23 0x000000340c4e890d in clone () from /lib64/libc.so.6

[...]
2013-07-19 22:45:00 18509 [ERROR] /ssd/Percona-Server-5.6.12-rc60.4-405-debug.Linux.x86_64/bin/mysqld: Deadlock found when trying to get lock; try restarting transaction
2013-07-19 22:45:00 18509 [ERROR] /ssd/Percona-Server-5.6.12-rc60.4-405-debug.Linux.x86_64/bin/mysqld: Sort aborted: Deadlock found when trying to get lock; try restarting transaction
2013-07-19 22:45:03 18509 [ERROR] /ssd/Percona-Server-5.6.12-rc60.4-405-debug.Linux.x86_64/bin/mysqld: Deadlock found when trying to get lock; try restarting transaction
2013-07-19 22:45:03 18509 [ERROR] /ssd/Percona-Server-5.6.12-rc60.4-405-debug.Linux.x86_64/bin/mysqld: Sort aborted: Deadlock found when trying to get lock; try restarting transaction
2013-07-19 22:45:03 18509 [ERROR] /ssd/Percona-Server-5.6.12-rc60.4-405-debug.Linux.x86_64/bin/mysqld: Deadlock found when trying to get lock; try restarting transaction
2013-07-19 22:45:03 18509 [ERROR] /ssd/Percona-Server-5.6.12-rc60.4-405-debug.Linux.x86_64/bin/mysqld: Sort aborted: Deadlock found when trying to get lock; try restarting transaction
mysqld: /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/handler.cc:2419: THD* handler::ha_thd() const: Assertion `!table || !table->in_use || table->in_use == _current_thd()' failed.
19:45:03 UTC - mysqld got signal 6 ;
[...]
Query (7fde34004c60): INSERT INTO z SELECT * FROM `table100_int_autoinc`

Tags: qa
Revision history for this message
Roel Van de Paar (roel11) wrote :
Revision history for this message
Roel Van de Paar (roel11) wrote :
Revision history for this message
Roel Van de Paar (roel11) wrote :
Revision history for this message
Roel Van de Paar (roel11) wrote :

[roel@qaserver 209184]$ cat cmd293
ps -ef | grep 'cmdrun_293' | grep -v grep | awk '{print $2}' | xargs sudo kill -9
rm -Rf /ssd/209184/cmdrun_293
mkdir /ssd/209184/cmdrun_293
cd /ssd/randgen
bash -c "set -o pipefail; perl /ssd/randgen/runall.pl --queries=100000000 --seed=21668 --duration=300 --querytimeout=60 --reporter=Shutdown,Backtrace,QueryTimeout,ErrorLog,ErrorLogAlarm --mysqld=--log-output=none --mysqld=--sql_mode=ONLY_FULL_GROUP_BY --mysqld=--slow_query_log --mysqld=--userstat --threads=25 --notnull --basedir=/ssd/Percona-Server-5.6.12-rc60.4-405-debug.Linux.x86_64 --grammar=/tmp/976291/89.yy --gendata=/ssd/randgen/conf/drizzle/many_indexes_drizzle.zz --mtr-build-thread=766 --mask=64840 --vardir1=/ssd/209184/cmdrun_293 > /ssd/209184/cmdrun293.log 2>&1"

Revision history for this message
Roel Van de Paar (roel11) wrote :
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

99% it's upstream.

tags: added: upstream
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

I take this back. This is probably another instance of I_S.TEMP_TABLES bugs. Need reproduction with the current QA branch.

tags: removed: upstream
Revision history for this message
Roel Van de Paar (roel11) wrote :

Seen in 5.5 also; mysqld: /bzr/5.5_dbg/Percona-Server-5.5.32-rel31.0/sql/handler.cc:2310: THD* handler::ha_thd() const: Assertion `!table || !table->in_use || table->in_use == _current_thd()' failed.

Revision history for this message
Roel Van de Paar (roel11) wrote :

This is an important bug for 5.6 GA I think. It occurs regularly. Checking further and attempting to create testcase.

Revision history for this message
Roel Van de Paar (roel11) wrote :

Changed status to "confirmed" to avoid de-listing the bug from lists

tags: added: 56qual
Revision history for this message
Roel Van de Paar (roel11) wrote :

This was fixed already by other work on 5.6-QA tree. The latest run does not show it anymore. Putting this as "invalid" until shown otherwise (if at all).

tags: removed: 56qual
Revision history for this message
Roel Van de Paar (roel11) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-702

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.