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

InnoDB: Assertion failure in file innobase/trx/trx0trx.cc in trx_mark_sql_stat_end when enabling general_log or slow_query_log

    XMLWordPrintable

Details

    Description

      I expect this bug will be 'masked/hidden' by MDEV-22726 soon. However, this particular bug/issue may (and 'likely') stands separate from that bug: please have a look if there is a separate unhandled or incorrectly handled situation here, which may appear in other scenario setups also.

      USE test;
      SET SQL_MODE='';
      SET SESSION enforce_storage_engine=InnoDB;
      CREATE TABLE t(f0 INT) ENGINE=InnoDB;
      ALTER TABLE mysql.general_log ENGINE=MyISAM;
      XA START '0';
      INSERT INTO t VALUES (0);
      XA END '0';
      XA PREPARE '0';
      SET GLOBAL general_log=ON;
      

      Leads to:

      10.5.5 e1013725ce0f3f947e728491eef75d9985e8db2f

      2020-06-30 12:22:42 0 [Note] /test/MD250620-mariadb-10.5.5-linux-x86_64-dbg/bin/mysqld: ready for connections.
      Version: '10.5.5-MariaDB-debug'  socket: '/test/MD250620-mariadb-10.5.5-linux-x86_64-dbg/socket.sock'  port: 17468  MariaDB Server
      2020-06-30 12:22:57 0x1506ff42a700  InnoDB: Assertion failure in file /test/10.5_dbg/storage/innobase/trx/trx0trx.cc line 1767
      InnoDB: We intentionally generate a memory trap.
      

      10.5.5 e1013725ce0f3f947e728491eef75d9985e8db2f

      Core was generated by `/test/MD250620-mariadb-10.5.5-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x14ce47c37700 (LWP 2542546))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x00005593675577d0 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
      #2  0x0000559366d1047a in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x000014ce45ecd801 in __GI_abort () at abort.c:79
      #6  0x000055936732844c in ut_dbg_assertion_failed (expr=expr@entry=0x0, file=file@entry=0x5593679d4cb8 "/test/10.5_dbg/storage/innobase/trx/trx0trx.cc", line=line@entry=1767) at /test/10.5_dbg/storage/innobase/ut/ut0dbg.cc:60
      #7  0x0000559367312b5a in trx_mark_sql_stat_end (trx=trx@entry=0x14ce32802390) at /test/10.5_dbg/storage/innobase/trx/trx0trx.cc:1767
      #8  0x00005593670cc786 in innobase_commit (hton=<optimized out>, thd=0x14ce23815088, commit_trx=<optimized out>) at /test/10.5_dbg/storage/innobase/handler/ha_innodb.cc:4397
      #9  0x0000559366d1263b in commit_one_phase_2 (thd=thd@entry=0x14ce23815088, all=all@entry=false, trans=trans@entry=0x14ce23818688, is_real_trans=is_real_trans@entry=false) at /test/10.5_dbg/sql/handler.cc:1914
      #10 0x0000559366d15888 in ha_commit_one_phase (thd=thd@entry=0x14ce23815088, all=all@entry=false) at /test/10.5_dbg/sql/handler.cc:1894
      #11 0x0000559366d29adf in ha_commit_trans (thd=thd@entry=0x14ce23815088, all=all@entry=false) at /test/10.5_dbg/sql/handler.cc:1694
      #12 0x0000559366bce989 in trans_commit_stmt (thd=thd@entry=0x14ce23815088) at /test/10.5_dbg/sql/transaction.cc:472
      #13 0x0000559366a6b6dc in mysql_execute_command (thd=thd@entry=0x14ce23815088) at /test/10.5_dbg/sql/sql_parse.cc:6013
      #14 0x0000559366a72638 in mysql_parse (thd=thd@entry=0x14ce23815088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14ce47c36350, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7995
      #15 0x0000559366a5f110 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14ce23815088, packet=packet@entry=0x14ce23867089 "SET GLOBAL general_log=ON", packet_length=packet_length@entry=25, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1874
      #16 0x0000559366a5d8ea in do_command (thd=0x14ce23815088) at /test/10.5_dbg/sql/sql_parse.cc:1355
      #17 0x0000559366bb915f in do_handle_one_connection (connect=<optimized out>, connect@entry=0x14ce26cd2808, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411
      #18 0x0000559366bb987b in handle_one_connection (arg=arg@entry=0x14ce26cd2808) at /test/10.5_dbg/sql/sql_connect.cc:1313
      #19 0x000055936701c11c in pfs_spawn_thread (arg=0x14ce44846508) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #20 0x000014ce46bb06db in start_thread (arg=0x14ce47c37700) at pthread_create.c:463
      #21 0x000014ce45fae88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.1.46 (dbg), 10.1.46 (opt), 10.2.33 (dbg), 10.2.33 (opt), 10.3.24 (dbg), 10.3.24 (opt), 10.4.14 (dbg), 10.4.14 (opt), 10.5.5 (dbg), 10.5.5 (opt)

      Bug confirmed not present in:
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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