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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.5, 10.6, 10.11
    • 10.5, 10.6, 10.11
    • Galera
    • None

    Description

      --source include/galera_cluster.inc
      --source include/have_sequence.inc
      --source include/have_innodb.inc
       
      CREATE TABLE t1(c INT);
      CREATE TABLE t2(c INT KEY,C2 TEXT)ENGINE=MYISAM;
      SET SESSION wsrep_trx_fragment_size=1;
      CREATE TABLE t3(c INT KEY,C2 TEXT)ENGINE=INNODB;
      SET AUTOCOMMIT=0;
      INSERT INTO t3 SELECT seq,'w28hYnzhdfqPccgOQd55ajvLxcCqGoQyHbhU4BE3QBl6YE9szpqwPvxuTrePhdezgyFX4NsdkQLQ5uUQzsAtqWNMe8qvUndvgxNkEeIKp5k8KIjda8TryMyYFcIALao6I5XYFrvv3vUDPel5eCYHilSJ9BGbBtAw98vG33Ws4XNCRsaElxh3MWrYDTPMUEYVf6pnFL3Tbu4SkD8OPd9ko36VfLX1XFicomeY5YjEx6cCwSNlwSX1PEkjuPiLVCZoe14vR9Sv4ZVvLw2ZqjeZAp9bksueQNiBwGHZJ3OJrLYw5NJIuLVyKTycG9j0c4OvuFxPEftUjM8ZiX' FROM seq_1_to_100;
      CREATE TABLE t4(c INT);
      INSERT INTO t1 VALUES(1);
      INSERT INTO t2 SELECT seq,REPEAT('x',20) FROM seq_1_to_1;
      CREATE USER test@localhost;
      

      Leads to

      10.11.9 632dd304c7d1915d46a1b7e1fcca7821cae6e9d6 (Optimized)

      mysqld: /test/10.11_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.11.9 632dd304c7d1915d46a1b7e1fcca7821cae6e9d6 (Optimized)

      Core was generated by `/test/GAL_MD120724-mariadb-10.11.9-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 0x15484819d700 (LWP 2658352))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000056084c6b3d3f in my_write_core (sig=sig@entry=6) at /test/10.11_opt/mysys/stacktrace.c:424
      #2  0x000056084c1f1260 in handle_fatal_signal (sig=6) at /test/10.11_opt/sql/signal_handler.cc:358
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x000015487dfa0859 in __GI_abort () at abort.c:79
      #6  0x000015487dfa0729 in __assert_fail_base (fmt=0x15487e136588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x56084ca70868 "total_length + thd->wsrep_sr().log_position() == saved_pos", file=0x56084ca70840 "/test/10.11_opt/sql/wsrep_binlog.cc", line=160, function=<optimized out>) at assert.c:92
      #7  0x000015487dfb1fd6 in __GI___assert_fail (assertion=assertion@entry=0x56084ca70868 "total_length + thd->wsrep_sr().log_position() == saved_pos", file=file@entry=0x56084ca70840 "/test/10.11_opt/sql/wsrep_binlog.cc", line=line@entry=160, function=function@entry=0x56084ca70808 "int wsrep_write_cache_inc(THD*, IO_CACHE*, size_t*)") at assert.c:101
      #8  0x000056084c452d82 in wsrep_write_cache_inc (len=<optimized out>, cache=0x154814056170, thd=0x154814000c58) at /test/10.11_opt/sql/wsrep_binlog.cc:138
      #9  wsrep_write_cache (thd=0x154814000c58, cache=cache@entry=0x154814056170, len=len@entry=0x15484819b130) at /test/10.11_opt/sql/wsrep_binlog.cc:183
      #10 0x000056084c4378c4 in Wsrep_client_service::prepare_data_for_replication (this=0x154814007188) at /test/10.11_opt/sql/wsrep_client_service.cc:99
      #11 0x000056084c8b94d4 in wsrep::transaction::certify_commit (this=0x154814007208, lock=@0x15484819b3b0: {_M_device = 0x154814007168, _M_owns = false}) at /test/10.11_opt/wsrep-lib/src/transaction.cpp:1804
      #12 0x000056084c8ba186 in wsrep::transaction::before_prepare (this=0x154814007208, lock=@0x15484819b3b0: {_M_device = 0x154814007168, _M_owns = false}) at /test/10.11_opt/wsrep-lib/src/transaction.cpp:346
      #13 0x000056084c8ba4ff in wsrep::transaction::before_commit (this=this@entry=0x154814007208) at /test/10.11_opt/wsrep-lib/src/transaction.cpp:462
      #14 0x000056084c89b90d in wsrep::client_state::before_commit (this=this@entry=0x1548140071a0) at /test/10.11_opt/wsrep-lib/src/client_state.cpp:388
      #15 0x000056084c1f5994 in wsrep_before_commit (all=true, thd=0x154814000c58) at /test/10.11_opt/sql/sql_class.h:5587
      #16 ha_commit_trans (thd=thd@entry=0x154814000c58, all=all@entry=true) at /test/10.11_opt/sql/handler.cc:1874
      #17 0x000056084c0d2ea7 in trans_commit_implicit (thd=thd@entry=0x154814000c58) at /test/10.11_opt/sql/transaction.cc:338
      #18 0x000056084bfa2b68 in mysql_execute_command (thd=0x154814000c58, is_called_from_prepared_stmt=<optimized out>) at /test/10.11_opt/sql/sql_parse.cc:3790
      #19 0x000056084bf92dd6 in mysql_parse (rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, thd=0x154814000c58) at /test/10.11_opt/sql/sql_parse.cc:8143
      #20 mysql_parse (thd=0x154814000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/10.11_opt/sql/sql_parse.cc:8065
      #21 0x000056084bf92601 in wsrep_mysql_parse (thd=0x154814000c58, rawbuf=0x154814010880 "CREATE USER test@localhost", length=26, parser_state=0x15484819c400) at /test/10.11_opt/sql/sql_parse.cc:7953
      #22 0x000056084bfa0305 in dispatch_command (command=COM_QUERY, thd=0x154814000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/10.11_opt/sql/sql_parse.cc:1980
      #23 0x000056084bfa112e in do_command (thd=0x154814000c58, blocking=blocking@entry=true) at /test/10.11_opt/sql/sql_parse.cc:1408
      #24 0x000056084c0c2727 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x56084feafaf8, put_in_cache=put_in_cache@entry=true) at /test/10.11_opt/sql/sql_connect.cc:1417
      #25 0x000056084c0c2a0d in handle_one_connection (arg=0x56084feafaf8) at /test/10.11_opt/sql/sql_connect.cc:1319
      #26 0x000015487e4b1609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #27 0x000015487e09d133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.5.26 (dbg), 10.5.26 (opt), 10.6.19 (dbg), 10.6.19 (opt), 10.11.9 (dbg), 10.11.9 (opt),

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 11.1.6 (dbg), 11.1.6 (opt), 11.2.4 (dbg), 11.2.4 (opt), 11.4.2 (dbg), 11.4.2 (opt), 11.5.2 (dbg), 11.5.2 (opt)

      Attachments

        Activity

          People

            sysprg Julius Goryavsky
            ramesh Ramesh Sivaraman
            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.