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

InnoDB: Failing assertion: table->n_waiting_or_granted_auto_inc_locks > 0

Details

    Description

      Note: there are two examples of the failure in this report. One happened on 10.3 branch just recently. Another one happened long time ago on 10.2.7, I'm keeping it here for the record. If it's in fact a different issue, please feel free to fix only the recent one in the scope of this report and ignore another.

      Update: I got a test case which causes the same assertion failure and stack trace as quoted below for 10.3, but the test case only fails on 10.1. See here in the comments.

      10.3 occurrence

      10.3 63027a5763b2b9550979366f9e7488b2d9328cc0

      2018-06-18 03:23:12 0x7fe1fa9f5700  InnoDB: Assertion failure in file /home/travis/src/storage/innobase/lock/lock0lock.cc line 3717
      InnoDB: Failing assertion: table->n_waiting_or_granted_auto_inc_locks > 0
       
      #5  0x00007fe22538a028 in abort () from /lib/x86_64-linux-gnu/libc.so.6
      #6  0x000055a07b813b95 in ut_dbg_assertion_failed (expr=0x55a07be1e8d0 "table->n_waiting_or_granted_auto_inc_locks > 0", file=0x55a07be1d378 "/home/travis/src/storage/innobase/lock/lock0lock.cc", line=3717) at /home/travis/src/storage/innobase/ut/ut0dbg.cc:61
      #7  0x000055a07b66ff50 in lock_table_remove_low (lock=0x55a07d960c08) at /home/travis/src/storage/innobase/lock/lock0lock.cc:3717
      #8  0x000055a07b670dc9 in lock_table_dequeue (in_lock=0x55a07d960c08) at /home/travis/src/storage/innobase/lock/lock0lock.cc:4030
      #9  0x000055a07b676ec3 in lock_release_autoinc_last_lock (autoinc_locks=0x7fe1cc011658) at /home/travis/src/storage/innobase/lock/lock0lock.cc:5945
      #10 0x000055a07b676fc5 in lock_release_autoinc_locks (trx=0x7fe20f9843b8) at /home/travis/src/storage/innobase/lock/lock0lock.cc:5987
      #11 0x000055a07b67764d in lock_cancel_waiting_and_release (lock=0x55a07d960c08) at /home/travis/src/storage/innobase/lock/lock0lock.cc:6209
      #12 0x000055a07b6812fe in lock_wait_check_and_cancel (slot=0x55a07e21caf8) at /home/travis/src/storage/innobase/lock/lock0wait.cc:508
      #13 0x000055a07b681465 in lock_wait_timeout_thread () at /home/travis/src/storage/innobase/lock/lock0wait.cc:565
      #14 0x00007fe225f41184 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
      #15 0x00007fe22544dffd in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Full threads are attached as threads_full.
      Datadir, coredump, logs etc. are available.


      10.2.7 occurrence

      2016-10-18 01:33:30 0x7fecd4162300  InnoDB: Assertion failure in thread 140655147229952 in file lock0lock.cc line 4277
      InnoDB: Failing assertion: table->n_waiting_or_granted_auto_inc_locks > 0
      InnoDB: We intentionally generate a memory trap.
      

      2016-10-18T01:33:43 [7145] #4  0x00007fecd56ed028 in __GI_abort () at abort.c:89
      # 2016-10-18T01:33:43 [7145] #5  0x00007fecd7b80483 in ut_dbg_assertion_failed (expr=expr@entry=0x7fecd83bb118 "table->n_waiting_or_granted_auto_inc_locks > 0", file=file@entry=0x7fecd83babd0 "/home/elenst/bb-10.2-mdev10813/storage/innobase/lock/lock0lock.cc", line=line@entry=4277) at /home/elenst/bb-10.2-mdev10813/storage/innobase/ut/ut0dbg.cc:67
      # 2016-10-18T01:33:43 [7145] #6  0x00007fecd7f3950a in lock_table_remove_low (lock=0x7fec0406a2b0) at /home/elenst/bb-10.2-mdev10813/storage/innobase/lock/lock0lock.cc:4277
      # 2016-10-18T01:33:43 [7145] #7  0x00007fecd7f3955c in lock_table_dequeue (in_lock=<optimised out>) at /home/elenst/bb-10.2-mdev10813/storage/innobase/lock/lock0lock.cc:4605
      # 2016-10-18T01:33:43 [7145] #8  0x00007fecd7f39660 in lock_release_autoinc_last_lock (autoinc_locks=<optimised out>) at /home/elenst/bb-10.2-mdev10813/storage/innobase/lock/lock0lock.cc:6897
      # 2016-10-18T01:33:43 [7145] #9  lock_release_autoinc_locks (trx=<optimised out>) at /home/elenst/bb-10.2-mdev10813/storage/innobase/lock/lock0lock.cc:6939
      # 2016-10-18T01:33:43 [7145] #10 0x00007fecd7f39a31 in lock_cancel_waiting_and_release (lock=0x7fec0406a2b0) at /home/elenst/bb-10.2-mdev10813/storage/innobase/lock/lock0lock.cc:7161
      # 2016-10-18T01:33:43 [7145] #11 0x00007fecd7f3f8d0 in lock_table_create (c_lock=0x7fec0a4b6ad0, table=<optimised out>, type_mode=260, trx=0x7fecd04049c8) at /home/elenst/bb-10.2-mdev10813/storage/innobase/lock/lock0lock.cc:4108
      # 2016-10-18T01:33:43 [7145] #12 0x00007fecd7f3fc64 in lock_table_enqueue_waiting (c_lock=0x7fec0a4b6ad0, mode=4, table=0x7fec0a4770f0, thr=0x7fec05526938) at /home/elenst/bb-10.2-mdev10813/storage/innobase/lock/lock0lock.cc:4342
      # 2016-10-18T01:33:43 [7145] #13 0x00007fecd7f4003c in lock_table (flags=7196, flags@entry=0, table=0x7fec0a4770f0, mode=172714704, thr=0x7fec05526938) at /home/elenst/bb-10.2-mdev10813/storage/innobase/lock/lock0lock.cc:4514
      # 2016-10-18T01:33:43 [7145] #14 0x00007fecd7fc6df4 in row_lock_table_autoinc_for_mysql (prebuilt=0x7fec05526070) at /home/elenst/bb-10.2-mdev10813/storage/innobase/row/row0mysql.cc:1307
      # 2016-10-18T01:33:43 [7145] #15 0x00007fecd7ef324e in ha_innobase::innobase_lock_autoinc (this=this@entry=0x7fec0548a020) at /home/elenst/bb-10.2-mdev10813/storage/innobase/handler/ha_innodb.cc:8822
      # 2016-10-18T01:33:43 [7145] #16 0x00007fecd7ef3381 in ha_innobase::innobase_set_max_autoinc (this=0x7fec0548a020, auto_inc=46) at /home/elenst/bb-10.2-mdev10813/storage/innobase/handler/ha_innodb.cc:8850
      # 2016-10-18T01:33:43 [7145] #17 0x00007fecd7f017df in ha_innobase::write_row (this=0x7fec0548a020, record=0x7fec0544c438 "\377-") at /home/elenst/bb-10.2-mdev10813/storage/innobase/handler/ha_innodb.cc:9225
      # 2016-10-18T01:33:43 [7145] #18 0x00007fecd7d9c56f in handler::ha_write_row (this=0x7fec0548a020, buf=buf@entry=0x7fec0544c438 "\377-") at /home/elenst/bb-10.2-mdev10813/sql/handler.cc:5923
      # 2016-10-18T01:33:43 [7145] #19 0x00007fecd829685c in ha_partition::write_row (this=0x7fec05510720, buf=0x7fec0544c438 "\377-") at /home/elenst/bb-10.2-mdev10813/sql/ha_partition.cc:4170
      # 2016-10-18T01:33:43 [7145] #20 0x00007fecd7d9c56f in handler::ha_write_row (this=0x7fec05510720, buf=0x7fec0544c438 "\377-") at /home/elenst/bb-10.2-mdev10813/sql/handler.cc:5923
      # 2016-10-18T01:33:43 [7145] #21 0x00007fecd7c085db in write_record (thd=thd@entry=0x7fec05412008, table=table@entry=0x7fec054a7408, info=info@entry=0x7fecd415f580) at /home/elenst/bb-10.2-mdev10813/sql/sql_insert.cc:1860
      # 2016-10-18T01:33:43 [7145] #22 0x00007fecd7c0e28a in mysql_insert (thd=thd@entry=0x7fec05412008, table_list=<optimised out>, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=true) at /home/elenst/bb-10.2-mdev10813/sql/sql_insert.cc:983
      # 2016-10-18T01:33:43 [7145] #23 0x00007fecd7c21e6a in mysql_execute_command (thd=thd@entry=0x7fec05412008) at /home/elenst/bb-10.2-mdev10813/sql/sql_parse.cc:4326
      # 2016-10-18T01:33:43 [7145] #24 0x00007fecd7c29d5f in mysql_parse (thd=0x7fec05412008, rawbuf=<optimised out>, length=<optimised out>, parser_state=0x7fecd4160e30, is_com_multi=<optimised out>, is_next_command=<optimised out>) at /home/elenst/bb-10.2-mdev10813/sql/sql_parse.cc:7796
      # 2016-10-18T01:33:43 [7145] #25 0x00007fecd7c2cb90 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7fec05412008, packet=packet@entry=0x7fec05432009 "INSERT LOW_PRIORITY IGNORE INTO `table1_innodb_key_pk_parts_2_int_autoinc` (`pk`) VALUES (NULL) /* QNO 150 CON_ID 22 */ ", packet_length=packet_length@entry=120, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /home/elenst/bb-10.2-mdev10813/sql/sql_parse.cc:1806
      # 2016-10-18T01:33:43 [7145] #26 0x00007fecd7c2d494 in do_command (thd=0x7fec05412008) at /home/elenst/bb-10.2-mdev10813/sql/sql_parse.cc:1366
      # 2016-10-18T01:33:43 [7145] #27 0x00007fecd7ce133c in do_handle_one_connection (connect=connect@entry=0x7fecd4c2e928) at /home/elenst/bb-10.2-mdev10813/sql/sql_connect.cc:1354
      # 2016-10-18T01:33:43 [7145] #28 0x00007fecd7ce1484 in handle_one_connection (arg=0x7fecd4c2e928) at /home/elenst/bb-10.2-mdev10813/sql/sql_connect.cc:1260
      # 2016-10-18T01:33:43 [7145] #29 0x00007fecd62a0184 in start_thread (arg=0x7fecd4162300) at pthread_create.c:312
      # 2016-10-18T01:33:43 [7145] #30 0x00007fecd57ad37d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7fec0543e020): INSERT LOW_PRIORITY IGNORE INTO `table1_innodb_key_pk_parts_2_int_autoinc` (`pk`) VALUES (NULL) /* QNO 150 CON_ID 22 */
      Connection ID (thread ID): 22
      Status: NOT_KILLED
      

      perl /home/elenst/rqg/runall-new.pl --no-mask --seed=1476754388 --threads=64 --duration=600 --queries=100M --reporters=QueryTimeout,Backtrace,ErrorLog,Deadlock --validators=TransformerNoComparator --transformers=ExecuteAsPreparedTwice --redefine=conf/mariadb/general-workarounds.yy --redefine=conf/mariadb/10.0-features-redefine.yy --mysqld=--log_output=FILE --mysqld=--slow_query_log --mysqld=--log_bin_trust_function_creators=1 --mysqld=--innodb-buffer-pool-size=2G --mysqld=--innodb-log-file-size=256M --mysqld=--innodb-flush-log-at-trx-commit=2 --redefine=conf/mariadb/redefine_random_keys.yy --mysqld=--plugin-load-add=metadata_lock_info --grammar=conf/engines/engine_stress.yy --gendata=conf/engines/engine_stress.zz --engine=InnoDB --mysqld=--transaction-isolation=READ-COMMITTED --mtr-build-thread=300 --basedir1=/home/elenst/bb-10.2-mdev10813/ --vardir1=/home/elenst/logs/mdev10813-2/current1_1
      

      Threads are attached as threads1.

      Attachments

        1. MDEV-11080.tgz
          5 kB
        2. threads_full
          198 kB
        3. threads1
          210 kB

        Issue Links

          Activity

            Some data from the core dump:

            Thread 32 (LWP 23409):
            #0  0x00007fe225f45404 in pthread_cond_wait@@GLIBC_2.3.2 ()
               from /home/mariadb/for_marko/travis_libs/lib/x86_64-linux-gnu/libpthread.so.0
            #1  0x000055a07b6b4679 in os_event::wait (this=0x7fe1c402b250)
                at /home/travis/src/storage/innobase/os/os0event.cc:163
            #2  0x000055a07b6b408b in os_event::wait_low (this=0x7fe1c402b250, 
                reset_sig_count=721)
                at /home/travis/src/storage/innobase/os/os0event.cc:333
            #3  0x000055a07b6b4432 in os_event_wait_low (event=0x7fe1c402b250, 
                reset_sig_count=0) at /home/travis/src/storage/innobase/os/os0event.cc:522
            #4  0x000055a07b680c13 in lock_wait_suspend_thread (thr=0x7fe1cc134fb0)
                at /home/travis/src/storage/innobase/lock/lock0wait.cc:355
            #5  0x000055a07b73d7d3 in row_mysql_handle_errors (new_err=0x7fe20d856874, 
                trx=0x7fe20f9843b8, thr=0x7fe1cc134fb0, savept=0x0)
                at /home/travis/src/storage/innobase/row/row0mysql.cc:733
            #6  0x000055a07b73e99e in row_lock_table_autoinc_for_mysql (
                prebuilt=0x7fe1cc134488)
                at /home/travis/src/storage/innobase/row/row0mysql.cc:1202
            #7  0x000055a07b5eaf4a in ha_innobase::innobase_lock_autoinc (
                this=0x7fe1cc1a0a78)
                at /home/travis/src/storage/innobase/handler/ha_innodb.cc:7964
            #8  0x000055a07b5eafda in ha_innobase::innobase_set_max_autoinc (
                this=0x7fe1cc1a0a78, auto_inc=12)
                at /home/travis/src/storage/innobase/handler/ha_innodb.cc:7992
            #9  0x000055a07b5eb6ad in ha_innobase::write_row (this=0x7fe1cc1a0a78, 
                record=0x7fe1cc1a0630 "\377")
                at /home/travis/src/storage/innobase/handler/ha_innodb.cc:8197
            #10 0x000055a07b3e29e4 in handler::ha_write_row (this=0x7fe1cc1a0a78, 
                buf=0x7fe1cc1a0630 "\377") at /home/travis/src/sql/handler.cc:6195
            #11 0x000055a07bb37715 in ha_partition::write_row (this=0x7fe1cc19b638, 
                buf=0x7fe1cc1a0630 "\377") at /home/travis/src/sql/ha_partition.cc:4310
            #12 0x000055a07b3e29e4 in handler::ha_write_row (this=0x7fe1cc19b638, 
                buf=0x7fe1cc1a0630 "\377") at /home/travis/src/sql/handler.cc:6195
            #13 0x000055a07b0a541f in write_record (thd=0x7fe1cc00b430, 
                table=0x7fe1cc19f9d0, info=0x7fe20d856ec0)
                at /home/travis/src/sql/sql_insert.cc:1694
            #14 0x000055a07b0d22f3 in read_sep_field (thd=0x7fe1cc00b430, info=..., 
                table_list=0x7fe1cc01e320, fields_vars=..., set_fields=..., 
                set_values=..., read_info=..., enclosed=..., skip_lines=0, 
                ignore_check_option_errors=false) at /home/travis/src/sql/sql_load.cc:1157
            #15 0x000055a07b0d08c2 in mysql_load (thd=0x7fe1cc00b430, ex=0x7fe1cc01e258, 
                table_list=0x7fe1cc01e320, fields_vars=..., set_fields=..., 
                set_values=..., handle_duplicates=DUP_REPLACE, ignore=false, 
                read_file_from_client=false) at /home/travis/src/sql/sql_load.cc:665
            #16 0x000055a07b0e53ef in mysql_execute_command (thd=0x7fe1cc00b430)
                at /home/travis/src/sql/sql_parse.cc:5121
            #17 0x000055a07b0ee73a in mysql_parse (thd=0x7fe1cc00b430, 
                rawbuf=0x7fe1cc01e0a8 "LOAD DATA INFILE 'load_table1_key_pk_parts_2_int_autoinc' REPLACE INTO TABLE table1_key_pk_parts_2_int_autoinc /* QNO 15113 CON_ID 19 */", length=136, parser_state=0x7fe20d858600, is_com_multi=false, 
                is_next_command=false) at /home/travis/src/sql/sql_parse.cc:8076
            #18 0x000055a07b0dba4f in dispatch_command (command=COM_QUERY, 
                thd=0x7fe1cc00b430, 
                packet=0x7fe1cc0158e1 " LOAD DATA INFILE 'load_table1_key_pk_parts_2_int_autoinc' REPLACE INTO TABLE table1_key_pk_parts_2_int_autoinc /* QNO 15113 CON_ID 19 */ ", packet_length=138, is_com_multi=false, is_next_command=false)
            

            This wait was interrupted by the timeout thread:

            #6  0x000055a07b813b95 in ut_dbg_assertion_failed (
                expr=0x55a07be1e8d0 "table->n_waiting_or_granted_auto_inc_locks > 0", 
                file=0x55a07be1d378 "/home/travis/src/storage/innobase/lock/lock0lock.cc", 
                line=3717) at /home/travis/src/storage/innobase/ut/ut0dbg.cc:61
            #7  0x000055a07b66ff50 in lock_table_remove_low (lock=0x55a07d960c08)
                at /home/travis/src/storage/innobase/lock/lock0lock.cc:3717
            #8  0x000055a07b670dc9 in lock_table_dequeue (in_lock=0x55a07d960c08)
                at /home/travis/src/storage/innobase/lock/lock0lock.cc:4030
            #9  0x000055a07b676ec3 in lock_release_autoinc_last_lock (
                autoinc_locks=0x7fe1cc011658)
                at /home/travis/src/storage/innobase/lock/lock0lock.cc:5945
            #10 0x000055a07b676fc5 in lock_release_autoinc_locks (trx=0x7fe20f9843b8)
                at /home/travis/src/storage/innobase/lock/lock0lock.cc:5987
            #11 0x000055a07b67764d in lock_cancel_waiting_and_release (lock=0x55a07d960c08)
                at /home/travis/src/storage/innobase/lock/lock0lock.cc:6209
            #12 0x000055a07b6812fe in lock_wait_check_and_cancel (slot=0x55a07e21caf8)
                at /home/travis/src/storage/innobase/lock/lock0wait.cc:508
            #13 0x000055a07b681465 in lock_wait_timeout_thread ()
                at /home/travis/src/storage/innobase/lock/lock0wait.cc:565
            

            The table in question is the first partition:

            (gdb) p *lock->un_member.tab_lock.table  
            $3 = {id = 1862, heap = 0x7fe1cc0d6860, name = {
                m_name = 0x7fe1cc034c70 "test/table1_key_pk_parts_2_int_autoinc#P#p0", 
                static part_suffix = "#P#"}, data_dir_path = 0x0, space = 0x7fe1cc1675e0, 
              space_id = 1845, flags = 33, flags2 = 80, skip_alter_undo = 0, … }
            

            The counter dict_table_t::n_waiting_or_granted_auto_inc_locks is only incremented in lock_table_create() as part of row_lock_table_autoinc_for_mysql() and only decremented in lock_table_remove_low(). The counter is only checked if innodb_autoinc_lock_mode=1.

            lock_table_create() uses two different conditions for auto-increment locks:

            	if ((type_mode & LOCK_MODE_MASK) == LOCK_AUTO_INC) {
            		++table->n_waiting_or_granted_auto_inc_locks;
            	}
             
            	/* For AUTOINC locking we reuse the lock instance only if
            	there is no wait involved else we allocate the waiting lock
            	from the transaction lock heap. */
            	if (type_mode == LOCK_AUTO_INC) {
             
            		lock = table->autoinc_lock;
             
            		table->autoinc_trx = trx;
             
            		ib_vector_push(trx->autoinc_locks, &lock);
            

            Waiting auto-increment lock requests would not be added to trx->autoinc_locks, but they should be added to trx->lock.trx_locks and table->locks. In our case, lock_table_remove_low() is dealing with lock->type_mode == LOCK_TABLE | LOCK_WAIT | LOCK_AUTO_INC:

            		if (!lock_get_wait(lock)
            		    && !ib_vector_is_empty(trx->autoinc_locks)) {
             
            			lock_table_remove_autoinc_lock(lock, trx);
            		}
             
            		ut_a(table->n_waiting_or_granted_auto_inc_locks > 0);
            		table->n_waiting_or_granted_auto_inc_locks--;
            	}
             
            	UT_LIST_REMOVE(trx->lock.trx_locks, lock);
            	ut_list_remove(table->locks, lock, TableLockGetNode());
            

            We did correctly skip the trx->autoinc_locks because this was a waiting request. However, contrary to expectations, the counter had already reached 0, and trx->lock.trx_locks does not contain this lock (only 1 table IX lock and 2 record lock bitmaps for the clustered index root page). Furthermore, in table->locks the only table lock from this transaction is the table IX lock, that is, table->locks->start points to trx->lock.trx_locks.start.

            The issue seems to be that the waiting auto-increment lock request was registered in n_waiting_or_granted_auto_inc_locks but the lock does not exist. It must be some race condition that I am missing. The conflicting auto-increment lock is apparently being held by an active transaction that is waiting for a record lock:

            (gdb) p lock.un_member.tab_lock.table.autoinc_lock.trx.mysql_thd.query_string
            $49 = {string = {
                str = 0x7fe1c4013a78 "UPDATE LOW_PRIORITY `view_table1_key_pk_parts_2_int_autoinc` AS X SET `col_int` = 0 WHERE X.`col_char_12` BETWEEN 140 AND 1146355712 ORDER BY `col_char_12`,`col_char_12_key`,`col_int`,`col_int_key`,`p"..., 
                length = 236}, cs = 0x55a07c6f3720 <my_charset_latin1>}
            

            It is waiting for a record X lock in the clustered index root page:

            p *lock.un_member.tab_lock.table.autoinc_lock.trx.lock.wait_lock
            $50 = {trx = 0x7fe20f983578, trx_locks = {prev = 0x55a07d95b540, next = 0x0}, 
              index = 0x7fe1cc0ef7a8, hash = 0x55a07d95bf60, requested_time = 0, 
              wait_time = 0, un_member = {tab_lock = {table = 0x300000735, locks = {
                    prev = 0x48, next = 0x0}}, rec_lock = {space = 1845, page_no = 3, 
                  n_bits = 72}}, type_mode = 291}
            

            Here:

            Thread 26 (LWP 23403):
            #0  0x00007fe225f45404 in pthread_cond_wait@@GLIBC_2.3.2 ()
               from /home/mariadb/for_marko/travis_libs/lib/x86_64-linux-gnu/libpthread.so.0
            #1  0x000055a07b6b4679 in os_event::wait (this=0x7fe1d8058130)
                at /home/travis/src/storage/innobase/os/os0event.cc:163
            #2  0x000055a07b6b408b in os_event::wait_low (this=0x7fe1d8058130, 
                reset_sig_count=122)
                at /home/travis/src/storage/innobase/os/os0event.cc:333
            #3  0x000055a07b6b4432 in os_event_wait_low (event=0x7fe1d8058130, 
                reset_sig_count=0) at /home/travis/src/storage/innobase/os/os0event.cc:522
            #4  0x000055a07b680c13 in lock_wait_suspend_thread (thr=0x7fe1b42add20)
                at /home/travis/src/storage/innobase/lock/lock0wait.cc:355
            #5  0x000055a07b73d7d3 in row_mysql_handle_errors (new_err=0x7fe20d93376c, 
                trx=0x7fe20f983578, thr=0x7fe1b42add20, savept=0x0)
                at /home/travis/src/storage/innobase/row/row0mysql.cc:733
            #6  0x000055a07b77deec in row_search_mvcc (buf=0x7fe1b43720b0 "\357", 
                mode=PAGE_CUR_G, prebuilt=0x7fe1b42ad588, match_mode=0, direction=0)
                at /home/travis/src/storage/innobase/row/row0sel.cc:5623
            #7  0x000055a07b5ede68 in ha_innobase::index_read (this=0x7fe1b4382128, 
                buf=0x7fe1b43720b0 "\357", key_ptr=0x0, key_len=0, 
                find_flag=HA_READ_AFTER_KEY)
                at /home/travis/src/storage/innobase/handler/ha_innodb.cc:9315
            #8  0x000055a07b5ef11c in ha_innobase::index_first (this=0x7fe1b4382128, 
                buf=0x7fe1b43720b0 "\357")
                at /home/travis/src/storage/innobase/handler/ha_innodb.cc:9732
            #9  0x000055a07b5ef327 in ha_innobase::rnd_next (this=0x7fe1b4382128, 
                buf=0x7fe1b43720b0 "\357")
                at /home/travis/src/storage/innobase/handler/ha_innodb.cc:9825
            #10 0x000055a07b3d93b9 in handler::ha_rnd_next (this=0x7fe1b4382128, 
                buf=0x7fe1b43720b0 "\357") at /home/travis/src/sql/handler.cc:2764
            #11 0x000055a07bb39304 in ha_partition::rnd_next (this=0x7fe1b4285038, 
                buf=0x7fe1b43720b0 "\357") at /home/travis/src/sql/ha_partition.cc:5058
            #12 0x000055a07b3d93b9 in handler::ha_rnd_next (this=0x7fe1b4285038, 
                buf=0x7fe1b43720b0 "\357") at /home/travis/src/sql/handler.cc:2764
            #13 0x000055a07b3cd733 in find_all_keys (thd=0x7fe1c4000d90, 
                param=0x7fe20d934bb0, select=0x7fe1c40195a0, fs_info=0x7fe1c4093a30, 
                buffpek_pointers=0x7fe20d934db0, tempfile=0x7fe20d934c40, 
                pq=0x7fe20d934b60, found_rows=0x7fe1c4093c10)
                at /home/travis/src/sql/filesort.cc:778
            #14 0x000055a07b3cbd57 in filesort (thd=0x7fe1c4000d90, table=0x7fe1b41d13d0, 
                filesort=0x7fe20d9350c0, tracker=0x7fe1c4019a20, join=0x0, 
                first_table_bit=0) at /home/travis/src/sql/filesort.cc:278
            #15 0x000055a07b1d8df2 in mysql_update (thd=0x7fe1c4000d90, 
                table_list=0x7fe1c4013da8, fields=..., values=..., conds=0x7fe1c4014878, 
                order_num=5, order=0x7fe1c4014b18, limit=5, handle_duplicates=DUP_ERROR, 
                ignore=false, found_return=0x7fe20d9356d0, updated_return=0x7fe20d935790)
                at /home/travis/src/sql/sql_update.cc:669
            #16 0x000055a07b0e3461 in mysql_execute_command (thd=0x7fe1c4000d90)
                at /home/travis/src/sql/sql_parse.cc:4575
            #17 0x000055a07b0ee73a in mysql_parse (thd=0x7fe1c4000d90, 
                rawbuf=0x7fe1c4013a78 "UPDATE LOW_PRIORITY `view_table1_key_pk_parts_2_int_autoinc` AS X SET `col_int` = 0 WHERE X.`col_char_12` BETWEEN 140 AND 1146355712 ORDER BY `col_char_12`,`col_char_12_key`,`col_int`,`col_int_key`,`p"..., 
                length=236, parser_state=0x7fe20d936600, is_com_multi=false, 
                is_next_command=false) at /home/travis/src/sql/sql_parse.cc:8076
            

            marko Marko Mäkelä added a comment - Some data from the core dump: Thread 32 (LWP 23409): #0 0x00007fe225f45404 in pthread_cond_wait@@GLIBC_2.3.2 () from /home/mariadb/for_marko/travis_libs/lib/x86_64-linux-gnu/libpthread.so.0 #1 0x000055a07b6b4679 in os_event::wait (this=0x7fe1c402b250) at /home/travis/src/storage/innobase/os/os0event.cc:163 #2 0x000055a07b6b408b in os_event::wait_low (this=0x7fe1c402b250, reset_sig_count=721) at /home/travis/src/storage/innobase/os/os0event.cc:333 #3 0x000055a07b6b4432 in os_event_wait_low (event=0x7fe1c402b250, reset_sig_count=0) at /home/travis/src/storage/innobase/os/os0event.cc:522 #4 0x000055a07b680c13 in lock_wait_suspend_thread (thr=0x7fe1cc134fb0) at /home/travis/src/storage/innobase/lock/lock0wait.cc:355 #5 0x000055a07b73d7d3 in row_mysql_handle_errors (new_err=0x7fe20d856874, trx=0x7fe20f9843b8, thr=0x7fe1cc134fb0, savept=0x0) at /home/travis/src/storage/innobase/row/row0mysql.cc:733 #6 0x000055a07b73e99e in row_lock_table_autoinc_for_mysql ( prebuilt=0x7fe1cc134488) at /home/travis/src/storage/innobase/row/row0mysql.cc:1202 #7 0x000055a07b5eaf4a in ha_innobase::innobase_lock_autoinc ( this=0x7fe1cc1a0a78) at /home/travis/src/storage/innobase/handler/ha_innodb.cc:7964 #8 0x000055a07b5eafda in ha_innobase::innobase_set_max_autoinc ( this=0x7fe1cc1a0a78, auto_inc=12) at /home/travis/src/storage/innobase/handler/ha_innodb.cc:7992 #9 0x000055a07b5eb6ad in ha_innobase::write_row (this=0x7fe1cc1a0a78, record=0x7fe1cc1a0630 "\377") at /home/travis/src/storage/innobase/handler/ha_innodb.cc:8197 #10 0x000055a07b3e29e4 in handler::ha_write_row (this=0x7fe1cc1a0a78, buf=0x7fe1cc1a0630 "\377") at /home/travis/src/sql/handler.cc:6195 #11 0x000055a07bb37715 in ha_partition::write_row (this=0x7fe1cc19b638, buf=0x7fe1cc1a0630 "\377") at /home/travis/src/sql/ha_partition.cc:4310 #12 0x000055a07b3e29e4 in handler::ha_write_row (this=0x7fe1cc19b638, buf=0x7fe1cc1a0630 "\377") at /home/travis/src/sql/handler.cc:6195 #13 0x000055a07b0a541f in write_record (thd=0x7fe1cc00b430, table=0x7fe1cc19f9d0, info=0x7fe20d856ec0) at /home/travis/src/sql/sql_insert.cc:1694 #14 0x000055a07b0d22f3 in read_sep_field (thd=0x7fe1cc00b430, info=..., table_list=0x7fe1cc01e320, fields_vars=..., set_fields=..., set_values=..., read_info=..., enclosed=..., skip_lines=0, ignore_check_option_errors=false) at /home/travis/src/sql/sql_load.cc:1157 #15 0x000055a07b0d08c2 in mysql_load (thd=0x7fe1cc00b430, ex=0x7fe1cc01e258, table_list=0x7fe1cc01e320, fields_vars=..., set_fields=..., set_values=..., handle_duplicates=DUP_REPLACE, ignore=false, read_file_from_client=false) at /home/travis/src/sql/sql_load.cc:665 #16 0x000055a07b0e53ef in mysql_execute_command (thd=0x7fe1cc00b430) at /home/travis/src/sql/sql_parse.cc:5121 #17 0x000055a07b0ee73a in mysql_parse (thd=0x7fe1cc00b430, rawbuf=0x7fe1cc01e0a8 "LOAD DATA INFILE 'load_table1_key_pk_parts_2_int_autoinc' REPLACE INTO TABLE table1_key_pk_parts_2_int_autoinc /* QNO 15113 CON_ID 19 */", length=136, parser_state=0x7fe20d858600, is_com_multi=false, is_next_command=false) at /home/travis/src/sql/sql_parse.cc:8076 #18 0x000055a07b0dba4f in dispatch_command (command=COM_QUERY, thd=0x7fe1cc00b430, packet=0x7fe1cc0158e1 " LOAD DATA INFILE 'load_table1_key_pk_parts_2_int_autoinc' REPLACE INTO TABLE table1_key_pk_parts_2_int_autoinc /* QNO 15113 CON_ID 19 */ ", packet_length=138, is_com_multi=false, is_next_command=false) This wait was interrupted by the timeout thread: #6 0x000055a07b813b95 in ut_dbg_assertion_failed ( expr=0x55a07be1e8d0 "table->n_waiting_or_granted_auto_inc_locks > 0", file=0x55a07be1d378 "/home/travis/src/storage/innobase/lock/lock0lock.cc", line=3717) at /home/travis/src/storage/innobase/ut/ut0dbg.cc:61 #7 0x000055a07b66ff50 in lock_table_remove_low (lock=0x55a07d960c08) at /home/travis/src/storage/innobase/lock/lock0lock.cc:3717 #8 0x000055a07b670dc9 in lock_table_dequeue (in_lock=0x55a07d960c08) at /home/travis/src/storage/innobase/lock/lock0lock.cc:4030 #9 0x000055a07b676ec3 in lock_release_autoinc_last_lock ( autoinc_locks=0x7fe1cc011658) at /home/travis/src/storage/innobase/lock/lock0lock.cc:5945 #10 0x000055a07b676fc5 in lock_release_autoinc_locks (trx=0x7fe20f9843b8) at /home/travis/src/storage/innobase/lock/lock0lock.cc:5987 #11 0x000055a07b67764d in lock_cancel_waiting_and_release (lock=0x55a07d960c08) at /home/travis/src/storage/innobase/lock/lock0lock.cc:6209 #12 0x000055a07b6812fe in lock_wait_check_and_cancel (slot=0x55a07e21caf8) at /home/travis/src/storage/innobase/lock/lock0wait.cc:508 #13 0x000055a07b681465 in lock_wait_timeout_thread () at /home/travis/src/storage/innobase/lock/lock0wait.cc:565 The table in question is the first partition: (gdb) p *lock->un_member.tab_lock.table $3 = {id = 1862, heap = 0x7fe1cc0d6860, name = { m_name = 0x7fe1cc034c70 "test/table1_key_pk_parts_2_int_autoinc#P#p0", static part_suffix = "#P#"}, data_dir_path = 0x0, space = 0x7fe1cc1675e0, space_id = 1845, flags = 33, flags2 = 80, skip_alter_undo = 0, … } The counter dict_table_t::n_waiting_or_granted_auto_inc_locks is only incremented in lock_table_create() as part of row_lock_table_autoinc_for_mysql() and only decremented in lock_table_remove_low() . The counter is only checked if innodb_autoinc_lock_mode=1 . lock_table_create() uses two different conditions for auto-increment locks: if ((type_mode & LOCK_MODE_MASK) == LOCK_AUTO_INC) { ++table->n_waiting_or_granted_auto_inc_locks; }   /* For AUTOINC locking we reuse the lock instance only if there is no wait involved else we allocate the waiting lock from the transaction lock heap. */ if (type_mode == LOCK_AUTO_INC) {   lock = table->autoinc_lock;   table->autoinc_trx = trx;   ib_vector_push(trx->autoinc_locks, &lock); Waiting auto-increment lock requests would not be added to trx->autoinc_locks , but they should be added to trx->lock.trx_locks and table->locks . In our case, lock_table_remove_low() is dealing with lock->type_mode == LOCK_TABLE | LOCK_WAIT | LOCK_AUTO_INC : if (!lock_get_wait(lock) && !ib_vector_is_empty(trx->autoinc_locks)) {   lock_table_remove_autoinc_lock(lock, trx); }   ut_a(table->n_waiting_or_granted_auto_inc_locks > 0); table->n_waiting_or_granted_auto_inc_locks--; }   UT_LIST_REMOVE(trx->lock.trx_locks, lock); ut_list_remove(table->locks, lock, TableLockGetNode()); We did correctly skip the trx->autoinc_locks because this was a waiting request. However, contrary to expectations, the counter had already reached 0, and trx->lock.trx_locks does not contain this lock (only 1 table IX lock and 2 record lock bitmaps for the clustered index root page). Furthermore, in table->locks the only table lock from this transaction is the table IX lock, that is, table->locks->start points to trx->lock.trx_locks.start . The issue seems to be that the waiting auto-increment lock request was registered in n_waiting_or_granted_auto_inc_locks but the lock does not exist. It must be some race condition that I am missing. The conflicting auto-increment lock is apparently being held by an active transaction that is waiting for a record lock: (gdb) p lock.un_member.tab_lock.table.autoinc_lock.trx.mysql_thd.query_string $49 = {string = { str = 0x7fe1c4013a78 "UPDATE LOW_PRIORITY `view_table1_key_pk_parts_2_int_autoinc` AS X SET `col_int` = 0 WHERE X.`col_char_12` BETWEEN 140 AND 1146355712 ORDER BY `col_char_12`,`col_char_12_key`,`col_int`,`col_int_key`,`p"..., length = 236}, cs = 0x55a07c6f3720 <my_charset_latin1>} It is waiting for a record X lock in the clustered index root page: p *lock.un_member.tab_lock.table.autoinc_lock.trx.lock.wait_lock $50 = {trx = 0x7fe20f983578, trx_locks = {prev = 0x55a07d95b540, next = 0x0}, index = 0x7fe1cc0ef7a8, hash = 0x55a07d95bf60, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x300000735, locks = { prev = 0x48, next = 0x0}}, rec_lock = {space = 1845, page_no = 3, n_bits = 72}}, type_mode = 291} Here: Thread 26 (LWP 23403): #0 0x00007fe225f45404 in pthread_cond_wait@@GLIBC_2.3.2 () from /home/mariadb/for_marko/travis_libs/lib/x86_64-linux-gnu/libpthread.so.0 #1 0x000055a07b6b4679 in os_event::wait (this=0x7fe1d8058130) at /home/travis/src/storage/innobase/os/os0event.cc:163 #2 0x000055a07b6b408b in os_event::wait_low (this=0x7fe1d8058130, reset_sig_count=122) at /home/travis/src/storage/innobase/os/os0event.cc:333 #3 0x000055a07b6b4432 in os_event_wait_low (event=0x7fe1d8058130, reset_sig_count=0) at /home/travis/src/storage/innobase/os/os0event.cc:522 #4 0x000055a07b680c13 in lock_wait_suspend_thread (thr=0x7fe1b42add20) at /home/travis/src/storage/innobase/lock/lock0wait.cc:355 #5 0x000055a07b73d7d3 in row_mysql_handle_errors (new_err=0x7fe20d93376c, trx=0x7fe20f983578, thr=0x7fe1b42add20, savept=0x0) at /home/travis/src/storage/innobase/row/row0mysql.cc:733 #6 0x000055a07b77deec in row_search_mvcc (buf=0x7fe1b43720b0 "\357", mode=PAGE_CUR_G, prebuilt=0x7fe1b42ad588, match_mode=0, direction=0) at /home/travis/src/storage/innobase/row/row0sel.cc:5623 #7 0x000055a07b5ede68 in ha_innobase::index_read (this=0x7fe1b4382128, buf=0x7fe1b43720b0 "\357", key_ptr=0x0, key_len=0, find_flag=HA_READ_AFTER_KEY) at /home/travis/src/storage/innobase/handler/ha_innodb.cc:9315 #8 0x000055a07b5ef11c in ha_innobase::index_first (this=0x7fe1b4382128, buf=0x7fe1b43720b0 "\357") at /home/travis/src/storage/innobase/handler/ha_innodb.cc:9732 #9 0x000055a07b5ef327 in ha_innobase::rnd_next (this=0x7fe1b4382128, buf=0x7fe1b43720b0 "\357") at /home/travis/src/storage/innobase/handler/ha_innodb.cc:9825 #10 0x000055a07b3d93b9 in handler::ha_rnd_next (this=0x7fe1b4382128, buf=0x7fe1b43720b0 "\357") at /home/travis/src/sql/handler.cc:2764 #11 0x000055a07bb39304 in ha_partition::rnd_next (this=0x7fe1b4285038, buf=0x7fe1b43720b0 "\357") at /home/travis/src/sql/ha_partition.cc:5058 #12 0x000055a07b3d93b9 in handler::ha_rnd_next (this=0x7fe1b4285038, buf=0x7fe1b43720b0 "\357") at /home/travis/src/sql/handler.cc:2764 #13 0x000055a07b3cd733 in find_all_keys (thd=0x7fe1c4000d90, param=0x7fe20d934bb0, select=0x7fe1c40195a0, fs_info=0x7fe1c4093a30, buffpek_pointers=0x7fe20d934db0, tempfile=0x7fe20d934c40, pq=0x7fe20d934b60, found_rows=0x7fe1c4093c10) at /home/travis/src/sql/filesort.cc:778 #14 0x000055a07b3cbd57 in filesort (thd=0x7fe1c4000d90, table=0x7fe1b41d13d0, filesort=0x7fe20d9350c0, tracker=0x7fe1c4019a20, join=0x0, first_table_bit=0) at /home/travis/src/sql/filesort.cc:278 #15 0x000055a07b1d8df2 in mysql_update (thd=0x7fe1c4000d90, table_list=0x7fe1c4013da8, fields=..., values=..., conds=0x7fe1c4014878, order_num=5, order=0x7fe1c4014b18, limit=5, handle_duplicates=DUP_ERROR, ignore=false, found_return=0x7fe20d9356d0, updated_return=0x7fe20d935790) at /home/travis/src/sql/sql_update.cc:669 #16 0x000055a07b0e3461 in mysql_execute_command (thd=0x7fe1c4000d90) at /home/travis/src/sql/sql_parse.cc:4575 #17 0x000055a07b0ee73a in mysql_parse (thd=0x7fe1c4000d90, rawbuf=0x7fe1c4013a78 "UPDATE LOW_PRIORITY `view_table1_key_pk_parts_2_int_autoinc` AS X SET `col_int` = 0 WHERE X.`col_char_12` BETWEEN 140 AND 1146355712 ORDER BY `col_char_12`,`col_char_12_key`,`col_int`,`col_int_key`,`p"..., length=236, parser_state=0x7fe20d936600, is_com_multi=false, is_next_command=false) at /home/travis/src/sql/sql_parse.cc:8076

            I've got a test case which reliably causes the assertion failure with the stack trace as shown in the description for 10.3, but the test case only fails on 10.1.

            --source include/have_innodb.inc
             
            CREATE TABLE t1 (pk INTEGER AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
            INSERT INTO t1 VALUES (NULL),(NULL);
             
            CREATE TABLE t2 LIKE t1;
            SET AUTOCOMMIT=OFF;
             
            --connect (con1,localhost,root,,test)
             
            SET AUTOCOMMIT=OFF;
            DELETE FROM t2;
             
            --connection default
            --send
              LOCK TABLE t2 READ;
             
            --connection con1
            SET innodb_lock_wait_timeout= 1, lock_wait_timeout= 2;
            --error ER_LOCK_WAIT_TIMEOUT
            INSERT INTO t2 SELECT * FROM t1;
             
            # Cleanup
            --disconnect con1
            --connection default
            --reap
            UNLOCK TABLES;
            DROP TABLE t1, t2;
            

            10.1 4d06b7e1bd

            2018-07-21 00:09:23 7f7f123ff700  InnoDB: Assertion failure in thread 140183743756032 in file lock0lock.cc line 5135
            InnoDB: Failing assertion: table->n_waiting_or_granted_auto_inc_locks > 0
             
            #5  0x00007f7f1f64a3fa in abort () from /lib/x86_64-linux-gnu/libc.so.6
            #6  0x00007f7f18b51b22 in lock_table_remove_low (lock=0x7f7f0982e7a0) at /data/src/10.1/storage/innobase/lock/lock0lock.cc:5135
            #7  0x00007f7f18b52699 in lock_table_dequeue (in_lock=0x7f7f0982e7a0) at /data/src/10.1/storage/innobase/lock/lock0lock.cc:5477
            #8  0x00007f7f18b57b65 in lock_release_autoinc_last_lock (autoinc_locks=0x7f7f098c7198) at /data/src/10.1/storage/innobase/lock/lock0lock.cc:7552
            #9  0x00007f7f18b57c4e in lock_release_autoinc_locks (trx=0x7f7f09838a78) at /data/src/10.1/storage/innobase/lock/lock0lock.cc:7594
            #10 0x00007f7f18b581f6 in lock_cancel_waiting_and_release (lock=0x7f7f0982e7a0) at /data/src/10.1/storage/innobase/lock/lock0lock.cc:7846
            #11 0x00007f7f18b5bb33 in lock_wait_check_and_cancel (slot=0x7f7f17e7e1b0) at /data/src/10.1/storage/innobase/lock/lock0wait.cc:504
            #12 0x00007f7f18b5bc7c in lock_wait_timeout_thread () at /data/src/10.1/storage/innobase/lock/lock0wait.cc:561
            #13 0x00007f7f21345494 in start_thread (arg=0x7f7f123ff700) at pthread_create.c:333
            #14 0x00007f7f1f6fe93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
            

            elenst Elena Stepanova added a comment - I've got a test case which reliably causes the assertion failure with the stack trace as shown in the description for 10.3, but the test case only fails on 10.1 . --source include/have_innodb.inc   CREATE TABLE t1 (pk INTEGER AUTO_INCREMENT PRIMARY KEY ) ENGINE=InnoDB; INSERT INTO t1 VALUES ( NULL ),( NULL );   CREATE TABLE t2 LIKE t1; SET AUTOCOMMIT= OFF ;   --connect (con1,localhost,root,,test)   SET AUTOCOMMIT= OFF ; DELETE FROM t2;   --connection default --send LOCK TABLE t2 READ ;   --connection con1 SET innodb_lock_wait_timeout= 1, lock_wait_timeout= 2; --error ER_LOCK_WAIT_TIMEOUT INSERT INTO t2 SELECT * FROM t1;   # Cleanup --disconnect con1 --connection default --reap UNLOCK TABLES; DROP TABLE t1, t2; 10.1 4d06b7e1bd 2018-07-21 00:09:23 7f7f123ff700 InnoDB: Assertion failure in thread 140183743756032 in file lock0lock.cc line 5135 InnoDB: Failing assertion: table->n_waiting_or_granted_auto_inc_locks > 0   #5 0x00007f7f1f64a3fa in abort () from /lib/x86_64-linux-gnu/libc.so.6 #6 0x00007f7f18b51b22 in lock_table_remove_low (lock=0x7f7f0982e7a0) at /data/src/10.1/storage/innobase/lock/lock0lock.cc:5135 #7 0x00007f7f18b52699 in lock_table_dequeue (in_lock=0x7f7f0982e7a0) at /data/src/10.1/storage/innobase/lock/lock0lock.cc:5477 #8 0x00007f7f18b57b65 in lock_release_autoinc_last_lock (autoinc_locks=0x7f7f098c7198) at /data/src/10.1/storage/innobase/lock/lock0lock.cc:7552 #9 0x00007f7f18b57c4e in lock_release_autoinc_locks (trx=0x7f7f09838a78) at /data/src/10.1/storage/innobase/lock/lock0lock.cc:7594 #10 0x00007f7f18b581f6 in lock_cancel_waiting_and_release (lock=0x7f7f0982e7a0) at /data/src/10.1/storage/innobase/lock/lock0lock.cc:7846 #11 0x00007f7f18b5bb33 in lock_wait_check_and_cancel (slot=0x7f7f17e7e1b0) at /data/src/10.1/storage/innobase/lock/lock0wait.cc:504 #12 0x00007f7f18b5bc7c in lock_wait_timeout_thread () at /data/src/10.1/storage/innobase/lock/lock0wait.cc:561 #13 0x00007f7f21345494 in start_thread (arg=0x7f7f123ff700) at pthread_create.c:333 #14 0x00007f7f1f6fe93f in clone () from /lib/x86_64-linux-gnu/libc.so.6

            Simplified test
            ===========
            YY grammar
            ----------------
            query:
                    INSERT INTO _table SELECT * FROM _table;
             
            _table:
                    table100_innodb_key_pk_parts_2_int_autoinc |
                    table100_innodb_int_autoinc ;
             
            ZZ grammar
            ----------------
            $tables = {
                    rows => [100],
                    partitions => [ undef , 'KEY (pk) PARTITIONS 2' ]
            };
             
            $fields = {
                types => [ 'enum' ],
                indexes => [ undef, 'key' ],
                charsets => [ undef ],
            };
            $tables = {
                    rows => [100],
                    partitions => [ undef , 'KEY (pk) PARTITIONS 2' ]
            };
             
            With some luck I might be able to develop some MTR based replay test but I prefer
            to wait if the current information is already sufficient. 
            

            mleich Matthias Leich added a comment - Simplified test =========== YY grammar ---------------- query: INSERT INTO _table SELECT * FROM _table;   _table: table100_innodb_key_pk_parts_2_int_autoinc | table100_innodb_int_autoinc ;   ZZ grammar ---------------- $tables = { rows => [100], partitions => [ undef , 'KEY (pk) PARTITIONS 2' ] };   $fields = { types => [ 'enum' ], indexes => [ undef, 'key' ], charsets => [ undef ], }; $tables = { rows => [100], partitions => [ undef , 'KEY (pk) PARTITIONS 2' ] };   With some luck I might be able to develop some MTR based replay test but I prefer to wait if the current information is already sufficient.
            marko Marko Mäkelä added a comment - - edited

            elenst, the test that failed for you in 10.1 4d06b7e1bd appears to have been fixed in MDEV-13333 without any test case.
            The failure was introduced by my code clean-up in 10.1.32, 10.2.14, 10.3.6.

            marko Marko Mäkelä added a comment - - edited elenst , the test that failed for you in 10.1 4d06b7e1bd appears to have been fixed in MDEV-13333 without any test case . The failure was introduced by my code clean-up in 10.1.32, 10.2.14, 10.3.6.

            I have uploaded MDEV-11080.tgz which is an archive with the replay test.
             
            How to replay
            -----------------
            git clone https://github.com/mleich1/rqg --branch experimental RQG_MDEV-11080
             
            cd RQG_MDEV-11080
             
            tar xvzf <archive>
             
            BASEDIR inside of  MDEV-11080.sh needs to be adjusted and maybe more.
            Warning:
            The script MDEV-11080.sh is aggressive and kills mysqld's + cleans /dev/shm/vardir.
             
            ./MDEV-11080.sh
             
            A line between the final messages
            STATISTICS: 1 -- 'replay'-- Replay of desired effect (Whitelist match, no Blacklist match)
            means
            == RQG has observed that the server process has disappeared
                 + the RQG log contains in its search region a line with "<signal handler called>".
             
            RQG logs und archives with cores etc. can be found in the workdirectory of the
            last rqg_batch.pl run (storage/<timestamp>).
            rqg_batch.pl generates on every run a symlink 'last_batch_workdir' which points
            to that  workdir.
            
            

            mleich Matthias Leich added a comment - I have uploaded MDEV-11080.tgz which is an archive with the replay test.   How to replay ----------------- git clone https://github.com/mleich1/rqg --branch experimental RQG_MDEV-11080   cd RQG_MDEV-11080   tar xvzf <archive>   BASEDIR inside of MDEV-11080.sh needs to be adjusted and maybe more. Warning: The script MDEV-11080.sh is aggressive and kills mysqld's + cleans /dev/shm/vardir.   ./MDEV-11080.sh   A line between the final messages STATISTICS: 1 -- 'replay'-- Replay of desired effect (Whitelist match, no Blacklist match) means == RQG has observed that the server process has disappeared + the RQG log contains in its search region a line with "<signal handler called>".   RQG logs und archives with cores etc. can be found in the workdirectory of the last rqg_batch.pl run (storage/<timestamp>). rqg_batch.pl generates on every run a symlink 'last_batch_workdir' which points to that workdir.

            Replaying the problem on actual (2018-09-04) 10.1/10.2/10.3 with the RQG test attached was impossible.
             
            Trying on 10.1 with the RQG replay testcase from current report and MTR based replay testcase from MDEV-13333 showed
            - commit a54abf01753a69c2186d60c155212149be59a7a6 (Tue Mar 13 14:00:45 2018 +0200)
              Both replay tests pass without failure
            - the next commit is 723f87e9d318aedad30dfb9dde104312d6612662 (Wed Mar 14 09:39:47 2018 +0200)
              Both tests start to reveal the corresponding problem.
            

            mleich Matthias Leich added a comment - Replaying the problem on actual (2018-09-04) 10.1/10.2/10.3 with the RQG test attached was impossible.   Trying on 10.1 with the RQG replay testcase from current report and MTR based replay testcase from MDEV-13333 showed - commit a54abf01753a69c2186d60c155212149be59a7a6 (Tue Mar 13 14:00:45 2018 +0200) Both replay tests pass without failure - the next commit is 723f87e9d318aedad30dfb9dde104312d6612662 (Wed Mar 14 09:39:47 2018 +0200) Both tests start to reveal the corresponding problem.

            This shares the same cause and fix with MDEV-13333. I pushed the test case only.

            marko Marko Mäkelä added a comment - This shares the same cause and fix with MDEV-13333 . I pushed the test case only.

            People

              marko Marko Mäkelä
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.