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

Assertion `!current' failed in PROFILING::start_new_query

Details

    Description

      SET GLOBAL init_slave='SELECT 1';
      SET GLOBAL profiling=ON;
      CHANGE MASTER TO master_host="0.0.0.0";
      START SLAVE SQL_THREAD;
      SELECT 1;
      

      Leads to:

      10.5.4 8569dac1ec9f6853a0b2f3ea9bcbda67644ead24

      mysqld: /test/10.5_dbg/sql/sql_profile.h:297: void PROFILING::start_new_query(const char*): Assertion `!current' failed.
      

      10.5.4 8569dac1ec9f6853a0b2f3ea9bcbda67644ead24

      Core was generated by `/test/MD260520-mariadb-10.5.4-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:57
      [Current thread is 1 (Thread 0x1527ba00f700 (LWP 652279))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x00005640adbe0d7a in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
      #2  0x00005640ad386385 in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x00001527b879e801 in __GI_abort () at abort.c:79
      #6  0x00001527b878e39a in __assert_fail_base (fmt=0x1527b89157d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5640add5f5ba "!current", file=file@entry=0x5640add5f5c8 "/test/10.5_dbg/sql/sql_profile.h", line=line@entry=297, function=function@entry=0x5640add62640 <_ZZN9PROFILING15start_new_queryEPKcE19__PRETTY_FUNCTION__> "void PROFILING::start_new_query(const char*)") at assert.c:92
      #7  0x00001527b878e412 in __GI___assert_fail (assertion=assertion@entry=0x5640add5f5ba "!current", file=file@entry=0x5640add5f5c8 "/test/10.5_dbg/sql/sql_profile.h", line=line@entry=297, function=function@entry=0x5640add62640 <_ZZN9PROFILING15start_new_queryEPKcE19__PRETTY_FUNCTION__> "void PROFILING::start_new_query(const char*)") at assert.c:101
      #8  0x00005640ad0d48fa in PROFILING::start_new_query (initial_state=0x5640add5f5e9 "Starting", this=0x15279846b980) at /test/10.5_dbg/sql/sql_profile.h:297
      #9  dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x152798468088, packet=packet@entry=0x1527984964b0 "SELECT 1", packet_length=packet_length@entry=8, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1574
      #10 0x00005640ad0d2fbf in execute_init_command (thd=0x152798468088, init_command=<optimized out>, var_lock=<optimized out>) at /test/10.5_dbg/sql/sql_parse.cc:960
      #11 0x00005640ad0064a0 in handle_slave_sql (arg=arg@entry=0x1527995d4000) at /test/10.5_dbg/sql/slave.cc:5580
      #12 0x00005640ad68e14e in pfs_spawn_thread (arg=0x152798028388) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #13 0x00001527b94816db in start_thread (arg=0x1527ba00f700) at pthread_create.c:463
      #14 0x00001527b887f88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.1.46 (dbg), 10.2.33 (dbg), 10.3.24 (dbg), 10.4.14 (dbg), 10.5.4 (dbg)

      Bug confirmed not present in:
      MariaDB: 10.1.46 (opt), 10.2.33 (opt), 10.3.24 (opt), 10.4.14 (opt), 10.5.4 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

      Attachments

        Activity

          Roel Roel Van de Paar created issue -
          Elkin Andrei Elkin made changes -
          Field Original Value New Value
          Assignee Andrei Elkin [ elkin ] Sujatha Sivakumar [ sujatha.sivakumar ]
          sujatha.sivakumar Sujatha Sivakumar (Inactive) made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          sujatha.sivakumar Sujatha Sivakumar (Inactive) added a comment - Hello Andrei, Please review the fix for MDEV-22706 . Patch: https://github.com/MariaDB/server/commit/6badeb87f0ed7e3eee004bc47986a61fd5f9f58b Build Bot Testing: http://buildbot.askmonty.org/buildbot/grid?category=main&branch=bb-10.1-sujatha Thank you.
          sujatha.sivakumar Sujatha Sivakumar (Inactive) made changes -
          Assignee Sujatha Sivakumar [ sujatha.sivakumar ] Andrei Elkin [ elkin ]
          Status In Progress [ 3 ] In Review [ 10002 ]
          Elkin Andrei Elkin made changes -
          Labels reset_master
          Elkin Andrei Elkin added a comment -

          Thanks for a proper analysis. Approved with the Runtime consent.

          Elkin Andrei Elkin added a comment - Thanks for a proper analysis. Approved with the Runtime consent.
          Elkin Andrei Elkin made changes -
          Assignee Andrei Elkin [ elkin ] Sujatha Sivakumar [ sujatha.sivakumar ]
          Status In Review [ 10002 ] Stalled [ 10000 ]

          Fix is pushed in version 10.1.46.

          Patch has been tested in higher versions.
          10.2:Result file needs to be re-recorded as connection log is enabled in 10.2.
          Patch: https://github.com/MariaDB/server/commit/264c8c54abd201154f43e1d0851eb634165c1dfa

          10.3: Test needs to be moved to main/ directory.
          Patch: https://github.com/MariaDB/server/commit/833b123eec679980727bcaa1e2617e86b50972a1

          The patch remains the same for higher versions.

          sujatha.sivakumar Sujatha Sivakumar (Inactive) added a comment - Fix is pushed in version 10.1.46. Patch has been tested in higher versions. 10.2:Result file needs to be re-recorded as connection log is enabled in 10.2. Patch: https://github.com/MariaDB/server/commit/264c8c54abd201154f43e1d0851eb634165c1dfa 10.3: Test needs to be moved to main/ directory. Patch: https://github.com/MariaDB/server/commit/833b123eec679980727bcaa1e2617e86b50972a1 The patch remains the same for higher versions.
          sujatha.sivakumar Sujatha Sivakumar (Inactive) made changes -
          issue.field.resolutiondate 2020-06-25 07:40:01.0 2020-06-25 07:40:01.507
          sujatha.sivakumar Sujatha Sivakumar (Inactive) made changes -
          Fix Version/s 10.1.46 [ 24308 ]
          Fix Version/s 10.2.33 [ 24307 ]
          Fix Version/s 10.3.24 [ 24306 ]
          Fix Version/s 10.4.14 [ 24305 ]
          Fix Version/s 10.5.5 [ 24423 ]
          Fix Version/s 10.2 [ 14601 ]
          Fix Version/s 10.1 [ 16100 ]
          Fix Version/s 10.3 [ 22126 ]
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.5 [ 23123 ]
          Resolution Fixed [ 1 ]
          Status Stalled [ 10000 ] Closed [ 6 ]

          Thank you all.

          Roel Roel Van de Paar added a comment - Thank you all.
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 109146 ] MariaDB v4 [ 157850 ]

          People

            sujatha.sivakumar Sujatha Sivakumar (Inactive)
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.