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

Assertion `total_length + thd->wsrep_sr().log_position() == saved_pos' failed in int wsrep_write_cache_inc(THD*, IO_CACHE*, size_t*)

    XMLWordPrintable

Details

    Description

      CREATE SEQUENCE SEQ NOCACHE ENGINE=InnoDB;
      SET SESSION wsrep_trx_fragment_size=1;
      SET collation_connection=utf16_thai_520_w2;
      SET autocommit=0;
      CREATE TABLE t1 (a BLOB UNIQUE);
      INSERT INTO t1 VALUES ('AAF');
      SELECT SETVAL (SEQ, 100);
      ALTER TABLE t1 ADD CONSTRAINT constraint_1 UNIQUE (a);
      INSERT INTO t1 VALUES();
      ALTER TABLE t1 ADD KEY(b (50));
      

      Leads to:

      10.4.26 96f4b4a55b449a29af7e4b70bebf0ff238ae7f80 (Optimized)

      mysqld: /test/10.4_opt/sql/wsrep_binlog.cc:160: int wsrep_write_cache_inc(THD*, IO_CACHE*, size_t*): Assertion `total_length + thd->wsrep_sr().log_position() == saved_pos' failed.
      

      10.4.26 96f4b4a55b449a29af7e4b70bebf0ff238ae7f80 (Optimized)

      Core was generated by `/test/GAL_MD070622-mariadb-10.4.26-linux-x86_64-opt/bin/mysqld --defaults-file='.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x147f15af1700 (LWP 649112))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055deb176ae3f in my_write_core (sig=sig@entry=6) at /test/10.4_opt/mysys/stacktrace.c:386
      #2  0x000055deb12679b8 in handle_fatal_signal (sig=6) at /test/10.4_opt/sql/signal_handler.cc:356
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x0000147f4db48859 in __GI_abort () at abort.c:79
      #6  0x0000147f4db48729 in __assert_fail_base (fmt=0x147f4dcde588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55deb1a50ba8 "total_length + thd->wsrep_sr().log_position() == saved_pos", file=0x55deb1a50b80 "/test/10.4_opt/sql/wsrep_binlog.cc", line=160, function=<optimized out>) at assert.c:92
      #7  0x0000147f4db59f36 in __GI___assert_fail (assertion=assertion@entry=0x55deb1a50ba8 "total_length + thd->wsrep_sr().log_position() == saved_pos", file=file@entry=0x55deb1a50b80 "/test/10.4_opt/sql/wsrep_binlog.cc", line=line@entry=160, function=function@entry=0x55deb1a50b48 "int wsrep_write_cache_inc(THD*, IO_CACHE*, size_t*)") at assert.c:101
      #8  0x000055deb14cc907 in wsrep_write_cache_inc (len=<optimized out>, cache=0x147ed006de38, thd=0x147ed0000c48) at /test/10.4_opt/sql/wsrep_binlog.cc:138
      #9  wsrep_write_cache (thd=0x147ed0000c48, cache=cache@entry=0x147ed006de38, len=len@entry=0x147f15aedff8) at /test/10.4_opt/sql/wsrep_binlog.cc:183
      #10 0x000055deb14b58fc in Wsrep_client_service::prepare_data_for_replication (this=0x147ed0006a38) at /test/10.4_opt/sql/sql_error.h:1046
      #11 0x000055deb18cf604 in wsrep::transaction::certify_commit (this=0x147ed0006ab8, lock=@0x147f15aee270: {_M_device = 0x147ed0006a18, _M_owns = false}) at /test/10.4_opt/wsrep-lib/src/transaction.cpp:1755
      #12 0x000055deb18d1a66 in wsrep::transaction::before_prepare (this=0x147ed0006ab8, lock=@0x147f15aee270: {_M_device = 0x147ed0006a18, _M_owns = false}) at /test/10.4_opt/wsrep-lib/src/transaction.cpp:342
      #13 0x000055deb18d1def in wsrep::transaction::before_commit (this=this@entry=0x147ed0006ab8) at /test/10.4_opt/wsrep-lib/src/transaction.cpp:458
      #14 0x000055deb126bd16 in wsrep::client_state::before_commit (this=0x147ed0006a50) at /test/10.4_opt/wsrep-lib/include/wsrep/client_state.hpp:503
      #15 wsrep_before_commit (all=true, thd=0x147ed0000c48) at /test/10.4_opt/sql/wsrep_trans_observer.h:277
      #16 ha_commit_trans (thd=thd@entry=0x147ed0000c48, all=all@entry=true) at /test/10.4_opt/sql/handler.cc:1609
      #17 0x000055deb11790cd in trans_commit_implicit (thd=thd@entry=0x147ed0000c48) at /test/10.4_opt/sql/transaction.cc:302
      #18 0x000055deb1074718 in mysql_execute_command (thd=0x147ed0000c48) at /test/10.4_opt/sql/sql_parse.cc:3771
      #19 0x000055deb107ba92 in mysql_parse (thd=thd@entry=0x147ed0000c48, rawbuf=rawbuf@entry=0x147ed000fe60 "ALTER TABLE t1 ADD KEY(b(50))", length=length@entry=29, parser_state=parser_state@entry=0x147f15af0530, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_opt/sql/sql_parse.cc:7995
      #20 0x000055deb107c299 in wsrep_mysql_parse (thd=0x147ed0000c48, rawbuf=0x147ed000fe60 "ALTER TABLE t1 ADD KEY(b(50))", length=29, parser_state=0x147f15af0530, is_com_multi=false, is_next_command=false) at /test/10.4_opt/sql/sql_parse.cc:7799
      #21 0x000055deb107eee5 in dispatch_command (command=COM_QUERY, thd=0x147ed0000c48, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.4_opt/sql/sql_parse.cc:1943
      #22 0x000055deb108002f in do_command (thd=0x147ed0000c48) at /test/10.4_opt/sql/sql_parse.cc:1378
      #23 0x000055deb116b9de in do_handle_one_connection (connect=0x55deb474bf88) at /test/10.4_opt/sql/sql_connect.cc:1420
      #24 0x000055deb116ba6d in handle_one_connection (arg=<optimized out>) at /test/10.4_opt/sql/sql_connect.cc:1316
      #25 0x0000147f4e057609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #26 0x0000147f4dc45293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        Issue Links

          Activity

            People

              sysprg Julius Goryavsky
              ramesh Ramesh Sivaraman
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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