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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 8.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      mysql> SOURCE bug.sql 
      mysql> SOURCE bug.sql # Repeat as necessary, though normally 2nd iteration should crash 

      Leads to;

      2018-10-14T18:52:03.725448Z 0 [System] [MY-010931] [Server] /sda/PS051018-percona-server-8.0.12-1-linux-x86_64-debug/bin/mysqld: ready for connections. Version: '8.0.12-1-debug'  socket: '/sda/PS051018-percona-server-8.0.12-1-linux-x86_64-debug/socket.sock'  port: 13408  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.
      18:53:04 UTC - mysqld got signal 6 ;
      
      Core was generated by `/sda/PS051018-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 0x7f282fb11700 (LWP 29744))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000055b739ea57fd in my_write_core (sig=6) at /git/PS-8.0-trunk_dbg/mysys/stacktrace.cc:278
      #2  0x000055b738bec9d7 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  0x00007f282fb52801 in __GI_abort () at abort.c:79
      #6  0x00007f282fb4239a in __assert_fail_base (fmt=0x7f282fcc97d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
          assertion=assertion@entry=0x55b73aed1ff0 "innodb_trx_id == 0 || innodb_trx_id == trx_id || is_attachable_transaction_active()", 
          file=file@entry=0x55b73aed1f50 "/git/PS-8.0-trunk_dbg/sql/sql_class.h", line=line@entry=1488, 
          function=function@entry=0x55b73aed3a20 <THD::mark_innodb_used(unsigned long long)::__PRETTY_FUNCTION__> "void THD::mark_innodb_used(ulonglong)") at assert.c:92
      #7  0x00007f282fb42412 in __GI___assert_fail (
          assertion=0x55b73aed1ff0 "innodb_trx_id == 0 || innodb_trx_id == trx_id || is_attachable_transaction_active()", 
          file=0x55b73aed1f50 "/git/PS-8.0-trunk_dbg/sql/sql_class.h", line=1488, 
          function=0x55b73aed3a20 <THD::mark_innodb_used(unsigned long long)::__PRETTY_FUNCTION__> "void THD::mark_innodb_used(ulonglong)") at assert.c:101
      #8  0x000055b7389bc59e in THD::mark_innodb_used (this=0x7f27fc424000, trx_id=2431) at /git/PS-8.0-trunk_dbg/sql/sql_class.h:1487
      #9  0x000055b7389b4d4a in thd_report_innodb_stat (thd=0x7f27fc424000, trx_id=2431, type=MYSQL_TRX_STAT_ACCESS_PAGE_ID, 
          value=4292870219) at /git/PS-8.0-trunk_dbg/sql/sql_class.cc:1108
      #10 0x000055b73a3f3f28 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 0x000055b73a3f3eea in trx_stats::inc_page_get (trx=0x7f2818800aa0, page_id_fold=4292870219)
          at /git/PS-8.0-trunk_dbg/storage/innobase/include/trx0trx.h:1369
      #12 0x000055b73a3eacf8 in buf_page_get_gen (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, 
          file=0x55b73b5a18d0 "/git/PS-8.0-trunk_dbg/storage/innobase/row/row0sel.cc", line=4736, mtr=0x7f282fb08cd0, 
          dirty_with_no_latch=false) at /git/PS-8.0-trunk_dbg/storage/innobase/buf/buf0buf.cc:3787
      #13 0x000055b73a3b0650 in btr_cur_search_to_nth_level (index=0x7f27fb75c2b8, level=0, tuple=0x7f27fc5e0568, mode=PAGE_CUR_GE, 
          latch_mode=1, cursor=0x7f27fc5e0338, has_search_latch=0, 
          file=0x55b73b5a18d0 "/git/PS-8.0-trunk_dbg/storage/innobase/row/row0sel.cc", line=4736, mtr=0x7f282fb08cd0)
          at /git/PS-8.0-trunk_dbg/storage/innobase/btr/btr0cur.cc:970
      #14 0x000055b73a2a6705 in btr_pcur_open_with_no_init_func (index=0x7f27fb75c2b8, tuple=0x7f27fc5e0568, mode=PAGE_CUR_GE, 
          latch_mode=1, cursor=0x7f27fc5e0338, has_search_latch=0, 
          file=0x55b73b5a18d0 "/git/PS-8.0-trunk_dbg/storage/innobase/row/row0sel.cc", line=4736, mtr=0x7f282fb08cd0)
          at /git/PS-8.0-trunk_dbg/storage/innobase/include/btr0pcur.ic:442
      #15 0x000055b73a2b2abf in row_search_mvcc (buf=0x7f27a760b028 "\370\377\377\205\001", mode=PAGE_CUR_GE, prebuilt=0x7f27fc5e00b8, 
          match_mode=1, direction=0) at /git/PS-8.0-trunk_dbg/storage/innobase/row/row0sel.cc:4735
      #16 0x000055b73a096518 in ha_innobase::index_read (this=0x7f27a780f028, buf=0x7f27a760b028 "\370\377\377\205\001", 
          key_ptr=0x7f27fc7a7200 "\205\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 0x000055b738d871f6 in handler::index_read_map (this=0x7f27a780f028, buf=0x7f27a760b028 "\370\377\377\205\001", 
          key=0x7f27fc7a7200 "\205\001", keypart_map=18446744073709551615, find_flag=HA_READ_KEY_EXACT)
          at /git/PS-8.0-trunk_dbg/sql/handler.h:4347
      #18 0x000055b738d7fcfa in handler::index_read_idx_map (this=0x7f27a780f028, buf=0x7f27a760b028 "\370\377\377\205\001", index=0, 
          key=0x7f27fc7a7200 "\205\001", keypart_map=18446744073709551615, find_flag=HA_READ_KEY_EXACT)
          at /git/PS-8.0-trunk_dbg/sql/handler.cc:7443
      #19 0x000055b738d7417c in handler::ha_index_read_idx_map (this=0x7f27a780f028, buf=0x7f27a760b028 "\370\377\377\205\001", index=0, 
          key=0x7f27fc7a7200 "\205\001", keypart_map=18446744073709551615, find_flag=HA_READ_KEY_EXACT)
          at /git/PS-8.0-trunk_dbg/sql/handler.cc:3193
      #20 0x000055b739d0c78d in dd::Raw_table::find_record (this=0x7f27a7c3ca00, key=..., r=std::unique_ptr<dd::Raw_record> = {...})
          at /git/PS-8.0-trunk_dbg/sql/dd/impl/raw/raw_table.cc:78
      #21 0x000055b739d0c983 in dd::Raw_table::prepare_record_for_update (this=0x7f27a7c3ca00, key=..., 
          r=std::unique_ptr<dd::Raw_record> = {...}) at /git/PS-8.0-trunk_dbg/sql/dd/impl/raw/raw_table.cc:125
      #22 0x000055b739db3920 in dd::Weak_object_impl::drop (this=0x7f27a7584580, otx=0x7f282fb09590)
          at /git/PS-8.0-trunk_dbg/sql/dd/impl/types/weak_object_impl.cc:192
      #23 0x000055b739cf3d3e in dd::cache::Storage_adapter::drop<dd::Table> (thd=0x7f27fc424000, object=0x7f27a75847f8)
          at /git/PS-8.0-trunk_dbg/sql/dd/impl/cache/storage_adapter.cc:244
      #24 0x000055b739beb871 in dd::cache::Dictionary_client::drop<dd::Table> (this=0x7f27fc44a000, object=0x7f27a75847f8)
          at /git/PS-8.0-trunk_dbg/sql/dd/impl/cache/dictionary_client.cc:2366
      #25 0x000055b739baf055 in dd::drop_table (thd=0x7f27fc424000, schema_name=0x7f27a7ca9678 "test", name=0x7f27a7ca8a20 "t12", 
          table_def=...) at /git/PS-8.0-trunk_dbg/sql/dd/dd_table.cc:2291
      #26 0x000055b738acc2ea in rea_create_base_table (thd=0x7f27fc424000, path=0x7f282fb0ca60 "./test/t12", sch_obj=..., 
          db=0x7f27a7ca9678 "test", table_name=0x7f27a7ca8a20 "t12", create_info=0x7f282fb0dd90, create_fields=..., keys=0, 
          key_info=0x7f27a7b26af8, keys_onoff=Alter_info::ENABLE, fk_keys=0, fk_key_info=0x7f27a7b26af8, file=0x7f27a7b25028, 
          no_ha_table=false, do_not_store_in_dd=false, part_info=0x0, binlog_to_trx_cache=0x7f282fb0cce0, table_def_ptr=0x7f282fb0bae8, 
          post_ddl_ht=0x7f282fb0cce8) at /git/PS-8.0-trunk_dbg/sql/sql_table.cc:1002
      #27 0x000055b738adddbb in create_table_impl (thd=0x7f27fc424000, schema=..., db=0x7f27a7ca9678 "test", 
          table_name=0x7f27a7ca8a20 "t12", error_table_name=0x7f27a7ca8a20 "t12", path=0x7f282fb0ca60 "./test/t12", 
          create_info=0x7f282fb0dd90, alter_info=0x7f282fb0de90, internal_tmp_table=false, select_field_count=0, find_parent_keys=true, 
          no_ha_table=false, do_not_store_in_dd=false, is_trans=0x7f282fb0cce0, key_info=0x7f282fb0bad8, key_count=0x7f282fb0bad0, 
          keys_onoff=Alter_info::ENABLE, fk_key_info=0x7f282fb0bae0, fk_key_count=0x7f282fb0bad4, existing_fk_info=0x0, 
          existing_fk_count=0, existing_fk_table=0x0, fk_max_generated_name_number=0, table_def=0x7f282fb0bae8, 
          post_ddl_ht=0x7f282fb0cce8) at /git/PS-8.0-trunk_dbg/sql/sql_table.cc:7118
      #28 0x000055b738ade43c in mysql_create_table_no_lock (thd=0x7f27fc424000, db=0x7f27a7ca9678 "test", 
          table_name=0x7f27a7ca8a20 "t12", create_info=0x7f282fb0dd90, alter_info=0x7f282fb0de90, select_field_count=0, 
          find_parent_keys=true, is_trans=0x7f282fb0cce0, post_ddl_ht=0x7f282fb0cce8) at /git/PS-8.0-trunk_dbg/sql/sql_table.cc:7200
      #29 0x000055b738ae18c5 in mysql_create_table (thd=0x7f27fc424000, create_table=0x7f27a7ca90f0, create_info=0x7f282fb0dd90, 
          alter_info=0x7f282fb0de90) at /git/PS-8.0-trunk_dbg/sql/sql_table.cc:7942
      #30 0x000055b738fd5a0e in Sql_cmd_create_table::execute (this=0x7f27a7ca9850, thd=0x7f27fc424000)
          at /git/PS-8.0-trunk_dbg/sql/sql_cmd_ddl_table.cc:319
      #31 0x000055b738a30fea in mysql_execute_command (thd=0x7f27fc424000, first_level=true)
          at /git/PS-8.0-trunk_dbg/sql/sql_parse.cc:3371
      #32 0x000055b738a36f2b in mysql_parse (thd=0x7f27fc424000, parser_state=0x7f282fb102a0, update_userstat=false)
          at /git/PS-8.0-trunk_dbg/sql/sql_parse.cc:5139
      #33 0x000055b738a2c0b7 in dispatch_command (thd=0x7f27fc424000, com_data=0x7f282fb10c70, command=COM_QUERY)
          at /git/PS-8.0-trunk_dbg/sql/sql_parse.cc:1654
      #34 0x000055b738a2a8a6 in do_command (thd=0x7f27fc424000) at /git/PS-8.0-trunk_dbg/sql/sql_parse.cc:1262
      #35 0x000055b738bd91fa in handle_connection (arg=0x7f27a60259d0)
          at /git/PS-8.0-trunk_dbg/sql/conn_handler/connection_handler_per_thread.cc:317
      #36 0x000055b739f96f42 in pfs_spawn_thread (arg=0x7f27de8a1420) at /git/PS-8.0-trunk_dbg/storage/perfschema/pfs.cc:2836
      #37 0x00007f283175b6db in start_thread (arg=0x7f282fb11700) at pthread_create.c:463
      #38 0x00007f282fc3388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 

       Does not crash MS 8.0.12 when 'RocksDB'/'TokuDB' engine text is swapped for 'InnoDB'

        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:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 30 minutes
                    30m