LOCK TABLES FOR BACKUP should be incompatible with LOCK TABLES, FLUSH TABLES ... WITH READ LOCK, FLUSH TABLES ... FOR EXPORT in the same connection

Bug #1360064 reported by Ramesh Sivaraman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Low
Alexey Kopytov
5.1
Invalid
Undecided
Unassigned
5.5
Invalid
Undecided
Unassigned
5.6
Fix Released
Low
Alexey Kopytov

Bug Description

========================= Error log:
mysqld: /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.19-67.0/sql/lock.cc:1140: void Global_backup_lock::re
lease(THD*): Assertion `m_lock != __null && thd->mdl_context.is_lock_owner(m_namespace, "", "", MDL_SHARED)' failed.
13:16:55 UTC - mysqld got signal 6 ;
---
--
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f55d9cd6010): UNLOCK TABLES
Connection ID (thread ID): 19
Status: NOT_KILLED

========================= gdb :
Thread 1 (LWP 14549):
+bt
#0 0x00007f56441b9771 in pthread_kill () from /lib64/libpthread.so.0
#1 0x0000000000aaa60e in my_write_core (sig=6) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.19-67.0/mysys/stacktrace.c:422
#2 0x0000000000727d92 in handle_fatal_signal (sig=6) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.19-67.0/sql/signal_handler.cc:254
#3 <signal handler called>
#4 0x00007f5642dbd989 in raise () from /lib64/libc.so.6
#5 0x00007f5642dbf098 in abort () from /lib64/libc.so.6
#6 0x00007f5642db68f6 in __assert_fail_base () from /lib64/libc.so.6
#7 0x00007f5642db69a2 in __assert_fail () from /lib64/libc.so.6
#8 0x000000000094e244 in Global_backup_lock::release (this=0x7f560dbf0a08, thd=0x7f560dbef000) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.19-67.0/sql/lock.cc:1138
#9 0x00000000007dde4f in mysql_execute_command (thd=0x7f560dbef000) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.19-67.0/sql/sql_parse.cc:4168
#10 0x00000000007e4c87 in mysql_parse (thd=0x7f560dbef000, rawbuf=0x7f55d9cd6010 "UNLOCK TABLES", length=13, parser_state=0x7f564476ed10) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.19-67.0/sql/sql_parse.cc:6746
#11 0x00000000007d7222 in dispatch_command (command=COM_QUERY, thd=0x7f560dbef000, packet=0x7f560dbf3001 "UNLOCK TABLES", packet_length=13) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.19-67.0/sql/sql_parse.cc:1434
#12 0x00000000007d614e in do_command (thd=0x7f560dbef000) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.19-67.0/sql/sql_parse.cc:1051
#13 0x00000000008b9ca7 in threadpool_process_request (thd=0x7f560dbef000) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.19-67.0/sql/threadpool_common.cc:319
#14 0x00000000008bc589 in handle_event (connection=0x7f560d725b20) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.19-67.0/sql/threadpool_unix.cc:1550
#15 0x00000000008bc7b9 in worker_main (param=0x1880c00 <all_groups+2048>) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.19-67.0/sql/threadpool_unix.cc:1603
#16 0x0000000000db42e0 in pfs_spawn_thread (arg=0x7f56263bc1a0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.19-67.0/storage/perfschema/pfs.cc:1860
#17 0x00007f56441b4df3 in start_thread () from /lib64/libpthread.so.0
#18 0x00007f5642e7e3dd in clone () from /lib64/libc.so.6
(gdb) +set logging off

========================= Testcase reduction info:
PS startup cmd:

/ssd/ramesh/ps56dbg/bin/mysqld --basedir=/ssd/ramesh/ps56dbg --datadir=/ssd/1408675866/data --port=39460 --pid-file=/ssd/1408675866/pid.pid --log-error=/ssd/1408675866/error.log.out --socket=/ssd/1408675866/socket.sock --user=ramesh --log-output=none --sql_mode=ONLY_FULL_GROUP_BY --event-scheduler=ON > /ssd/1408675866/mysqld.out 2>&1 &

SQL_out

DROP DATABASE test;CREATE DATABASE test;USE test;
CREATE TABLE t1(
c1 CHAR(1),
key(c1)) ENGINE=innodb ROW_FORMAT=dynamic;
LOCK TABLES FOR BACKUP;
LOCK TABLE t1 READ LOCAL;
UNLOCK TABLES;

Tags: qa

Related branches

Revision history for this message
Ramesh Sivaraman (rameshvs02) wrote :
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Alexey, would you mind taking a look?

Revision history for this message
Alexey Kopytov (akopytov) wrote :

Regular LOCK TABLES should not be allowed under backup locks. There are no users (even potential ones) of this particular case, hence the lowest priority.

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

This halts about 1-2% of all RQG trials. For the moment we filter the bug from the results, but it may mean other backup lock issues are masked.

summary: - /sql/lock.cc:1140: void Global_backup_lock::release(THD*): Assertion
- `m_lock != __null && thd->mdl_context.is_lock_owner(m_namespace, "", "",
- MDL_SHARED)' failed
+ LOCK TABLES FOR BACKUP should be incompatible with LOCK TABLES, FLUSH
+ TABLES ... WITH READ LOCK, FLUSH TABLES ... FOR EXPORT in the same
+ connection
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-2080

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

Other bug subscribers

Bug attachments

Remote bug watches

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