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

Assertion `marked_for_read()' fails on slave upon RBR with unique blobs and binlog_row_image=MINIMAL #3

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.4, 11.8, 12.3
    • 11.4, 11.8, 12.3
    • Replication
    • None

    Description

      Note: The patch for MDEV-38734 is already in the branch.

      --source include/have_binlog_format_row.inc
      --source include/master-slave.inc
       
      --connection slave
      SET @binlog_row_image.save = @@global.binlog_row_image;
      STOP SLAVE;
      SET GLOBAL binlog_row_image = MINIMAL;
      START SLAVE;
       
      --connection master
       
      SET binlog_row_image = MINIMAL;
      CREATE TABLE t (id INT PRIMARY KEY, a CHAR(16), b TEXT, UNIQUE KEY (a,b));
      INSERT INTO t VALUES (1,'foo','bar');
      UPDATE IGNORE t SET a = 'qux';
       
      --sync_slave_with_master
      SET GLOBAL binlog_row_image = @binlog_row_image.save;
       
      --connection master
      DROP TABLE t;
      --source include/rpl_end.inc
      

      11.4 85ec122c15b76ded6c384e06b6d6116e51d3de8f

      mariadbd: /data/bld/11.4-asan-ubsan/sql/field.cc:8903: virtual void Field_blob::hash_not_null(Hasher*): Assertion `marked_for_read()' failed.
      260615 19:48:15 [ERROR] /share8t/bld/11.4-asan-ubsan/sql/mariadbd got signal 6 ;
       
      #9  0x00007f8aa5e45395 in __assert_fail_base (fmt=0x7f8aa5fb9a90 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55a5d12ae0e0 "marked_for_read()", file=file@entry=0x55a5d12a68e0 "/data/bld/11.4-asan-ubsan/sql/field.cc", line=line@entry=8903, function=function@entry=0x55a5d12b19e0 "virtual void Field_blob::hash_not_null(Hasher*)") at ./assert/assert.c:92
      #10 0x00007f8aa5e53eb2 in __GI___assert_fail (assertion=0x55a5d12ae0e0 "marked_for_read()", file=0x55a5d12a68e0 "/data/bld/11.4-asan-ubsan/sql/field.cc", line=8903, function=0x55a5d12b19e0 "virtual void Field_blob::hash_not_null(Hasher*)") at ./assert/assert.c:101
      #11 0x000055a5ce7a9e7f in Field_blob::hash_not_null (this=0x6250003234c8, hasher=0x778a91e86000) at /data/bld/11.4-asan-ubsan/sql/field.cc:8903
      #12 0x000055a5cd079e23 in Item_field::hash_not_null (this=<optimized out>, hasher=0x778a91e86000) at /data/bld/11.4-asan-ubsan/sql/item.h:3850
      #13 0x000055a5cec256c6 in Item_func_hash::val_int (this=0x625000323bf8) at /data/bld/11.4-asan-ubsan/sql/item_func.cc:1798
      #14 0x000055a5ce9cdb2f in Item::save_int_in_field (this=this@entry=0x625000323bf8, field=field@entry=0x6250003235f0, no_conversions=no_conversions@entry=false) at /data/bld/11.4-asan-ubsan/sql/item.cc:7207
      #15 0x000055a5ce1980ae in Type_handler_int_result::Item_save_in_field (this=<optimized out>, item=0x625000323bf8, field=0x6250003235f0, no_conversions=<optimized out>) at /data/bld/11.4-asan-ubsan/sql/sql_type.cc:4445
      #16 0x000055a5ce955efc in Item::save_in_field (this=0x625000323bf8, field=0x6250003235f0, no_conversions=<optimized out>) at /data/bld/11.4-asan-ubsan/sql/item.cc:7227
      #17 0x000055a5cdbd0319 in TABLE::update_virtual_fields (this=this@entry=0x6190000f0f98, h=h@entry=0x625000322948, update_mode=update_mode@entry=VCOL_UPDATE_FOR_READ) at /data/bld/11.4-asan-ubsan/sql/table.cc:9302
      #18 0x000055a5ce8b114d in handler::ha_index_read_map (this=this@entry=0x625000322948, buf=<optimized out>, key=<optimized out>, keypart_map=keypart_map@entry=3, find_flag=find_flag@entry=HA_READ_KEY_EXACT) at /data/bld/11.4-asan-ubsan/sql/handler.cc:3873
      #19 0x000055a5cf24caee in Rows_log_event::find_row (this=this@entry=0x6130000bee18, rgi=rgi@entry=0x61d000320080) at /data/bld/11.4-asan-ubsan/sql/log_event_server.cc:7535
      #20 0x000055a5cf24f6e5 in Update_rows_log_event::do_exec_row (this=0x6130000bee18, rgi=0x61d000320080) at /data/bld/11.4-asan-ubsan/sql/log_event_server.cc:7875
      #21 0x000055a5cf236c75 in Rows_log_event::do_apply_event (this=<optimized out>, rgi=0x61d000320080) at /data/bld/11.4-asan-ubsan/sql/log_event_server.cc:5178
      #22 0x000055a5cf1c7267 in Log_event::apply_event (this=this@entry=0x6130000bee18, rgi=rgi@entry=0x61d000320080) at /data/bld/11.4-asan-ubsan/sql/log_event.cc:3953
      #23 0x000055a5ccf9f710 in apply_event_and_update_pos_apply (ev=ev@entry=0x6130000bee18, thd=thd@entry=0x62c000260218, rgi=rgi@entry=0x61d000320080, reason=reason@entry=0) at /data/bld/11.4-asan-ubsan/sql/slave.cc:4136
      #24 0x000055a5ccfc7ae8 in apply_event_and_update_pos (ev=ev@entry=0x6130000bee18, thd=thd@entry=0x62c000260218, rgi=rgi@entry=0x61d000320080) at /data/bld/11.4-asan-ubsan/sql/slave.cc:4312
      #25 0x000055a5ccfcafd8 in exec_relay_log_event (thd=<optimized out>, rli=rli@entry=0x62a0000202c0, serial_rgi=serial_rgi@entry=0x61d000320080) at /data/bld/11.4-asan-ubsan/sql/slave.cc:4735
      #26 0x000055a5ccfd4637 in handle_slave_sql (arg=0x62a00001e200) at /data/bld/11.4-asan-ubsan/sql/slave.cc:5994
      #27 0x000055a5cf770e59 in pfs_spawn_thread (arg=0x617000072a98) at /data/bld/11.4-asan-ubsan/storage/perfschema/pfs.cc:2201
      #28 0x00007f8aa5ea81c4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #29 0x00007f8aa5f2885c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      The failure started happening after this merge in 11.4.9:

      commit 4ffa1ff4a7cb40f26fa79df748800c9de76e72cd
      Merge: be0e3b2f0d9 d0afe4b985a
      Author: Marko Mäkelä
      Date:   Thu Oct 9 13:37:45 2025 +0300
       
          Merge 10.11 into 11.4
      

      Attachments

        Issue Links

          Activity

            People

              knielsen Kristian Nielsen
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 1h
                  1h

                  Git Integration

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