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

Assertion failure in online_alter_log_row or server hang upon replicating REPAIR on mysql.gtid_slave_pos

    XMLWordPrintable

Details

    Description

      The test case is non-deterministic. There is no need to run it with --repeat=N, as the loop is already inside; if it doesn't fail for you right away, please try to increase the value of $run.

      --source include/have_innodb.inc
      --source include/master-slave.inc
       
      --connection slave
      stop slave;
      alter table mysql.gtid_slave_pos engine=InnoDB;
      start slave;
       
      --connection master
      --let $run= 1000
      while ($run)
      {
        REPAIR TABLE mysql.gtid_slave_pos;
        --dec $run
      }
       
      --sync_slave_with_master
       
      --connection master
      --source include/rpl_end.inc
      

      On a debug build the replica fails:

      bb-11.5-MDEV-32188-timestamps ee224ef3a

      mariadbd: /data/bld/bb-11.5-MDEV-32188-timestamps-debug/sql/online_alter.cc:163: int online_alter_log_row(TABLE*, const uchar*, const uchar*, bool (*)(THD*, TABLE*, Event_log*, binlog_cache_data*, bool, ulong, const uchar*, const uchar*)): Assertion `!before_record || bitmap_is_set_all(table->read_set)' failed.
      240510 19:35:00 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f839e245472 in __GI_abort () at ./stdlib/abort.c:79
      #8  0x00007f839e245395 in __assert_fail_base (fmt=0x7f839e3b9a90 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x56383c9cb5c8 "!before_record || bitmap_is_set_all(table->read_set)", file=file@entry=0x56383c9cb540 "/data/bld/bb-11.5-MDEV-32188-timestamps-debug/sql/online_alter.cc", line=line@entry=163, function=function@entry=0x56383c9cb600 "int online_alter_log_row(TABLE*, const uchar*, const uchar*, bool (*)(THD*, TABLE*, Event_log*, binlog_cache_data*, bool, ulong, const uchar*, const uchar*))") at ./assert/assert.c:92
      #9  0x00007f839e253e32 in __GI___assert_fail (assertion=0x56383c9cb5c8 "!before_record || bitmap_is_set_all(table->read_set)", file=0x56383c9cb540 "/data/bld/bb-11.5-MDEV-32188-timestamps-debug/sql/online_alter.cc", line=163, function=0x56383c9cb600 "int online_alter_log_row(TABLE*, const uchar*, const uchar*, bool (*)(THD*, TABLE*, Event_log*, binlog_cache_data*, bool, ulong, const uchar*, const uchar*))") at ./assert/assert.c:101
      #10 0x000056383bf3ac3b in online_alter_log_row (table=0x7f837000f988, before_record=0x7f837000fe20 "\377", after_record=0x0, log_func=0x56383bd42bb1 <Delete_rows_log_event::binlog_row_logging_function(THD*, TABLE*, Event_log*, binlog_cache_data*, bool, unsigned long, unsigned char const*, unsigned char const*)>) at /data/bld/bb-11.5-MDEV-32188-timestamps-debug/sql/online_alter.cc:163
      #11 0x000056383bd3ab0c in handler::binlog_log_row (this=0x7f83700102a0, before_record=0x7f837000fe20 "\377", after_record=0x0, log_func=0x56383bd42bb1 <Delete_rows_log_event::binlog_row_logging_function(THD*, TABLE*, Event_log*, binlog_cache_data*, bool, unsigned long, unsigned char const*, unsigned char const*)>) at /data/bld/bb-11.5-MDEV-32188-timestamps-debug/sql/handler.cc:7350
      #12 0x000056383bd3e27a in handler::ha_delete_row (this=0x7f83700102a0, buf=0x7f837000fe20 "\377") at /data/bld/bb-11.5-MDEV-32188-timestamps-debug/sql/handler.cc:8036
      #13 0x000056383bbc0655 in rpl_slave_state::gtid_delete_pending (this=0x56383f95b210, thd=0x7f83700022f8, list_ptr=0x7f839806dc30) at /data/bld/bb-11.5-MDEV-32188-timestamps-debug/sql/rpl_gtid.cc:1018
      #14 0x000056383b7d4a69 in bg_gtid_delete_pending () at /data/bld/bb-11.5-MDEV-32188-timestamps-debug/sql/slave.cc:384
      #15 0x000056383b8faa21 in handle_manager (arg=0x0) at /data/bld/bb-11.5-MDEV-32188-timestamps-debug/sql/sql_manager.cc:113
      #16 0x000056383c04d33c in pfs_spawn_thread (arg=0x56383fa203e8) at /data/bld/bb-11.5-MDEV-32188-timestamps-debug/storage/perfschema/pfs.cc:2201
      #17 0x00007f839e2a8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #18 0x00007f839e32861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      On a non-debug build it hangs instead, all threads' stack trace is attached.

      Also reproducible on bb-11.5-timestamp branch.
      Not reproducible on the baseline.

      Attachments

        Issue Links

          Activity

            People

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