Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-5026

[PS8QA] Assertion `innodb_trx_id == 0 || innodb_trx_id == trx_id || is_attachable_transaction_active()' failed.

    Details

      Description

      CREATE DATABASE test;
      USE test;
      SET @@global.slow_query_log=ON;
      CREATE TABLE t10(c1 INT,c2 char)ENGINE=InnoDB;
      CREATE TABLE t2(c1 INT KEY,c2 char)ENCRYPTION="Y" ENGINE=MEMORY;
      SET SESSION log_slow_verbosity='microtime,innodb';
      CREATE TABLE t12(c1 INT,c2 char)ENCRYPTION="Y" ENGINE=MEMORY;
      CREATE TABLE t1(c1 INT,c2 char)ENGINE=InnoDB;
      CREATE TABLE t5(c1 INT,c2 char)ENGINE=InnoDB;
      DROP TABLE t1,t2,t5,t12,t10;

      Leads to:

      2018-11-16T01:27:20.355760Z 0 [System] [MY-010931] [Server] /sda/PS131118-percona-server-8.0.12-1-linux-x86_64-debug/bin/mysqld: ready for connections. Version: '8.0.12-1-debug'  socket: '/sda/PS131118-percona-server-8.0.12-1-linux-x86_64-debug/socket.sock'  port: 13093  MySQL Community Server (GPL).
      mysqld: /git/PS-8.0-trunk_dbg/sql/sql_class.h:1488: void THD::mark_innodb_used(ulonglong): Assertion `innodb_trx_id == 0 || innodb_trx_id == trx_id || is_attachable_transaction_active()' failed.
      01:27:59 UTC - mysqld got signal 6 ;
      
      Core was generated by `/sda/PS131118-percona-server-8.0.12-1-linux-x86_64-debug/bin/mysqld --no-defaul'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x7f04d8cec700 (LWP 25459))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000055ee8d8fbc17 in my_write_core (sig=6) at /git/PS-8.0-trunk_dbg/mysys/stacktrace.cc:278
      #2  0x000055ee8c86c48e in handle_fatal_signal (sig=6) at /git/PS-8.0-trunk_dbg/sql/signal_handler.cc:254
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x00007f04d8d2d801 in __GI_abort () at abort.c:79
      #6  0x00007f04d8d1d39a in __assert_fail_base (fmt=0x7f04d8ea47d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
          assertion=assertion@entry=0x55ee8e980270 "innodb_trx_id == 0 || innodb_trx_id == trx_id || is_attachable_transaction_active()", 
          file=file@entry=0x55ee8e9801d0 "/git/PS-8.0-trunk_dbg/sql/sql_class.h", line=line@entry=1488, 
          function=function@entry=0x55ee8e981ca0 <THD::mark_innodb_used(unsigned long long)::__PRETTY_FUNCTION__> "void THD::mark_innodb_used(ulonglong)") at assert.c:92
      #7  0x00007f04d8d1d412 in __GI___assert_fail (
          assertion=0x55ee8e980270 "innodb_trx_id == 0 || innodb_trx_id == trx_id || is_attachable_transaction_active()", 
          file=0x55ee8e9801d0 "/git/PS-8.0-trunk_dbg/sql/sql_class.h", line=1488, 
          function=0x55ee8e981ca0 <THD::mark_innodb_used(unsigned long long)::__PRETTY_FUNCTION__> "void THD::mark_innodb_used(ulonglong)")
          at assert.c:101
      #8  0x000055ee8c60b5e2 in THD::mark_innodb_used (this=0x7f04a5424000, trx_id=2081) at /git/PS-8.0-trunk_dbg/sql/sql_class.h:1487
      #9  0x000055ee8c604124 in thd_report_innodb_stat (thd=0x7f04a5424000, trx_id=2081, type=MYSQL_TRX_STAT_ACCESS_PAGE_ID, 
          value=4292870219) at /git/PS-8.0-trunk_dbg/sql/sql_class.cc:1108
      #10 0x000055ee8de4bcc6 in trx_stats::inc_page_get (trx=..., page_id_fold=4292870219)
          at /git/PS-8.0-trunk_dbg/storage/innobase/include/trx0trx.h:1374
      #11 0x000055ee8de4bc88 in trx_stats::inc_page_get (trx=0x7f04c1c00aa0, page_id_fold=4292870219)
          at /git/PS-8.0-trunk_dbg/storage/innobase/include/trx0trx.h:1369
      #12 0x000055ee8de42a96 in buf_page_get_gen (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, 
          file=0x55ee8effc290 "/git/PS-8.0-trunk_dbg/storage/innobase/row/row0sel.cc", line=4736, mtr=0x7f04d8ce5d20, 
          dirty_with_no_latch=false) at /git/PS-8.0-trunk_dbg/storage/innobase/buf/buf0buf.cc:3787
      #13 0x000055ee8de083ee in btr_cur_search_to_nth_level (index=0x7f04a475c2b8, level=0, tuple=0x7f04a556b568, mode=PAGE_CUR_GE, 
          latch_mode=1, cursor=0x7f04a556b338, has_search_latch=0, 
          file=0x55ee8effc290 "/git/PS-8.0-trunk_dbg/storage/innobase/row/row0sel.cc", line=4736, mtr=0x7f04d8ce5d20)
          at /git/PS-8.0-trunk_dbg/storage/innobase/btr/btr0cur.cc:970
      #14 0x000055ee8dcfe5bf in btr_pcur_open_with_no_init_func (index=0x7f04a475c2b8, tuple=0x7f04a556b568, mode=PAGE_CUR_GE, latch_mode=1, 
          cursor=0x7f04a556b338, has_search_latch=0, file=0x55ee8effc290 "/git/PS-8.0-trunk_dbg/storage/innobase/row/row0sel.cc", line=4736, 
          mtr=0x7f04d8ce5d20) at /git/PS-8.0-trunk_dbg/storage/innobase/include/btr0pcur.ic:442
      #15 0x000055ee8dd0a979 in row_search_mvcc (buf=0x7f04a5559028 "\310\377\377g\001", mode=PAGE_CUR_GE, prebuilt=0x7f04a556b0b8, 
          match_mode=1, direction=0) at /git/PS-8.0-trunk_dbg/storage/innobase/row/row0sel.cc:4735
      #16 0x000055ee8daec510 in ha_innobase::index_read (this=0x7f04a5557028, buf=0x7f04a5559028 "\310\377\377g\001", 
          key_ptr=0x7f04a54d0a00 "g\001", key_len=8, find_flag=HA_READ_KEY_EXACT)
          at /git/PS-8.0-trunk_dbg/storage/innobase/handler/ha_innodb.cc:9353
      #17 0x000055ee8c33ab10 in handler::index_read_map (this=0x7f04a5557028, buf=0x7f04a5559028 "\310\377\377g\001", 
          key=0x7f04a54d0a00 "g\001", keypart_map=18446744073709551615, find_flag=HA_READ_KEY_EXACT)
          at /git/PS-8.0-trunk_dbg/sql/handler.h:4343
      #18 0x000055ee8c332714 in handler::index_read_idx_map (this=0x7f04a5557028, buf=0x7f04a5559028 "\310\377\377g\001", index=0, 
          key=0x7f04a54d0a00 "g\001", keypart_map=18446744073709551615, find_flag=HA_READ_KEY_EXACT)
          at /git/PS-8.0-trunk_dbg/sql/handler.cc:7435
      #19 0x000055ee8c326b96 in handler::ha_index_read_idx_map (this=0x7f04a5557028, buf=0x7f04a5559028 "\310\377\377g\001", index=0, 
          key=0x7f04a54d0a00 "g\001", keypart_map=18446744073709551615, find_flag=HA_READ_KEY_EXACT)
          at /git/PS-8.0-trunk_dbg/sql/handler.cc:3185
      #20 0x000055ee8d762b3b in dd::Raw_table::find_record (this=0x7f04a548c400, key=..., r=std::unique_ptr<dd::Raw_record> = {...})
          at /git/PS-8.0-trunk_dbg/sql/dd/impl/raw/raw_table.cc:78
      #21 0x000055ee8d762d31 in dd::Raw_table::prepare_record_for_update (this=0x7f04a548c400, key=..., 
          r=std::unique_ptr<dd::Raw_record> = {...}) at /git/PS-8.0-trunk_dbg/sql/dd/impl/raw/raw_table.cc:125
      #22 0x000055ee8d809cce in dd::Weak_object_impl::drop (this=0x7f04a547bb00, otx=0x7f04d8ce65e0)
          at /git/PS-8.0-trunk_dbg/sql/dd/impl/types/weak_object_impl.cc:192
      #23 0x000055ee8d74a0ec in dd::cache::Storage_adapter::drop<dd::Table> (thd=0x7f04a5424000, object=0x7f04a547bd78)
          at /git/PS-8.0-trunk_dbg/sql/dd/impl/cache/storage_adapter.cc:244
      #24 0x000055ee8d641c1f in dd::cache::Dictionary_client::drop<dd::Table> (this=0x7f04a544a000, object=0x7f04a547bd78)
          at /git/PS-8.0-trunk_dbg/sql/dd/impl/cache/dictionary_client.cc:2366
      #25 0x000055ee8d605403 in dd::drop_table (thd=0x7f04a5424000, schema_name=0x7f04a562c230 "test", name=0x7f04a562ab50 "t12", table_def=
          ...) at /git/PS-8.0-trunk_dbg/sql/dd/dd_table.cc:2291
      #26 0x000055ee8c74bd7d in drop_base_table (thd=0x7f04a5424000, drop_ctx=..., table=0x7f04a562bca8, atomic=false, post_ddl_htons=0x0, 
          fk_invalidator=0x0, safe_to_release_mdl=0x7f04d8ce8f30) at /git/PS-8.0-trunk_dbg/sql/sql_table.cc:2662
      #27 0x000055ee8c74c4cc in mysql_rm_table_no_locks (thd=0x7f04a5424000, tables=0x7f04a562abe0, if_exists=false, drop_temporary=false, 
          drop_database=false, dropped_non_atomic_flag=0x7f04d8ce8f01, post_ddl_htons=0x7f04d8ce8f70, fk_invalidator=0x7f04d8ce8fa0, 
          safe_to_release_mdl=0x7f04d8ce8f30) at /git/PS-8.0-trunk_dbg/sql/sql_table.cc:2815
      #28 0x000055ee8c748e97 in mysql_rm_table (thd=0x7f04a5424000, tables=0x7f04a562abe0, if_exists=false, drop_temporary=false)
          at /git/PS-8.0-trunk_dbg/sql/sql_table.cc:1462
      #29 0x000055ee8c6adb8e in mysql_execute_command (thd=0x7f04a5424000, first_level=true) at /git/PS-8.0-trunk_dbg/sql/sql_parse.cc:3386
      #30 0x000055ee8c6b3a07 in mysql_parse (thd=0x7f04a5424000, parser_state=0x7f04d8ceb2a0, update_userstat=false)
          at /git/PS-8.0-trunk_dbg/sql/sql_parse.cc:5143
      #31 0x000055ee8c6a8b4f in dispatch_command (thd=0x7f04a5424000, com_data=0x7f04d8cebc70, command=COM_QUERY)
          at /git/PS-8.0-trunk_dbg/sql/sql_parse.cc:1654
      #32 0x000055ee8c6a733e in do_command (thd=0x7f04a5424000) at /git/PS-8.0-trunk_dbg/sql/sql_parse.cc:1262
      #33 0x000055ee8c858bf0 in handle_connection (arg=0x7f0487745a30)
          at /git/PS-8.0-trunk_dbg/sql/conn_handler/connection_handler_per_thread.cc:317
      #34 0x000055ee8d9ecf20 in pfs_spawn_thread (arg=0x7f04874bb120) at /git/PS-8.0-trunk_dbg/storage/perfschema/pfs.cc:2836
      #35 0x00007f04da9316db in start_thread (arg=0x7f04d8cec700) at pthread_create.c:463
      #36 0x00007f04d8e0e88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 

      This bug is pursuant to PS-4788 . It produces on 8.0 trunk of 2018-11-13. It does not reproduce on 5.7.23.

      May be connected with PS-4933, or even duplicate it.

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  roel.vandepaar Roel Van de Paar (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 6 hours, 41 minutes
                    6h 41m