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

Server crashes when truncate mysql user table

    XMLWordPrintable

Details

    Description

      TRUNCATE TABLE mysql.user; 
      

      10.6.0 b19ec8848c9463b86d62601dffb67c75e3dfbd70 (Debug)

      mysqld: /test/10.6_dbg/sql/sql_truncate.cc:316: bool Sql_cmd_truncate_table::lock_table(THD*, TABLE_LIST*, bool*): Assertion `table_ref->next_global == __null' failed.
      

      10.6.0 b19ec8848c9463b86d62601dffb67c75e3dfbd70 (Debug)

      Core was generated by `/test/GAL_MD120221-mariadb-10.6.0-linux-x86_64-dbg/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 0x14c2f0aa6700 (LWP 1993595))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000557230a4ce4f in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x00005572301e02e5 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x000014c302ed4859 in __GI_abort () at abort.c:79
      #6  0x000014c302ed4729 in __assert_fail_base (fmt=0x14c30306a588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x557230c04028 "table_ref->next_global == __null", file=0x557230c03e78 "/test/10.6_dbg/sql/sql_truncate.cc", line=316, function=<optimized out>) at assert.c:92
      #7  0x000014c302ee5f36 in __GI___assert_fail (assertion=assertion@entry=0x557230c04028 "table_ref->next_global == __null", file=file@entry=0x557230c03e78 "/test/10.6_dbg/sql/sql_truncate.cc", line=line@entry=316, function=function@entry=0x557230c03f90 "bool Sql_cmd_truncate_table::lock_table(THD*, TABLE_LIST*, bool*)") at assert.c:101
      #8  0x00005572300a8884 in Sql_cmd_truncate_table::lock_table (this=this@entry=0x14c28c012e60, thd=thd@entry=0x14c28c000db8, table_ref=table_ref@entry=0x14c28c012790, hton_can_recreate=hton_can_recreate@entry=0x14c2f0aa4c30) at /test/10.6_dbg/sql/sql_truncate.cc:316
      #9  0x00005572300a8b59 in Sql_cmd_truncate_table::truncate_table (this=this@entry=0x14c28c012e60, thd=thd@entry=0x14c28c000db8, table_ref=table_ref@entry=0x14c28c012790) at /test/10.6_dbg/sql/sql_truncate.cc:449
      #10 0x00005572300a8f72 in Sql_cmd_truncate_table::execute (this=0x14c28c012e60, thd=0x14c28c000db8) at /test/10.6_dbg/sql/sql_truncate.cc:531
      #11 0x000055722ff1ff8d in mysql_execute_command (thd=thd@entry=0x14c28c000db8) at /test/10.6_dbg/sql/sql_parse.cc:5880
      #12 0x000055722ff06aaa in mysql_parse (thd=thd@entry=0x14c28c000db8, rawbuf=rawbuf@entry=0x14c28c0126c0 "TRUNCATE TABLE mysql.user", length=length@entry=25, parser_state=parser_state@entry=0x14c2f0aa53d0) at /test/10.6_dbg/sql/sql_parse.cc:7906
      #13 0x000055722ff06406 in wsrep_mysql_parse (thd=thd@entry=0x14c28c000db8, rawbuf=0x14c28c0126c0 "TRUNCATE TABLE mysql.user", length=25, parser_state=parser_state@entry=0x14c2f0aa53d0) at /test/10.6_dbg/sql/sql_parse.cc:7720
      #14 0x000055722ff14c7c in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14c28c000db8, packet=packet@entry=0x14c28c008d39 "TRUNCATE TABLE mysql.user", packet_length=packet_length@entry=25) at /test/10.6_dbg/sql/sql_class.h:1295
      #15 0x000055722ff17fa4 in do_command (thd=0x14c28c000db8) at /test/10.6_dbg/sql/sql_parse.cc:1365
      #16 0x0000557230074ef2 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x557232897148, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #17 0x00005572300755f9 in handle_one_connection (arg=arg@entry=0x557232897148) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #18 0x000055723052bf35 in pfs_spawn_thread (arg=0x557232925898) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #19 0x000014c3033e2609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #20 0x000014c302fd1293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.5.9 7fb528d7226819063046c6a70a21511b3620e844 (Debug)

      mysqld: /test/10.5_dbg/sql/sql_truncate.cc:316: bool Sql_cmd_truncate_table::lock_table(THD*, TABLE_LIST*, bool*): Assertion `table_ref->next_global == __null' failed.
      

      10.5.9 7fb528d7226819063046c6a70a21511b3620e844 (Debug)

      Core was generated by `/test/GAL_MD120221-mariadb-10.5.9-linux-x86_64-dbg/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 0x152558859700 (LWP 2062544))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x00005570fc823957 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:424
      #2  0x00005570fbf72e9f 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:50
      #5  0x000015256bc9f859 in __GI_abort () at abort.c:79
      #6  0x000015256bc9f729 in __assert_fail_base (fmt=0x15256be35588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5570fc9dac08 "table_ref->next_global == __null", file=0x5570fc9daa58 "/test/10.5_dbg/sql/sql_truncate.cc", line=316, function=<optimized out>) at assert.c:92
      #7  0x000015256bcb0f36 in __GI___assert_fail (assertion=assertion@entry=0x5570fc9dac08 "table_ref->next_global == __null", file=file@entry=0x5570fc9daa58 "/test/10.5_dbg/sql/sql_truncate.cc", line=line@entry=316, function=function@entry=0x5570fc9dab70 "bool Sql_cmd_truncate_table::lock_table(THD*, TABLE_LIST*, bool*)") at assert.c:101
      #8  0x00005570fbe3b142 in Sql_cmd_truncate_table::lock_table (this=this@entry=0x1525000130d0, thd=thd@entry=0x152500000db8, table_ref=table_ref@entry=0x152500012a00, hton_can_recreate=hton_can_recreate@entry=0x152558857c00) at /test/10.5_dbg/sql/sql_truncate.cc:316
      #9  0x00005570fbe3b417 in Sql_cmd_truncate_table::truncate_table (this=this@entry=0x1525000130d0, thd=thd@entry=0x152500000db8, table_ref=table_ref@entry=0x152500012a00) at /test/10.5_dbg/sql/sql_truncate.cc:449
      #10 0x00005570fbe3b830 in Sql_cmd_truncate_table::execute (this=0x1525000130d0, thd=0x152500000db8) at /test/10.5_dbg/sql/sql_truncate.cc:531
      #11 0x00005570fbcb2d03 in mysql_execute_command (thd=thd@entry=0x152500000db8) at /test/10.5_dbg/sql/sql_parse.cc:6023
      #12 0x00005570fbc991d5 in mysql_parse (thd=thd@entry=0x152500000db8, rawbuf=rawbuf@entry=0x152500012930 "TRUNCATE TABLE mysql.user", length=length@entry=25, parser_state=parser_state@entry=0x1525588583d0, 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:8062
      #13 0x00005570fbc98b00 in wsrep_mysql_parse (thd=thd@entry=0x152500000db8, rawbuf=0x152500012930 "TRUNCATE TABLE mysql.user", length=25, parser_state=parser_state@entry=0x1525588583d0, 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:7865
      #14 0x00005570fbca75da in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x152500000db8, packet=packet@entry=0x152500008fa9 "TRUNCATE TABLE mysql.user", packet_length=packet_length@entry=25, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_class.h:1257
      #15 0x00005570fbcaad10 in do_command (thd=0x152500000db8) at /test/10.5_dbg/sql/sql_parse.cc:1370
      #16 0x00005570fbe0782c in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5571000c9c88, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1410
      #17 0x00005570fbe07f33 in handle_one_connection (arg=arg@entry=0x5571000c9c88) at /test/10.5_dbg/sql/sql_connect.cc:1312
      #18 0x00005570fc2bff89 in pfs_spawn_thread (arg=0x557100145348) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #19 0x000015256c1ad609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #20 0x000015256bd9c293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.4.18 542d769ea1a22a7a6a87c9fe76ff911a162ade44 (Debug)

      mysqld: /test/10.4_dbg/sql/sql_truncate.cc:310: bool Sql_cmd_truncate_table::lock_table(THD*, TABLE_LIST*, bool*): Assertion `table_ref->next_global == __null' failed.
      

      10.4.18 542d769ea1a22a7a6a87c9fe76ff911a162ade44 (Debug)

      Core was generated by `/test/GAL_MD120221-mariadb-10.4.18-linux-x86_64-dbg/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 0x14d82c0df700 (LWP 2130763))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x00005627bf77cd6d in my_write_core (sig=sig@entry=6) at /test/10.4_dbg/mysys/stacktrace.c:386
      #2  0x00005627bee8ba35 in handle_fatal_signal (sig=6) at /test/10.4_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  0x000014d83033c859 in __GI_abort () at abort.c:79
      #6  0x000014d83033c729 in __assert_fail_base (fmt=0x14d8304d2588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5627bf899e58 "table_ref->next_global == __null", file=0x5627bf899ca8 "/test/10.4_dbg/sql/sql_truncate.cc", line=310, function=<optimized out>) at assert.c:92
      #7  0x000014d83034df36 in __GI___assert_fail (assertion=assertion@entry=0x5627bf899e58 "table_ref->next_global == __null", file=file@entry=0x5627bf899ca8 "/test/10.4_dbg/sql/sql_truncate.cc", line=line@entry=310, function=function@entry=0x5627bf899dc0 "bool Sql_cmd_truncate_table::lock_table(THD*, TABLE_LIST*, bool*)") at assert.c:101
      #8  0x00005627bed31d41 in Sql_cmd_truncate_table::lock_table (this=this@entry=0x14d79c012688, thd=thd@entry=0x14d79c000d90, table_ref=table_ref@entry=0x14d79c011fc8, hton_can_recreate=hton_can_recreate@entry=0x14d82c0dc980) at /test/10.4_dbg/sql/sql_truncate.cc:310
      #9  0x00005627bed32003 in Sql_cmd_truncate_table::truncate_table (this=this@entry=0x14d79c012688, thd=thd@entry=0x14d79c000d90, table_ref=table_ref@entry=0x14d79c011fc8) at /test/10.4_dbg/sql/sql_truncate.cc:437
      #10 0x00005627bed32408 in Sql_cmd_truncate_table::execute (this=0x14d79c012688, thd=0x14d79c000d90) at /test/10.4_dbg/sql/sql_truncate.cc:519
      #11 0x00005627bebbf39d in mysql_execute_command (thd=thd@entry=0x14d79c000d90) at /test/10.4_dbg/sql/sql_parse.cc:6160
      #12 0x00005627bebc18e1 in mysql_parse (thd=thd@entry=0x14d79c000d90, rawbuf=rawbuf@entry=0x14d79c011ef8 "TRUNCATE TABLE mysql.user", length=length@entry=25, parser_state=parser_state@entry=0x14d82c0de490, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7958
      #13 0x00005627bebc297b in wsrep_mysql_parse (thd=thd@entry=0x14d79c000d90, rawbuf=0x14d79c011ef8 "TRUNCATE TABLE mysql.user", length=25, parser_state=parser_state@entry=0x14d82c0de490, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7762
      #14 0x00005627bebc41af in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14d79c000d90, packet=packet@entry=0x14d79c01c4b1 "TRUNCATE TABLE mysql.user", packet_length=packet_length@entry=25, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_class.h:1170
      #15 0x00005627bebc7938 in do_command (thd=0x14d79c000d90) at /test/10.4_dbg/sql/sql_parse.cc:1373
      #16 0x00005627bed016db in do_handle_one_connection (connect=connect@entry=0x5627c185a7d0) at /test/10.4_dbg/sql/sql_connect.cc:1412
      #17 0x00005627bed017fa in handle_one_connection (arg=0x5627c185a7d0) at /test/10.4_dbg/sql/sql_connect.cc:1316
      #18 0x000014d8308f9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #19 0x000014d830439293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.6.0 (dbg), 10.5.9 (dbg), 10.4.18 (dbg)

      Bug confirmed not present in:
      MariaDB: 10.2.37 (dbg), 10.3.28 (dbg)

      Attachments

        Activity

          People

            jplindst Jan Lindström (Inactive)
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.