Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3840

Error: a record lock wait happens in a dictionary operation, index `CLUST_IND` of table `SYS_STATS`

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.5.28
    • Fix Version/s: 5.5
    • Component/s: None
    • Labels:

      Description

      Also reproducible on percona-server/5.5 and filed as https://bugs.launchpad.net/percona-server/+bug/1075800.

      InnoDB: Error: a record lock wait happens in a dictionary operation!
      InnoDB: index `CLUST_IND` of table `SYS_STATS`.
      InnoDB: Submit a detailed bug report to http://bugs.mysql.com
      InnoDB: Assertion failure in thread 140050032473872 in file lock0lock.c line 1803
      InnoDB: Failing assertion: 0
      
      #5  0x00007f5ffbc0bee6 in abort () from /lib64/libc.so.6
      #6  0x0000000000c8e68e in lock_rec_enqueue_waiting (type_mode=3, block=0x7f5fe3feb9f0, heap_no=21,
          index=0x7f5fed4f9808, thr=0x7f5fd80a9d38)
          at maria-5.5/storage/xtradb/lock/lock0lock.c:1803
      #7  0x0000000000c8efa5 in lock_rec_lock_slow (impl=0, mode=3, block=0x7f5fe3feb9f0, heap_no=21,
          index=0x7f5fed4f9808, thr=0x7f5fd80a9d38)
          at maria-5.5/storage/xtradb/lock/lock0lock.c:2081
      #8  0x0000000000c8f241 in lock_rec_lock (impl=0, mode=3, block=0x7f5fe3feb9f0, heap_no=21,
          index=0x7f5fed4f9808, thr=0x7f5fd80a9d38)
          at maria-5.5/storage/xtradb/lock/lock0lock.c:2138
      #9  0x0000000000c963bd in lock_clust_rec_read_check_and_lock (flags=0, block=0x7f5fe3feb9f0,
          rec=0x7f5febdcc478 "", index=0x7f5fed4f9808, offsets=0x7f5ff06f6c10, mode=LOCK_X, gap_mode=0,
          thr=0x7f5fd80a9d38) at maria-5.5/storage/xtradb/lock/lock0lock.c:5582
      #10 0x0000000000b7612a in sel_set_rec_lock (block=0x7f5fe3feb9f0, rec=0x7f5febdcc478 "",
          index=0x7f5fed4f9808, offsets=0x7f5ff06f6c10, mode=3, type=0, thr=0x7f5fd80a9d38)
          at maria-5.5/storage/xtradb/row/row0sel.c:1006
      #11 0x0000000000b76fda in row_sel (node=0x7f5fd80a7390, thr=0x7f5fd80a9d38)
          at maria-5.5/storage/xtradb/row/row0sel.c:1583
      #12 0x0000000000b77cfd in row_sel_step (thr=0x7f5fd80a9d38)
          at maria-5.5/storage/xtradb/row/row0sel.c:2103
      #13 0x0000000000cdeec0 in que_thr_step (thr=0x7f5fd80a9d38)
          at maria-5.5/storage/xtradb/que/que0que.c:1234
      #14 0x0000000000cdf20b in que_run_threads_low (thr=0x7f5fd80a9d38)
          at maria-5.5/storage/xtradb/que/que0que.c:1319
      #15 0x0000000000cdf32b in que_run_threads (thr=0x7f5fd80a9d38)
          at maria-5.5/storage/xtradb/que/que0que.c:1356
      #16 0x0000000000cdf581 in que_eval_sql (info=0x7f5fd8059528,
          sql=0xeb7230 "PROCEDURE DROP_TABLE_PROC () IS\nsys_foreign_id CHAR;\ntable_id CHAR;\nindex_id CHAR;\nforeign_id CHAR;\nfound INT;\nDECLARE CURSOR cur_fk IS\nSELECT ID FROM SYS_FOREIGN\nWHERE FOR_NAME = :table_name\nAND TO_B"..., reserve_dict_mutex=0, trx=0x7f5fd80600f8)
          at maria-5.5/storage/xtradb/que/que0que.c:1445
      #17 0x0000000000b68fc4 in row_drop_table_for_mysql (name=0x7f5ff06f76f0 "tmp/#sql4373_6_474",
          trx=0x7f5fd80600f8, drop_db=0) at maria-5.5/storage/xtradb/row/row0mysql.c:3434
      #18 0x0000000000b3c951 in ha_innobase::delete_table (this=0x7f5fd809e5e8,
          name=0x7f5fd8098e18 "maria-5.5/mysql-test/var/tmp/#sql4373_6_474")
          at maria-5.5/storage/xtradb/handler/ha_innodb.cc:8414
      #19 0x00000000007e2eca in handler::ha_delete_table (this=0x7f5fd809e5e8,
          name=0x7f5fd8098e18 "maria-5.5/mysql-test/var/tmp/#sql4373_6_474")
          at maria-5.5/sql/handler.cc:3648
      #20 0x00000000005d6bfc in rm_temporary_table (base=0x7f5fec00d490,
          path=0x7f5fd8098e18 "maria-5.5/mysql-test/var/tmp/#sql4373_6_474")
          at maria-5.5/sql/sql_base.cc:6061
      #21 0x00000000005cfd3c in close_temporary (table=0x7f5fd8098110, free_share=true, delete_table=true)
          at maria-5.5/sql/sql_base.cc:2279
      #22 0x00000000005cfc2e in close_temporary_table (thd=0x7f5fed3816d0, table=0x7f5fd8098110,
          free_share=true, delete_table=true) at maria-5.5/sql/sql_base.cc:2249
      #23 0x00000000006cc9a4 in mysql_alter_table (thd=0x7f5fed3816d0, new_db=0x1f5d950 "test",
          new_name=0x1f5d350 "t1", create_info=0x7f5ff06f9d50, table_list=0x1f5d388,
          alter_info=0x7f5ff06f9e50, order_num=0, order=0x0, ignore=false, require_online=false)
          at maria-5.5/sql/sql_table.cc:6938
      #24 0x000000000094e6b3 in Alter_table_statement::execute (this=0x1f5daf8, thd=0x7f5fed3816d0)
          at maria-5.5/sql/sql_alter.cc:106
      #25 0x00000000006340d1 in mysql_execute_command (thd=0x7f5fed3816d0)
          at maria-5.5/sql/sql_parse.cc:4453
      #26 0x00000000006371d1 in mysql_parse (thd=0x7f5fed3816d0,
          rawbuf=0x1f5d278 "ALTER TABLE t1 CHANGE COLUMN f1 f1 INT DEFAULT 2", length=48,
          parser_state=0x7f5ff06fa650) at maria-5.5/sql/sql_parse.cc:5730
      #27 0x000000000062affd in dispatch_command (command=COM_QUERY, thd=0x7f5fed3816d0,
          packet=0x7f5fed386ba1 "ALTER TABLE t1 CHANGE COLUMN f1 f1 INT DEFAULT 2", packet_length=48)
          at maria-5.5/sql/sql_parse.cc:1055
      #28 0x000000000062a2d0 in do_command (thd=0x7f5fed3816d0) at maria-5.5/sql/sql_parse.cc:794
      #29 0x00000000007284c1 in do_handle_one_connection (thd_arg=0x7f5fed3816d0)
          at maria-5.5/sql/sql_connect.cc:1253
      #30 0x0000000000727f84 in handle_one_connection (arg=0x7f5fed3816d0)
          at maria-5.5/sql/sql_connect.cc:1168
      #31 0x00007f5ffcf13a4f in start_thread () from /lib64/libpthread.so.0
      #32 0x00007f5ffbca882d in clone () from /lib64/libc.so.6
      
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x1f5d278): ALTER TABLE t1 CHANGE COLUMN f1 f1 INT DEFAULT 2
      Connection ID (thread ID): 6
      Status: NOT_KILLED
      

      A non-debug version does not crash, but throws numerous error messages in the log:

      InnoDB: Error: a record lock wait happens in a dictionary operation!
      InnoDB: index `CLUST_IND` of table `SYS_STATS`.
      InnoDB: Submit a detailed bug report to http://bugs.mysql.com
      InnoDB: Error: dict X latch held in srv_suspend_mysql_thread
      

      bzr version-info
      maria/5.5

      revision-id: wlad@montyprogram.com-20121104212004-mpir1xoc4hzj3i19
      date: 2012-11-04 22:20:04 +0100
      revno: 3571
      

      RQG grammar:

      thread2_init:
        CREATE TABLE t1 (i INT) ENGINE=InnoDB ; CREATE TEMPORARY TABLE t1 (i INT, KEY(i)) SELECT 1 AS i;  ALTER TABLE t1 ADD COLUMN f1 INT DEFAULT 1 ;
      
      thread1:
        OPTIMIZE TABLE t1 | ANALYZE TABLE t1 ;
      
      query:
        ALTER TABLE t1 CHANGE COLUMN f1 f1 INT DEFAULT 2 ;
      
      

      RQG command line:

      perl runall.pl --threads=6 --duration=600 --queries=100M  --mysqld=--innodb-use-sys-stats-table=1 --grammar=test.yy --skip-gendata --basedir1=<basedir>
      

        Gliffy Diagrams

          Attachments

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                Unassigned
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: