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

Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed in Diagnostics_area::set_ok_status upon killing CREATE EVENT

    XMLWordPrintable

    Details

      Description

      Note: We have numerous open bugs with this generic assertion failure, but none of them is related to events, and I've been encountering it a lot upon killing CREATE EVENT, so possibly there is something specific to it.

      Note: The test case is non-deterministic, run with --repeat=N. It usually fails for me within ~10 attempts on 10.x, takes a little longer on 5.5; but it can vary on different machines and builds.

      --connect (con1,localhost,root,,test)
      --let $conid= `SELECT CONNECTION_ID()`
      --send
        CREATE EVENT ev ON SCHEDULE EVERY 10 SECOND DO SET @a=1;
       
      --connection default
      SELECT 1;
      --eval KILL QUERY $conid
       
      --connection con1
      --error 0,ER_QUERY_INTERRUPTED
      --reap
      --disconnect con1
      --connection default
      DROP EVENT IF EXISTS ev;
      

      10.4 9afbb106

      mysqld: /data/src/10.4/sql/sql_error.cc:335: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed.
      191027 17:35:19 [ERROR] mysqld got signal 6 ;
       
      #6  0x00007fbac13f2e67 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x559d7f580340 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=file@entry=0x559d7f580288 "/data/src/10.4/sql/sql_error.cc", line=line@entry=335, function=function@entry=0x559d7f580680 <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
      #7  0x00007fbac13f2f12 in __GI___assert_fail (assertion=0x559d7f580340 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=0x559d7f580288 "/data/src/10.4/sql/sql_error.cc", line=335, function=0x559d7f580680 <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
      #8  0x0000559d7e8400c0 in Diagnostics_area::set_ok_status (this=0x7fbaa40064d0, affected_rows=0, last_insert_id=0, message=0x0) at /data/src/10.4/sql/sql_error.cc:335
      #9  0x0000559d7e7e4646 in my_ok (thd=0x7fbaa4000b00, affected_rows_arg=0, id=0, message=0x0) at /data/src/10.4/sql/sql_class.h:5005
      #10 0x0000559d7e89a144 in mysql_execute_command (thd=0x7fbaa4000b00) at /data/src/10.4/sql/sql_parse.cc:5165
      #11 0x0000559d7e8a3ac5 in mysql_parse (thd=0x7fbaa4000b00, rawbuf=0x7fbaa4011d88 "CREATE EVENT ev ON SCHEDULE EVERY 10 SECOND DO SET @a=1", length=55, parser_state=0x7fbab7535170, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7912
      #12 0x0000559d7e88ed58 in dispatch_command (command=COM_QUERY, thd=0x7fbaa4000b00, packet=0x7fbaa4008351 "CREATE EVENT ev ON SCHEDULE EVERY 10 SECOND DO SET @a=1", packet_length=55, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1841
      #13 0x0000559d7e88d3e5 in do_command (thd=0x7fbaa4000b00) at /data/src/10.4/sql/sql_parse.cc:1359
      #14 0x0000559d7ea14e17 in do_handle_one_connection (connect=0x559d8193ae60) at /data/src/10.4/sql/sql_connect.cc:1412
      #15 0x0000559d7ea14b66 in handle_one_connection (arg=0x559d8193ae60) at /data/src/10.4/sql/sql_connect.cc:1316
      #16 0x0000559d7f417aa5 in pfs_spawn_thread (arg=0x559d8185fa60) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #17 0x00007fbac2f684a4 in start_thread (arg=0x7fbab7536700) at pthread_create.c:456
      #18 0x00007fbac14afd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      uery (0x7fbaa4011d88): CREATE EVENT ev ON SCHEDULE EVERY 10 SECOND DO SET @a=1
      Connection ID (thread ID): 25
      Status: KILL_QUERY
      

      Reproducible on all of MariaDB 5.5-10.5. Also reproducible on MySQL 5.6 and 5.7; I didn't try MySQL 5.5 and couldn't reproduce on MySQL 8.0, I assume it's fixed there.
      No obvious effect on a non-debug build.

        Attachments

          Activity

            People

            Assignee:
            rucha174 Rucha Deodhar
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration