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

Aria assertion failures upon concurrent OPTIMIZE and CHECK

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4(EOL), 10.5, 10.6, 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL), 11.4
    • 10.5, 10.6, 10.11, 11.4
    • Storage Engine - Aria
    • None

    Description

      Possibly MDEV-20518 and/or MDEV-14865 get fixed along with this one. It's not certain as MDEV-20518 claims to be related to backup stages, and MDEV-14865 has no test case at all but involves an ALTER. At least MDEV-20518 can and should be re-checked after the fix.

      The test case is non-deterministic and for reproducing only, please don't put it into the regression suite!

      --source include/have_sequence.inc
       
      CREATE TABLE t ENGINE=Aria TRANSACTIONAL=1 AS SELECT seq FROM seq_1_to_1000;
       
      --connect(con1,localhost,root,,)
      --let $run= 10000
      while ($run)
      {
        --connection default
        --send
          OPTIMIZE TABLE t;
        --connection con1
        --send
          CHECK TABLE t;
        --connection default
        --reap
        CHECK TABLE t;
        --connection con1
        --reap
        --dec $run
      }
       
      # Cleanup
      DROP TABLE t;
      

      10.4 c9b0c006e0491c9f7a1dae07090db3cdb87da446

      mysqld: /data/bld/10.4-asan/storage/maria/ma_close.c:173: maria_close: Assertion `share->now_transactional == share->base.born_transactional' failed.
      240229 23:05:46 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007f8da1053e32 in __GI___assert_fail (assertion=0x56256f01a3e0 "share->now_transactional == share->base.born_transactional", file=0x56256f019ee0 "/data/bld/10.4-asan/storage/maria/ma_close.c", line=173, function=0x56256f01a540 <__PRETTY_FUNCTION__.0> "maria_close") at ./assert/assert.c:101
      #10 0x000056256d977ba1 in maria_close (info=0x629001f0e208) at /data/bld/10.4-asan/storage/maria/ma_close.c:173
      #11 0x000056256d7f2889 in ha_maria::close (this=0x61d000d2c8a8) at /data/bld/10.4-asan/storage/maria/ha_maria.cc:1242
      #12 0x000056256d255aba in handler::ha_close (this=0x61d000d2c8a8) at /data/bld/10.4-asan/sql/handler.cc:2907
      #13 0x000056256cdc0855 in closefrm (table=0x6200003b4088) at /data/bld/10.4-asan/sql/table.cc:4241
      #14 0x000056256d087bc4 in intern_close_table (table=0x6200003b4088) at /data/bld/10.4-asan/sql/table_cache.cc:221
      #15 0x000056256d087e34 in tc_remove_table (table=0x6200003b4088) at /data/bld/10.4-asan/sql/table_cache.cc:259
      #16 0x000056256d08949a in tc_release_table (table=0x6200003b4088) at /data/bld/10.4-asan/sql/table_cache.cc:471
      #17 0x000056256c8fe17f in close_thread_table (thd=0x62b00005b208, table_ptr=0x62b00005b2f0) at /data/bld/10.4-asan/sql/sql_base.cc:1097
      #18 0x000056256c8fd76f in close_thread_tables (thd=0x62b00005b208) at /data/bld/10.4-asan/sql/sql_base.cc:1037
      #19 0x000056256cec6bd0 in mysql_admin_table (thd=0x62b00005b208, tables=0x62b000062308, check_opt=0x62b000060480, operator_name=0x56256ec63b80 "optimize", lock_type=TL_WRITE, org_open_for_modify=true, repair_table_use_frm=false, extra_open_options=0, prepare_func=0x0, operator_func=(int (handler::*)(handler * const, THD *, HA_CHECK_OPT *)) 0x56256d264398 <handler::ha_optimize(THD*, st_ha_check_opt*)>, view_operator_func=0x0, is_cmd_replicated=true) at /data/bld/10.4-asan/sql/sql_admin.cc:1292
      #20 0x000056256cec87a6 in Sql_cmd_optimize_table::execute (this=0x62b000062a10, thd=0x62b00005b208) at /data/bld/10.4-asan/sql/sql_admin.cc:1485
      #21 0x000056256caaa321 in mysql_execute_command (thd=0x62b00005b208) at /data/bld/10.4-asan/sql/sql_parse.cc:6292
      #22 0x000056256cab5c75 in mysql_parse (thd=0x62b00005b208, rawbuf=0x62b000062228 "OPTIMIZE TABLE t", length=16, parser_state=0x7f8d97f53c60, is_com_multi=false, is_next_command=false) at /data/bld/10.4-asan/sql/sql_parse.cc:8088
      #23 0x000056256ca8b894 in dispatch_command (command=COM_QUERY, thd=0x62b00005b208, packet=0x62900021c209 "", packet_length=16, is_com_multi=false, is_next_command=false) at /data/bld/10.4-asan/sql/sql_parse.cc:1857
      #24 0x000056256ca88403 in do_command (thd=0x62b00005b208) at /data/bld/10.4-asan/sql/sql_parse.cc:1378
      #25 0x000056256ce8f91d in do_handle_one_connection (connect=0x6080000009a8) at /data/bld/10.4-asan/sql/sql_connect.cc:1419
      #26 0x000056256ce8f234 in handle_one_connection (arg=0x6080000009a8) at /data/bld/10.4-asan/sql/sql_connect.cc:1323
      #27 0x000056256daf5776 in pfs_spawn_thread (arg=0x615000003508) at /data/bld/10.4-asan/storage/perfschema/pfs.cc:1869
      #28 0x00007f8da10a8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #29 0x00007f8da112861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      10.5 969669767ba4f4dcfadbcc73d14d0904ad3c6aca

      mariadbd: /data/bld/10.5-asan/storage/maria/ma_close.c:182: maria_close: Assertion `share->now_transactional == share->base.born_transactional || share->internal_table' failed.
      240229 23:14:11 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007fd417c53e32 in __GI___assert_fail (assertion=0x564d7c75d360 "share->now_transactional == share->base.born_transactional || share->internal_table", file=0x564d7c75cea0 "/data/bld/10.5-asan/storage/maria/ma_close.c", line=182, function=0x564d7c75d5e0 <__PRETTY_FUNCTION__.1> "maria_close") at ./assert/assert.c:101
      #10 0x0000564d7ae3edbc in maria_close (info=0x62900111c218) at /data/bld/10.5-asan/storage/maria/ma_close.c:182
      #11 0x0000564d7ae583ed in ha_maria::close (this=0x61d00084eeb8) at /data/bld/10.5-asan/storage/maria/ha_maria.cc:1230
      #12 0x0000564d7a8883b0 in handler::ha_close (this=0x61d00084eeb8) at /data/bld/10.5-asan/sql/handler.cc:3118
      #13 0x0000564d7a3c3465 in closefrm (table=0x619000191e98) at /data/bld/10.5-asan/sql/table.cc:4419
      #14 0x0000564d7a6c6a8c in intern_close_table (table=0x619000191e98) at /data/bld/10.5-asan/sql/table_cache.cc:220
      #15 0x0000564d7a6c6cfc in tc_remove_table (table=0x619000191e98) at /data/bld/10.5-asan/sql/table_cache.cc:258
      #16 0x0000564d7a6c8299 in tc_release_table (table=0x619000191e98) at /data/bld/10.5-asan/sql/table_cache.cc:449
      #17 0x0000564d79eb509e in close_thread_table (thd=0x62b000069218, table_ptr=0x62b000069300) at /data/bld/10.5-asan/sql/sql_base.cc:996
      #18 0x0000564d79eb4682 in close_thread_tables (thd=0x62b000069218) at /data/bld/10.5-asan/sql/sql_base.cc:936
      #19 0x0000564d7a4e17fa in mysql_admin_table (thd=0x62b000069218, tables=0x62b000038318, check_opt=0x62b00006e6f8, operator_name=0x564d7c250b60 "optimize", lock_type=TL_WRITE, org_open_for_modify=true, repair_table_use_frm=false, extra_open_options=0, prepare_func=0x0, operator_func=(int (handler::*)(handler * const, THD *, HA_CHECK_OPT *)) 0x564d7a899d1e <handler::ha_optimize(THD*, st_ha_check_opt*)>, view_operator_func=0x0, is_cmd_replicated=true) at /data/bld/10.5-asan/sql/sql_admin.cc:1320
      #20 0x0000564d7a4e341b in Sql_cmd_optimize_table::execute (this=0x62b000038a30, thd=0x62b000069218) at /data/bld/10.5-asan/sql/sql_admin.cc:1513
      #21 0x0000564d7a06f6a0 in mysql_execute_command (thd=0x62b000069218) at /data/bld/10.5-asan/sql/sql_parse.cc:6159
      #22 0x0000564d7a07ccc5 in mysql_parse (thd=0x62b000069218, rawbuf=0x62b000038238 "OPTIMIZE TABLE t", length=16, parser_state=0x7fd40edcbc10, is_com_multi=false, is_next_command=false) at /data/bld/10.5-asan/sql/sql_parse.cc:8196
      #23 0x0000564d7a051f8c in dispatch_command (command=COM_QUERY, thd=0x62b000069218, packet=0x629000244219 "", packet_length=16, is_com_multi=false, is_next_command=false) at /data/bld/10.5-asan/sql/sql_parse.cc:1891
      #24 0x0000564d7a04e91f in do_command (thd=0x62b000069218) at /data/bld/10.5-asan/sql/sql_parse.cc:1375
      #25 0x0000564d7a4a3888 in do_handle_one_connection (connect=0x608000002b38, put_in_cache=true) at /data/bld/10.5-asan/sql/sql_connect.cc:1415
      #26 0x0000564d7a4a3250 in handle_one_connection (arg=0x608000002ab8) at /data/bld/10.5-asan/sql/sql_connect.cc:1317
      #27 0x0000564d7b0ea4b0 in pfs_spawn_thread (arg=0x615000005598) at /data/bld/10.5-asan/storage/perfschema/pfs.cc:2201
      #28 0x00007fd417ca8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #29 0x00007fd417d2861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attachments

        Issue Links

          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.