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

Assertion `binlog_table_maps == 0 || locked_tables_mode == LTM_LOCK_TABLES' fails upon exceeding max_binlog_cache_size

    XMLWordPrintable

Details

    Description

      Notes:

      • The problem appears to be related to S3, at least I couldn't get rid of it, e.g. just inserting the same amount of data in an InnoDB table hits ER_TRANS_CACHE_FULL, but doesn't cause the assertion failure.
      • Note that you need to have minio or AWS connection to run the test.
      • The test file needs to be placed under mysql-test/suite/s3 to pick up S3 settings.
      • I've made the test case to use a modest 1M cache to avoid too big data, but it is scalable, with bigger amount of data and bigger cache size the same failure occurs.
      • As noted in the test case, on some reason changing max_binlog_cache_size at runtime causes the same failure on 10.6, but 10.11+ require a startup value.
      • No obvious problem on a non-debug build, ER_TRANS_CACHE_FULL occurs as expected.

      --source include/have_s3.inc
      --source include/have_sequence.inc
      --source include/have_innodb.inc
      --source include/have_log_bin.inc
       
      # On some reason the dynamic setting only has the effect in 10.6,
      # but not 10.11+
      --let $restart_parameters= --max-binlog-cache-size=1M
      --source include/restart_mysqld.inc
       
      --source create_database.inc
       
      CREATE TABLE t (f BLOB) ENGINE=Aria;
      INSERT INTO t SELECT REPEAT('x',65535) FROM seq_1_to_200;
      ALTER TABLE t ENGINE=S3;
      --error ER_TRANS_CACHE_FULL
      ALTER TABLE t ENGINE=InnoDB;
       
      --let $restart_parameters=
      --source include/restart_mysqld.inc
       
      --source drop_database.inc
      

      10.11 3d2ae78f843ed1b5ba715439014aa7bbd1eceaa3

      mariadbd: /data/bld/10.11-asan-ubsan/sql/sql_parse.cc:7731: void THD::reset_for_next_command(bool): Assertion `binlog_table_maps == 0 || locked_tables_mode == LTM_LOCK_TABLES' failed.
      260507 21:35:57 [ERROR] /share8t/bld/10.11-asan-ubsan/sql/mariadbd got signal 6 ;
       
      #10 0x00007f4527653eb2 in __GI___assert_fail (assertion=0x556124a08d00 "binlog_table_maps == 0 || locked_tables_mode == LTM_LOCK_TABLES", file=0x556124a02e40 "/data/bld/10.11-asan-ubsan/sql/sql_parse.cc", line=7731, function=0x556124a08c60 "void THD::reset_for_next_command(bool)") at ./assert/assert.c:101
      #11 0x000055612111b6eb in THD::reset_for_next_command (this=this@entry=0x62c0001f0218, do_clear_error=do_clear_error@entry=true) at /data/bld/10.11-asan-ubsan/sql/sql_parse.cc:7731
      #12 0x00005561211680c7 in mysql_parse (thd=thd@entry=0x62c0001f0218, rawbuf=<optimized out>, length=42, parser_state=parser_state@entry=0x77450d24dab0) at /data/bld/10.11-asan-ubsan/sql/sql_parse.cc:8169
      #13 0x000055612117252a in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x62c0001f0218, packet=packet@entry=0x62900010e219 "select regexp_replace(@@tmpdir, '^.*/','')", packet_length=packet_length@entry=42, blocking=blocking@entry=true) at /data/bld/10.11-asan-ubsan/sql/sql_parse.cc:1924
      #14 0x000055612117ebd7 in do_command (thd=thd@entry=0x62c0001f0218, blocking=blocking@entry=true) at /data/bld/10.11-asan-ubsan/sql/sql_parse.cc:1434
      #15 0x00005561219747fe in do_handle_one_connection (connect=<optimized out>, connect@entry=0x608000011838, put_in_cache=put_in_cache@entry=true) at /data/bld/10.11-asan-ubsan/sql/sql_connect.cc:1475
      #16 0x000055612197595b in handle_one_connection (arg=0x608000011838) at /data/bld/10.11-asan-ubsan/sql/sql_connect.cc:1387
      #17 0x00005561232ac2b1 in pfs_spawn_thread (arg=0x617000008c98) at /data/bld/10.11-asan-ubsan/storage/perfschema/pfs.cc:2201
      #18 0x00007f45276a81c4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #19 0x00007f452772885c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attachments

        Activity

          People

            monty Michael Widenius
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.