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

InnoDB: Failing assertion: space->n_pending_ops == 0 in fil_delete_tablespace upon DROP TABLE

    XMLWordPrintable

Details

    Description

      Note: The problem was initially observed on 10.3, but the test below only reproduces it on 10.2, but not on 10.3 (neither on the current branch, nor on the revision bb5f4967 where it was first observed, and stack trace from which is attached). It doesn't mean that it doesn't exist there, the failure is generally poorly reproducible, that's why the duration in the command line is so high. Currently for me it usually takes 10-20 minutes, but sometimes it can be hours. I suppose it can also vary a lot, depending on the build and the machine.

      10.2 f127fb98

      2019-11-13 18:21:52 0x7f5d80312700  InnoDB: Assertion failure in file /data/src/10.2/storage/innobase/fil/fil0fil.cc line 2956
      InnoDB: Failing assertion: space->n_pending_ops == 0
       
      #6  0x000055c8fc37c982 in ut_dbg_assertion_failed (expr=0x55c8fc99d539 "space->n_pending_ops == 0", file=0x55c8fc99c0a8 "/data/src/10.2/storage/innobase/fil/fil0fil.cc", line=2956) at /data/src/10.2/storage/innobase/ut/ut0dbg.cc:60
      #7  0x000055c8fc465625 in fil_delete_tablespace (id=10643, drop_ahi=false) at /data/src/10.2/storage/innobase/fil/fil0fil.cc:2956
      #8  0x000055c8fc2b2c34 in row_drop_single_table_tablespace (space_id=10643, tablename=0x7f5d0c0fa888 "test/t8464", filepath=0x7f5d0c0605b0 "./test/t8464.ibd", table_flags=33) at /data/src/10.2/storage/innobase/row/row0mysql.cc:3231
      #9  0x000055c8fc2b3f36 in row_drop_table_for_mysql (name=0x7f5d8030e820 "test/t8464", trx=0x7f5d807995e0, sqlcom=SQLCOM_DROP_TABLE, create_failed=false, nonatomic=true) at /data/src/10.2/storage/innobase/row/row0mysql.cc:3737
      #10 0x000055c8fc190a56 in ha_innobase::delete_table (this=0x7f5d0c011978, name=0x7f5d80310390 "./test/t8464", sqlcom=SQLCOM_DROP_TABLE) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:13158
      #11 0x000055c8fc17b3e8 in ha_innobase::delete_table (this=0x7f5d0c011978, name=0x7f5d80310390 "./test/t8464") at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:13283
      #12 0x000055c8fbf6a6dc in handler::ha_delete_table (this=0x7f5d0c011978, name=0x7f5d80310390 "./test/t8464") at /data/src/10.2/sql/handler.cc:4454
      #13 0x000055c8fbf64f2e in ha_delete_table (thd=0x7f5d0c000af0, table_type=0x55c8fe3078b0, path=0x7f5d80310390 "./test/t8464", db=0x7f5d0c011748 "test", alias=0x7f5d0c0110f8 "t8464", generate_warning=true) at /data/src/10.2/sql/handler.cc:2436
      #14 0x000055c8fbda5bf0 in mysql_rm_table_no_locks (thd=0x7f5d0c000af0, tables=0x7f5d0c011130, if_exists=false, drop_temporary=false, drop_view=false, dont_log_query=false, dont_free_locks=false) at /data/src/10.2/sql/sql_table.cc:2447
      #15 0x000055c8fbda4eed in mysql_rm_table (thd=0x7f5d0c000af0, tables=0x7f5d0c011130, if_exists=0 '\000', drop_temporary=0 '\000') at /data/src/10.2/sql/sql_table.cc:2089
      #16 0x000055c8fbce3988 in mysql_execute_command (thd=0x7f5d0c000af0) at /data/src/10.2/sql/sql_parse.cc:4506
      #17 0x000055c8fbcedd3e in mysql_parse (thd=0x7f5d0c000af0, rawbuf=0x7f5d0c011028 "DROP TABLE t8464 /* QNO 13016 CON_ID 14 */", length=42, parser_state=0x7f5d80311250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7740
      #18 0x000055c8fbcdc059 in dispatch_command (command=COM_QUERY, thd=0x7f5d0c000af0, packet=0x7f5d0c0087b1 " DROP TABLE t8464 /* QNO 13016 CON_ID 14 */ ", packet_length=44, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1831
      #19 0x000055c8fbcda9ad in do_command (thd=0x7f5d0c000af0) at /data/src/10.2/sql/sql_parse.cc:1384
      #20 0x000055c8fbe30075 in do_handle_one_connection (connect=0x55c8fec64ce0) at /data/src/10.2/sql/sql_connect.cc:1336
      #21 0x000055c8fbe2fde0 in handle_one_connection (arg=0x55c8fec64ce0) at /data/src/10.2/sql/sql_connect.cc:1241
      #22 0x00007f5d846914a4 in start_thread (arg=0x7f5d80312700) at pthread_create.c:456
      #23 0x00007f5d82bd8d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Query (0x7f5d0c011028): DROP TABLE t8464 /* QNO 13016 CON_ID 14 */
      Connection ID (thread ID): 14
      Status: NOT_KILLED
      

      RQG grammar pending_ops.yy

      query_init:
          { $tname= 't'.abs($$); '' } ;
       
      query:
            CREATE TABLE $tname SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_SCRUBBING LIMIT _digit
          ; INSERT INTO $tname SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_SCRUBBING LIMIT _digit
          ; DELETE FROM $tname
          ; REPLACE INTO $tname SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_SCRUBBING LIMIT _digit
          ; DROP TABLE $tname
      ;
      

      Command line

      perl runall-new.pl --basedir=<your basedir>  --grammar=pending_ops.yy --duration=14400 --threads=4 --vardir=/dev/shm//var_pending --skip-gendata --reporters=Backtrace,ErrorLog
      

      Remember to set the correct basedir.

      Attachments

        1. threads
          64 kB
          Elena Stepanova

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.