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

Assertion `marked_for_write_or_computed()' or its variations on slave upon executing row event generated by INSERT .. ON DUPLICATE KEY UPDATE

    XMLWordPrintable

    Details

      Description

      Note: The problem is most certainly related to MDEV-21810 and is possibly caused by it; I'm filing it separately because I also observed this assertion failure (with a fairly different stack trace) in non-replication scenarios, so maybe the development analysis will allow to get rid of replication in the test case.

      --source include/have_binlog_format_mixed.inc
      --source include/master-slave.inc
       
      CREATE TABLE t1 (
        a INT,
        b INT,
        c DECIMAL(5,2),
        UNIQUE (a),
        UNIQUE (b)
      );
       
      INSERT INTO t1 VALUES (1,10,NULL);
      INSERT INTO t1 (a) VALUES (1) ON DUPLICATE KEY UPDATE b = 20;
       
      --sync_slave_with_master
      

      10.4 e6373551

      mysqld: /data/src/10.4/sql/field.cc:3241: bool Field_new_decimal::store_value(const my_decimal*, int*): Assertion `marked_for_write_or_computed()' failed.
      200224 19:23:43 [ERROR] mysqld got signal 6 ;
       
      #6  0x00007fd5d9764e67 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x5588f7b3ad10 "marked_for_write_or_computed()", file=file@entry=0x5588f7b3aa6b "/data/src/10.4/sql/field.cc", line=line@entry=3241, function=function@entry=0x5588f7b3cc00 <Field_new_decimal::store_value(my_decimal const*, int*)::__PRETTY_FUNCTION__> "bool Field_new_decimal::store_value(const my_decimal*, int*)") at assert.c:92
      #7  0x00007fd5d9764f12 in __GI___assert_fail (assertion=0x5588f7b3ad10 "marked_for_write_or_computed()", file=0x5588f7b3aa6b "/data/src/10.4/sql/field.cc", line=3241, function=0x5588f7b3cc00 <Field_new_decimal::store_value(my_decimal const*, int*)::__PRETTY_FUNCTION__> "bool Field_new_decimal::store_value(const my_decimal*, int*)") at assert.c:101
      #8  0x00005588f6fcb4d8 in Field_new_decimal::store_value (this=0x7fd5780309c0, decimal_value=0x5588f8645480 <decimal_zero>, native_error=0x7fd5ce9af9fc) at /data/src/10.4/sql/field.cc:3241
      #9  0x00005588f6fcb875 in Field_new_decimal::store_value (this=0x7fd5780309c0, decimal_value=0x5588f8645480 <decimal_zero>) at /data/src/10.4/sql/field.cc:3289
      #10 0x00005588f6fcb352 in Field_new_decimal::reset (this=0x7fd5780309c0) at /data/src/10.4/sql/field.cc:3194
      #11 0x00005588f716e1b5 in unpack_row (rgi=0x7fd578000a80, table=0x7fd578036570, colcnt=3, row_data=0x7fd5780512d0 "\374\001", cols=0x7fd57802cd38, current_row_end=0x7fd57802cdf0, master_reclength=0x7fd57802cd80, row_end=0x7fd5780512e2 "\245\245\245\245\245\245h4z\025") at /data/src/10.4/sql/rpl_record.cc:298
      #12 0x00005588f716cdd6 in Rows_log_event::unpack_current_row (this=0x7fd57802ccc0, rgi=0x7fd578000a80) at /data/src/10.4/sql/log_event.h:4687
      #13 0x00005588f7168b59 in Rows_log_event::find_row (this=0x7fd57802ccc0, rgi=0x7fd578000a80) at /data/src/10.4/sql/log_event.cc:14080
      #14 0x00005588f716a3e7 in Update_rows_log_event::do_exec_row (this=0x7fd57802ccc0, rgi=0x7fd578000a80) at /data/src/10.4/sql/log_event.cc:14671
      #15 0x00005588f7162bb7 in Rows_log_event::do_apply_event (this=0x7fd57802ccc0, rgi=0x7fd578000a80) at /data/src/10.4/sql/log_event.cc:11642
      #16 0x00005588f6ba6da9 in Log_event::apply_event (this=0x7fd57802ccc0, rgi=0x7fd578000a80) at /data/src/10.4/sql/log_event.h:1482
      #17 0x00005588f6b99578 in apply_event_and_update_pos_apply (ev=0x7fd57802ccc0, thd=0x7fd578001550, rgi=0x7fd578000a80, reason=0) at /data/src/10.4/sql/slave.cc:3959
      #18 0x00005588f6b99c1f in apply_event_and_update_pos (ev=0x7fd57802ccc0, thd=0x7fd578001550, rgi=0x7fd578000a80) at /data/src/10.4/sql/slave.cc:4113
      #19 0x00005588f6b9a787 in exec_relay_log_event (thd=0x7fd578001550, rli=0x5588fa78b528, serial_rgi=0x7fd578000a80) at /data/src/10.4/sql/slave.cc:4434
      #20 0x00005588f6b9e1ad in handle_slave_sql (arg=0x5588fa789860) at /data/src/10.4/sql/slave.cc:5602
      #21 0x00005588f782a281 in pfs_spawn_thread (arg=0x7fd57c07cf30) at /data/src/10.4/storage/perfschema/pfs.cc:1869
      #22 0x00007fd5db6ed4a4 in start_thread (arg=0x7fd5ce9b2700) at pthread_create.c:456
      #23 0x00007fd5d9821d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      10.3 affe7fab

      mysqld: /data/src/10.3/sql/field.cc:3196: bool Field_new_decimal::store_value(const my_decimal*, int*): Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field_index) || (!(ptr >= table->record[0] && ptr < table->record[0] + table->s->reclength))) || (table->vcol_set && bitmap_is_set(table->vcol_set, field_index))' failed.
      200224 19:27:57 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f2c9661cf12 in __GI___assert_fail (assertion=0x56501cd2acc8 "!table || (!table->write_set || bitmap_is_set(table->write_set, field_index) || (!(ptr >= table->record[0] && ptr < table->record[0] + table->s->reclength))) || (table->vcol_set && bitmap_is_set(table"..., file=0x56501cd2a9b9 "/data/src/10.3/sql/field.cc", line=3196, function=0x56501cd2ca20 <Field_new_decimal::store_value(my_decimal const*, int*)::__PRETTY_FUNCTION__> "bool Field_new_decimal::store_value(const my_decimal*, int*)") at assert.c:101
      #8  0x000056501c22ba05 in Field_new_decimal::store_value (this=0x7f2c30025830, decimal_value=0x56501d7a7940 <decimal_zero>, native_error=0x7f2c900ed83c) at /data/src/10.3/sql/field.cc:3196
      #9  0x000056501c22bda3 in Field_new_decimal::store_value (this=0x7f2c30025830, decimal_value=0x56501d7a7940 <decimal_zero>) at /data/src/10.3/sql/field.cc:3244
      #10 0x000056501c22b688 in Field_new_decimal::reset (this=0x7f2c30025830) at /data/src/10.3/sql/field.cc:3149
      #11 0x000056501c3c6f68 in unpack_row (rgi=0x7f2c30000a80, table=0x7f2c30027c60, colcnt=3, row_data=0x7f2c30024c90 "\374\001", cols=0x7f2c30040eb8, current_row_end=0x7f2c30040f70, master_reclength=0x7f2c30040f00, row_end=0x7f2c30024ca2 "\245\245\245\245\245\245h4z\025", '\217' <repeats 12 times>, "U") at /data/src/10.3/sql/rpl_record.cc:298
      #12 0x000056501c3c5aea in Rows_log_event::unpack_current_row (this=0x7f2c30040e40, rgi=0x7f2c30000a80) at /data/src/10.3/sql/log_event.h:4656
      #13 0x000056501c3c1a35 in Rows_log_event::find_row (this=0x7f2c30040e40, rgi=0x7f2c30000a80) at /data/src/10.3/sql/log_event.cc:14042
      #14 0x000056501c3c32d3 in Update_rows_log_event::do_exec_row (this=0x7f2c30040e40, rgi=0x7f2c30000a80) at /data/src/10.3/sql/log_event.cc:14633
      #15 0x000056501c3bbb6e in Rows_log_event::do_apply_event (this=0x7f2c30040e40, rgi=0x7f2c30000a80) at /data/src/10.3/sql/log_event.cc:11611
      #16 0x000056501be652ff in Log_event::apply_event (this=0x7f2c30040e40, rgi=0x7f2c30000a80) at /data/src/10.3/sql/log_event.h:1482
      #17 0x000056501be586a6 in apply_event_and_update_pos_apply (ev=0x7f2c30040e40, thd=0x7f2c30001560, rgi=0x7f2c30000a80, reason=0) at /data/src/10.3/sql/slave.cc:3914
      #18 0x000056501be58beb in apply_event_and_update_pos (ev=0x7f2c30040e40, thd=0x7f2c30001560, rgi=0x7f2c30000a80) at /data/src/10.3/sql/slave.cc:4062
      #19 0x000056501be59512 in exec_relay_log_event (thd=0x7f2c30001560, rli=0x56501eb95858, serial_rgi=0x7f2c30000a80) at /data/src/10.3/sql/slave.cc:4362
      #20 0x000056501be5cd82 in handle_slave_sql (arg=0x56501eb93b90) at /data/src/10.3/sql/slave.cc:5529
      #21 0x000056501ca6dea2 in pfs_spawn_thread (arg=0x7f2c34094920) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #22 0x00007f2c985a54a4 in start_thread (arg=0x7f2c900ef700) at pthread_create.c:456
      #23 0x00007f2c966d9d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      10.1 b9689712

      mysqld: /data/src/10.1/sql/field.cc:3037: bool Field_new_decimal::store_value(const my_decimal*, int*): Assertion `is_stat_field || !table || (!table->write_set || bitmap_is_set(table->write_set, field_index) || (table->vcol_set && bitmap_is_set(table->vcol_set, field_index)))' failed.
      200224 19:29:37 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f2b2bc00f12 in __GI___assert_fail (assertion=0x557f41c42718 "is_stat_field || !table || (!table->write_set || bitmap_is_set(table->write_set, field_index) || (table->vcol_set && bitmap_is_set(table->vcol_set, field_index)))", file=0x557f41c42404 "/data/src/10.1/sql/field.cc", line=3037, function=0x557f41c446e0 <Field_new_decimal::store_value(my_decimal const*, int*)::__PRETTY_FUNCTION__> "bool Field_new_decimal::store_value(const my_decimal*, int*)") at assert.c:101
      #8  0x0000557f41416011 in Field_new_decimal::store_value (this=0x7f2b14866748, decimal_value=0x557f4252cee0 <decimal_zero>, native_error=0x7f2b2bbd19ec) at /data/src/10.1/sql/field.cc:3037
      #9  0x0000557f41416347 in Field_new_decimal::store_value (this=0x7f2b14866748, decimal_value=0x557f4252cee0 <decimal_zero>) at /data/src/10.1/sql/field.cc:3085
      #10 0x0000557f41415e48 in Field_new_decimal::reset (this=0x7f2b14866748) at /data/src/10.1/sql/field.cc:2990
      #11 0x0000557f415507b0 in unpack_row (rgi=0x7f2b14815800, table=0x7f2b148d7e70, colcnt=3, row_data=0x7f2b14895770 "\374\001", cols=0x7f2b148a52a8, current_row_end=0x7f2b148a5348, master_reclength=0x7f2b148a52f0, row_end=0x7f2b14895782 "\245\245\245\245\245\245h4z\025") at /data/src/10.1/sql/rpl_record.cc:297
      #12 0x0000557f4154f85c in Rows_log_event::unpack_current_row (this=0x7f2b148a5230, rgi=0x7f2b14815800) at /data/src/10.1/sql/log_event.h:4461
      #13 0x0000557f4154c3ff in Rows_log_event::find_row (this=0x7f2b148a5230, rgi=0x7f2b14815800) at /data/src/10.1/sql/log_event.cc:12358
      #14 0x0000557f4154d63f in Update_rows_log_event::do_exec_row (this=0x7f2b148a5230, rgi=0x7f2b14815800) at /data/src/10.1/sql/log_event.cc:12856
      #15 0x0000557f415475ca in Rows_log_event::do_apply_event (this=0x7f2b148a5230, rgi=0x7f2b14815800) at /data/src/10.1/sql/log_event.cc:10223
      #16 0x0000557f4115432b in Log_event::apply_event (this=0x7f2b148a5230, rgi=0x7f2b14815800) at /data/src/10.1/sql/log_event.h:1343
      #17 0x0000557f4114997d in apply_event_and_update_pos_apply (ev=0x7f2b148a5230, thd=0x7f2b1485f070, rgi=0x7f2b14815800, reason=0) at /data/src/10.1/sql/slave.cc:3482
      #18 0x0000557f41149e1b in apply_event_and_update_pos (ev=0x7f2b148a5230, thd=0x7f2b1485f070, rgi=0x7f2b14815800) at /data/src/10.1/sql/slave.cc:3603
      #19 0x0000557f4114a61f in exec_relay_log_event (thd=0x7f2b1485f070, rli=0x7f2b1fa70cd0, serial_rgi=0x7f2b14815800) at /data/src/10.1/sql/slave.cc:3888
      #20 0x0000557f4114d82d in handle_slave_sql (arg=0x7f2b1fa6f000) at /data/src/10.1/sql/slave.cc:4986
      #21 0x0000557f4175a76e in pfs_spawn_thread (arg=0x7f2b15e880f0) at /data/src/10.1/storage/perfschema/pfs.cc:1868
      #22 0x00007f2b2d4af4a4 in start_thread (arg=0x7f2b2bbd4700) at pthread_create.c:456
      #23 0x00007f2b2bcbdd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      10.2 fails on the same assertion as 10.3, 10.5 – on the same assertion as 10.4.
      Non-debug builds don't crash, although they're still affected by MDEV-21810.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Elkin Andrei Elkin
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: