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

Assertion `open_tables == __null' failed in translog_flush_buffers *and* Assertion `log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)' failed.

    XMLWordPrintable

    Details

      Description

      SET @save_aria_checkpoint_log_activity=@@ARIA_CHECKPOINT_LOG_ACTIVITY;
      SET @save_aria_group_commmit=@@ARIA_GROUP_COMMIT;
      SET @save_aria_checkpoint_interval=@@ARIA_CHECKPOINT_INTERVAL;
      SET @save_aria_group_commit_interval=@@ARIA_GROUP_COMMIT_INTERVAL;
       
      SET GLOBAL ARIA_CHECKPOINT_LOG_ACTIVITY=1;
      SET GLOBAL ARIA_GROUP_COMMIT=HARD;
      SET GLOBAL ARIA_CHECKPOINT_INTERVAL=1;
      # Wait 4 seconds for other commits to join in group commit
      SET GLOBAL ARIA_GROUP_COMMIT_INTERVAL=400000000;
      CREATE TABLE t1 (a int) engine=aria transactional=1;
      INSERT INTO t1 values(1);
      DROP TABLE t1;
       
      SET GLOBAL ARIA_CHECKPOINT_LOG_ACTIVITY=@save_aria_checkpoint_log_activity;
      SET GLOBAL ARIA_GROUP_COMMIT=@save_aria_group_commmit;
      SET GLOBAL ARIA_CHECKPOINT_INTERVAL=@save_aria_checkpoint_interval;
      SET GLOBAL ARIA_GROUP_COMMIT_INTERVAL=@save_aria_group_commit_interval;
      

      Leads to:

      6  0x00007f1b0ba6db1a in __assert_fail_base (fmt=0x7f1b0bbc0f58 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x187f7e0 "log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)", file=file@entry=0x1879ec8 "/my/maria-10.3/storage/maria/ma_loghandler.c", line=line@entry=8006, function=function@entry=0x1881170 <__PRETTY_FUNCTION__.17860> "translog_flush_buffers") at assert.c:92
      #7  0x00007f1b0ba6db92 in __GI___assert_fail (assertion=0x187f7e0 "log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)", file=0x1879ec8 "/my/maria-10.3/storage/maria/ma_loghandler.c", line=8006, function=0x1881170 <__PRETTY_FUNCTION__.17860> "translog_flush_buffers") at assert.c:101
      #8  0x0000000001247097 in translog_flush_buffers (lsn=0x7f1b05c7f308, sent_to_disk=0x7f1b05c7f338, flush_horizon=0x7f1b05c7f330) at /my/maria-10.3/storage/maria/ma_loghandler.c:8005
      #9  0x0000000001247862 in translog_flush (lsn=4294976120) at /my/maria-10.3/storage/maria/ma_loghandler.c:8174
      #10 0x000000000126329b in ma_commit (trn=0x7f1af40af6f0) at /my/maria-10.3/storage/maria/ma_commit.c:66
      #11 0x00000000012293e4 in ha_maria::implicit_commit (thd=0x7f1af4000d40, new_trn=false) at /my/maria-10.3/storage/maria/ha_maria.cc:2857
      #12 0x00000000007b4ae6 in mysql_execute_command (thd=0x7f1af4000d40) at /my/maria-10.3/sql/sql_parse.cc:6103
      #13 0x00000000007b9938 in mysql_parse (thd=0x7f1af4000d40, rawbuf=0x7f1af4012a68 "INSERT INTO t1 values(1)", length=24, parser_state=0x7f1b05c80570, is_com_multi=false, is_next_command=false) at /my/maria-10.3/sql/sql_parse.cc:7811
      #14 0x00000000007a68ad in dispatch_command (command=COM_QUERY, thd=0x7f1af4000d40, packet=0x7f1af4008ec1 "INSERT INTO t1 values(1)", packet_length=24, is_com_multi=false, is_next_command=false) at /my/maria-10.3/sql/sql_parse.cc:1851
      #15 0x00000000007a51ea in do_command (thd=0x7f1af4000d40) at /my/maria-10.3/sql/
      

      The bug is probably present in all MariaDB versions. In some version, like 10.3, it happens randomly. In 10.4 it's repeatable.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:

                  Git Integration