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

Crash in CREATE OR REPLACE SEQUENCE when new sequence cannot be created

    XMLWordPrintable

Details

    • Not for Release Notes

    Description

      bb-main-atomic 472bcbaf496b93cbb847346639bb38011ca2014b

      mysqld: /data/MDEV-38479/bb-main-atomic/sql/ddl_log.cc:1204: int execute_drop_table(THD*, handlerton*, const LEX_CSTRING*, const LEX_CSTRING*, const char*): Assertion `!tdc_share_is_cached(thd, db->str, table->str)' failed.
      260104 17:48:08 [ERROR] /data/MDEV-38479/bb-main-atomic/sql/mysqld got signal 6 ;
       
      (rr) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      #3  0x00006b3d64e6927e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #4  0x00006b3d64e4c8ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x00006b3d64e4c81b in __assert_fail_base (fmt=0x6b3d64ff41e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
          assertion=assertion@entry=0x650d802b6420 "!tdc_share_is_cached(thd, db->str, table->str)", file=file@entry=0x650d802b5e30 "/data/MDEV-38479/bb-main-atomic/sql/ddl_log.cc", 
          line=line@entry=1204, function=function@entry=0x650d802b6450 "int execute_drop_table(THD*, handlerton*, const LEX_CSTRING*, const LEX_CSTRING*, const char*)") at ./assert/assert.c:96
      #6  0x00006b3d64e5f517 in __assert_fail (assertion=0x650d802b6420 "!tdc_share_is_cached(thd, db->str, table->str)", file=0x650d802b5e30 "/data/MDEV-38479/bb-main-atomic/sql/ddl_log.cc", 
          line=1204, function=0x650d802b6450 "int execute_drop_table(THD*, handlerton*, const LEX_CSTRING*, const LEX_CSTRING*, const char*)") at ./assert/assert.c:105
      #7  0x0000650d7f3513a2 in execute_drop_table (thd=0x74f268000dc8, hton=0x650dbb9bbf28, db=0x650d822e9840, table=0x650d822e9850, path=0x650dbbc5021e "./simple_db/CreateOrReplaceTable3495196")
          at /data/MDEV-38479/bb-main-atomic/sql/ddl_log.cc:1204
      #8  0x0000650d7f35352e in ddl_log_execute_action (thd=0x74f268000dc8, mem_root=0x650d822e9db0, ddl_log_entry=0x650d822e9df0) at /data/MDEV-38479/bb-main-atomic/sql/ddl_log.cc:1883
      #9  0x0000650d7f3554e7 in ddl_log_execute_entry_no_lock (thd=0x74f268000dc8, first_entry=12) at /data/MDEV-38479/bb-main-atomic/sql/ddl_log.cc:2545
      #10 0x0000650d7f356a9f in ddl_log_revert (thd=0x74f268000dc8, state=0x650d822ea220) at /data/MDEV-38479/bb-main-atomic/sql/ddl_log.cc:3081
      #11 0x0000650d7f313542 in mysql_create_table_no_lock (thd=0x74f268000dc8, ddl_log_state_create=0x650d822ea220, ddl_log_state_rm=0x650d822ea240, create_info=0x650d822ea5e0, 
          alter_info=0x650d822ea460, is_trans=0x650d822ea213, create_table_mode=0, table_list=0x74f268016f48) at /data/MDEV-38479/bb-main-atomic/sql/sql_table.cc:5482
      #12 0x0000650d7f313db9 in mysql_create_table (thd=0x74f268000dc8, create_table=0x74f268016f48, create_info=0x650d822ea5e0, alter_info=0x650d822ea460)
          at /data/MDEV-38479/bb-main-atomic/sql/sql_table.cc:5694
      #13 0x0000650d7f32edef in Sql_cmd_create_table_like::execute (this=0x74f268016f00, thd=0x74f268000dc8) at /data/MDEV-38479/bb-main-atomic/sql/sql_table.cc:14122
      #14 0x0000650d7f1d9f10 in mysql_execute_command (thd=0x74f268000dc8, is_called_from_prepared_stmt=false) at /data/MDEV-38479/bb-main-atomic/sql/sql_parse.cc:5861
      #15 0x0000650d7f1e0487 in mysql_parse (thd=0x74f268000dc8, rawbuf=0x74f268016d10 "/* WRK-2 QNO 5043 */  CREATE OR REPLACE SEQUENCE `simple_db`.`CreateOrReplaceTable3495196`", length=90, 
          parser_state=0x650d822eb2b0) at /data/MDEV-38479/bb-main-atomic/sql/sql_parse.cc:7895
      #16 0x0000650d7f1cc2a9 in dispatch_command (command=COM_QUERY, thd=0x74f268000dc8, 
          packet=0x74f26800c0e9 "/* WRK-2 QNO 5043 */  CREATE OR REPLACE SEQUENCE `simple_db`.`CreateOrReplaceTable3495196` ", packet_length=91, blocking=true)
          at /data/MDEV-38479/bb-main-atomic/sql/sql_parse.cc:1878
      #17 0x0000650d7f1cabed in do_command (thd=0x74f268000dc8, blocking=true) at /data/MDEV-38479/bb-main-atomic/sql/sql_parse.cc:1417
      #18 0x0000650d7f3e6a85 in do_handle_one_connection (connect=0x650dbc44e6b8, put_in_cache=true) at /data/MDEV-38479/bb-main-atomic/sql/sql_connect.cc:1503
      #19 0x0000650d7f3e67fa in handle_one_connection (arg=0x650dbc44e6b8) at /data/MDEV-38479/bb-main-atomic/sql/sql_connect.cc:1415
      #20 0x0000650d7fa2f0b2 in pfs_spawn_thread (arg=0x650dbc44e798) at /data/MDEV-38479/bb-main-atomic/storage/perfschema/pfs.cc:2198
      #21 0x00006b3d64ec0aa4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
      #22 0x00006b3d64f4da64 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
       
      Connection ID (thread ID): 6
      Status: KILL_SERVER
      Query (0x74f268016d10): /* WRK-2 QNO 5043 */  CREATE OR REPLACE SEQUENCE `simple_db`.`CreateOrReplaceTable3495196`
      

      The concurrent test

      https://github.com/MariaDB/randgen 31641742ea7a93e9799e086ac72b5b133562637b

      perl ./run.pl --base-port=12120  --basedir=/data/MDEV-38479/bb-main-atomic --compatibility=999999 --duration=200 --engine=InnoDB  --gendata=simple --grammar=conf/preview/cor.yy:2    --mysqld=--innodb-lock-wait-timeout=5 --mysqld=--lock-wait-timeout=10 --mysqld=--max-statement-time=20  --mysqld=--plugin-maturity=experimental   --queries=1000000 --reporters=Backtrace  --scenario=Restart --threads=6 --vardir=/data/MDEV-38479/var-rr  --seed=1767454216 --trials=10 --output="execute_drop_table" --rr
      

      It usually fails for me in 5-10 trials (the command line is set to 10 trials).
      The test is rr-able, the rr profile will be provided.

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              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.