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

Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed in Diagnostics_area::set_ok_status on SAVEPOINT

    XMLWordPrintable

Details

    Description

      Issue is sporadic. Keep repeating test till it crashes. Normally only ~two attempts needed. Seems to affect 10.6+

      DROP DATABASE test;
      CREATE DATABASE test;
      USE test;
      SET sql_mode='';
      SET SESSION unique_checks=0,foreign_key_checks=0;
      CREATE TABLE t (c INT,c2 INT) ENGINE=InnoDB;
      INSERT INTO t VALUES (0,0);
      XA START 'a';
      UPDATE t SET c=0;
      SAVEPOINT s;
      CREATE TEMPORARY TABLE t2 (c INT PRIMARY KEY,c2 INT) ENGINE=InnoDB;
      INSERT INTO t2 VALUES (0,0),(0,0);
      UPDATE t SET c=0;
      SAVEPOINT s;
      

      Leads to:

      10.6.0 f74704c7d963ddcd1109843a5861c6bd76409c8d (Debug)

      mysqld: /test/10.6_dbg/sql/sql_error.cc:334: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed.
      

      10.6.0 f74704c7d963ddcd1109843a5861c6bd76409c8d (Debug)

      Core was generated by `/test/MD120421-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      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 0x14c3e8063700 (LWP 2873965))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x00005613269b9c9e in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x0000561326158b07 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x000014c3e94c7859 in __GI_abort () at abort.c:79
      #6  0x000014c3e94c7729 in __assert_fail_base (fmt=0x14c3e965d588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x561326b203d0 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=0x561326b202b0 "/test/10.6_dbg/sql/sql_error.cc", line=334, function=<optimized out>) at assert.c:92
      #7  0x000014c3e94d8f36 in __GI___assert_fail (assertion=assertion@entry=0x561326b203d0 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=file@entry=0x561326b202b0 "/test/10.6_dbg/sql/sql_error.cc", line=line@entry=334, function=function@entry=0x561326b20408 "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at assert.c:101
      #8  0x0000561325e3d5e5 in Diagnostics_area::set_ok_status (this=0x14c394006ab8, affected_rows=affected_rows@entry=0, last_insert_id=last_insert_id@entry=0, message=message@entry=0x0) at /test/10.6_dbg/sql/sql_error.h:1017
      #9  0x0000561325e9c4f1 in my_ok (message=0x0, id=0, affected_rows_arg=0, thd=0x14c394000db8) at /test/10.6_dbg/sql/sql_class.h:5486
      #10 mysql_execute_command (thd=thd@entry=0x14c394000db8) at /test/10.6_dbg/sql/sql_parse.cc:5677
      #11 0x0000561325e83a02 in mysql_parse (thd=thd@entry=0x14c394000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14c3e8062410) at /test/10.6_dbg/sql/sql_parse.cc:8004
      #12 0x0000561325e92726 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14c394000db8, packet=packet@entry=0x14c39400b369 "SAVEPOINT s", packet_length=packet_length@entry=11, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1331
      #13 0x0000561325e95ac7 in do_command (thd=0x14c394000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1399
      #14 0x0000561325fef176 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x56132964b568, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #15 0x0000561325fef77b in handle_one_connection (arg=arg@entry=0x56132964b568) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #16 0x000056132649d253 in pfs_spawn_thread (arg=0x56132954ed18) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #17 0x000014c3e99d5609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #18 0x000014c3e95c4293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.6.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.38 (dbg), 10.2.38 (opt), 10.3.29 (dbg), 10.3.29 (opt), 10.4.19 (dbg), 10.4.19 (opt), 10.5.10 (dbg), 10.5.10 (opt), 10.6.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.33 (dbg), 5.7.33 (opt), 8.0.23 (dbg), 8.0.23 (opt)

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.