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

Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed in Diagnostics_area::set_ok_status upon UPDATE on partitioned table

    XMLWordPrintable

Details

    Description

      Note: MDEV-11597 and MDEV-11317 have been fixed by now, but the problem below (much more difficult to reproduce) is still there.

      10.2 fd0479ce592e0

      mysqld: /data/src/10.2/sql/sql_error.cc:380: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed.
      170112  2:52:15 [ERROR] mysqld got signal 6 ;
      

      # 2017-01-12T02:52:40 [13124] #6  0x00007f79e2fcd266 in __assert_fail_base (fmt=0x7f79e3106238 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7f79e652e430 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=file@entry=0x7f79e652e368 "/data/src/10.2/sql/sql_error.cc", line=line@entry=380, function=function@entry=0x7f79e652e880 <Diagnostics_area::set_ok_status(unsigned long long, unsigned long long, char const*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at assert.c:92
      # 2017-01-12T02:52:40 [13124] #7  0x00007f79e2fcd312 in __GI___assert_fail (assertion=0x7f79e652e430 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=0x7f79e652e368 "/data/src/10.2/sql/sql_error.cc", line=380, function=0x7f79e652e880 <Diagnostics_area::set_ok_status(unsigned long long, unsigned long long, char const*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at assert.c:101
      # 2017-01-12T02:52:40 [13124] #8  0x00007f79e5a80a5d in Diagnostics_area::set_ok_status (this=0x7f799d41b050, affected_rows=0, last_insert_id=0, message=0x0) at /data/src/10.2/sql/sql_error.cc:380
      # 2017-01-12T02:52:40 [13124] #9  0x00007f79e5a3604d in my_ok (thd=0x7f799d416070, affected_rows=0, id=0, message=0x0) at /data/src/10.2/sql/sql_class.h:4329
      # 2017-01-12T02:52:40 [13124] #10 0x00007f79e5aae3e5 in mysql_execute_command (thd=0x7f799d416070) at /data/src/10.2/sql/sql_parse.cc:3937
      # 2017-01-12T02:52:40 [13124] #11 0x00007f79e5aba8a0 in mysql_parse (thd=0x7f799d416070, rawbuf=0x7f799d4631d0 "CREATE OR REPLACE TABLE `create_or_replace_tmp` LIKE `t6` /* QNO 430 CON_ID 13 */", length=81, parser_state=0x7f79e6b6be20, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7842
      # 2017-01-12T02:52:40 [13124] #12 0x00007f79e5aa89ab in dispatch_command (command=COM_QUERY, thd=0x7f799d416070, packet=0x7f799d454071 "CREATE OR REPLACE TABLE `create_or_replace_tmp` LIKE `t6` /* QNO 430 CON_ID 13 */ ", packet_length=82, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1800
      # 2017-01-12T02:52:40 [13124] #13 0x00007f79e5aa73a3 in do_command (thd=0x7f799d416070) at /data/src/10.2/sql/sql_parse.cc:1360
      # 2017-01-12T02:52:40 [13124] #14 0x00007f79e5befc48 in do_handle_one_connection (connect=0x7f79e2460050) at /data/src/10.2/sql/sql_connect.cc:1354
      # 2017-01-12T02:52:40 [13124] #15 0x00007f79e5bef9d5 in handle_one_connection (arg=0x7f79e2460050) at /data/src/10.2/sql/sql_connect.cc:1260
      # 2017-01-12T02:52:40 [13124] #16 0x00007f79e50da0a4 in start_thread (arg=0x7f79e6b6d300) at pthread_create.c:309
      # 2017-01-12T02:52:40 [13124] #17 0x00007f79e308787d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      On 10.0 and 10.1 the assertion is different:

      10.1 4b05d60e62e

      mysqld: /data/src/10.1/sql/sql_error.cc:378: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `! is_set()' failed.
      170112  3:05:13 [ERROR] mysqld got signal 6 ;
       
      # 2017-01-12T03:05:36 [13531] #7  0x00007f95227a6312 in __GI___assert_fail (assertion=0x7f95258c72c0 "! is_set()", file=0x7f95258c71f8 "/data/src/10.1/sql/sql_error.cc", line=378, function=0x7f95258c76c0 <Diagnostics_area::set_ok_status(unsigned long long, unsigned long long, char const*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at assert.c:101
      # 2017-01-12T03:05:36 [13531] #8  0x00007f9524f86b00 in Diagnostics_area::set_ok_status (this=0x7f94fe671e78, affected_rows=0, last_insert_id=0, message=0x0) at /data/src/10.1/sql/sql_error.cc:378
      # 2017-01-12T03:05:36 [13531] #9  0x00007f9524f40471 in my_ok (thd=0x7f94fe66d070, affected_rows=0, id=0, message=0x0) at /data/src/10.1/sql/sql_class.h:4080
      # 2017-01-12T03:05:36 [13531] #10 0x00007f9524fb0dfb in mysql_execute_command (thd=0x7f94fe66d070) at /data/src/10.1/sql/sql_parse.cc:3467
      # 2017-01-12T03:05:36 [13531] #11 0x00007f9524fbcbcd in mysql_parse (thd=0x7f94fe66d070, rawbuf=0x7f94f4822088 "CREATE OR REPLACE TABLE `create_or_replace_tmp` LIKE `t2` /* QNO 454 CON_ID 8 */", length=80, parser_state=0x7f9525e58630) at /data/src/10.1/sql/sql_parse.cc:7322
      # 2017-01-12T03:05:36 [13531] #12 0x00007f9524fabbda in dispatch_command (command=COM_QUERY, thd=0x7f94fe66d070, packet=0x7f94fe673071 "CREATE OR REPLACE TABLE `create_or_replace_tmp` LIKE `t2` /* QNO 454 CON_ID 8 */ ", packet_length=81) at /data/src/10.1/sql/sql_parse.cc:1488
      # 2017-01-12T03:05:36 [13531] #13 0x00007f9524faa953 in do_command (thd=0x7f94fe66d070) at /data/src/10.1/sql/sql_parse.cc:1109
      # 2017-01-12T03:05:36 [13531] #14 0x00007f95250e07cc in do_handle_one_connection (thd_arg=0x7f94fe66d070) at /data/src/10.1/sql/sql_connect.cc:1350
      # 2017-01-12T03:05:36 [13531] #15 0x00007f95250e0530 in handle_one_connection (arg=0x7f94fe66d070) at /data/src/10.1/sql/sql_connect.cc:1262
      # 2017-01-12T03:05:36 [13531] #16 0x00007f95246a80a4 in start_thread (arg=0x7f9525e59b00) at pthread_create.c:309
      # 2017-01-12T03:05:36 [13531] #17 0x00007f952286087d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      To reproduce:

      git clone https://github.com/elenst/rqg --branch mdev11779 rqg-mdev11779
      cd rqg-mdev11779
      . ./run <basedir> <vardir>
      

      The test starts the server on port 19300 and runs the test flow for 5 minutes. The flow includes killing and restarting the server, it produces a lot of noise. It can also return bogus STATUS_SERVER_CRASHED at the end, it is not an indication of the problem itself. The real indication is that the test terminates prematurely and prints a stack trace at the end (and of course the server error log contains the error report).

      Due to crash/restart being a part of the flow, unfortunately it's impossible to convert it to gentest.pl running on a previously started server.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.