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

InnoDB: Failing assertion: table->data_dir_path

Details

    Description

      10.1 18de8296182f42cdf663573949a82950b72af8fc

      2017-03-10 16:42:18 7f88870e8b00  InnoDB: Assertion failure in thread 140224358157056 in file srv0start.cc line 3328
      InnoDB: Failing assertion: table->data_dir_path
       
      #5  0x00007f889591eb8b in abort () from /lib/x86_64-linux-gnu/libc.so.6
      #6  0x00007f8887463ff3 in srv_get_meta_data_filename (table=0x7f8874bbcbf8, filename=0x7f88870e5780 "\300Y\016\207\210\177", max_len=4000) at /home/elenst/git/10.1/storage/innobase/srv/srv0start.cc:3328
      #7  0x00007f888744efe9 in row_quiesce_table_complete (table=0x7f8874bbcbf8, trx=0x7f886451f478) at /home/elenst/git/10.1/storage/innobase/row/row0quiesce.cc:610
      #8  0x00007f888730dd80 in ha_innodb::external_lock (this=0x7f8868d29888, thd=0x7f886d6b5070, lock_type=2) at /home/elenst/git/10.1/storage/innobase/handler/ha_innodb.cc:14845
      #9  0x00007f88980e6532 in handler::ha_external_lock (this=0x7f8868d29888, thd=0x7f886d6b5070, lock_type=2) at /home/elenst/git/10.1/sql/handler.cc:5825
      #10 0x00007f88981c7886 in unlock_external (thd=0x7f886d6b5070, table=0x7f8863406ed8, count=1) at /home/elenst/git/10.1/sql/lock.cc:686
      #11 0x00007f88981c6e1e in mysql_unlock_tables (thd=0x7f886d6b5070, sql_lock=0x7f8863406eb0, free_lock=true) at /home/elenst/git/10.1/sql/lock.cc:398
      #12 0x00007f88981c6d99 in mysql_unlock_tables (thd=0x7f886d6b5070, sql_lock=0x7f8863406eb0) at /home/elenst/git/10.1/sql/lock.cc:388
      #13 0x00007f8897e30576 in close_thread_tables (thd=0x7f886d6b5070) at /home/elenst/git/10.1/sql/sql_base.cc:1028
      #14 0x00007f8897e33fc8 in Locked_tables_list::unlock_locked_tables (this=0x7f886d6b8928, thd=0x7f886d6b5070) at /home/elenst/git/10.1/sql/sql_base.cc:2824
      #15 0x00007f8897e9f3c7 in mysql_execute_command (thd=0x7f886d6b5070) at /home/elenst/git/10.1/sql/sql_parse.cc:4350
      #16 0x00007f8897ea859f in mysql_parse (thd=0x7f886d6b5070, rawbuf=0x7f8866038088 "UNLOCK TABLES /* QNO 2738 CON_ID 19 */", length=38, parser_state=0x7f88870e75c0) at /home/elenst/git/10.1/sql/sql_parse.cc:7343
      #17 0x00007f8897e9759b in dispatch_command (command=COM_QUERY, thd=0x7f886d6b5070, packet=0x7f886d6bb071 " UNLOCK TABLES /* QNO 2738 CON_ID 19 */ ", packet_length=40) at /home/elenst/git/10.1/sql/sql_parse.cc:1490
      #18 0x00007f8897e962f5 in do_command (thd=0x7f886d6b5070) at /home/elenst/git/10.1/sql/sql_parse.cc:1109
      #19 0x00007f8897fcd8d2 in do_handle_one_connection (thd_arg=0x7f886d6b5070) at /home/elenst/git/10.1/sql/sql_connect.cc:1349
      #20 0x00007f8897fcd636 in handle_one_connection (arg=0x7f886d6b5070) at /home/elenst/git/10.1/sql/sql_connect.cc:1261
      #21 0x00007f88962abe9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
      #22 0x00007f88959d8cbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
       
      Query (0x7f8866038088): UNLOCK TABLES /* QNO 2738 CON_ID 19 */
      Connection ID (thread ID): 31
      Status: NOT_KILLED
      

      perl /home/elenst/git/rqg/runall-new.pl --no-mask --seed=1489156838 --threads=8 --duration=600 --queries=100M --reporters=QueryTimeout,Backtrace,ErrorLog,Deadlock --validators=TransformerNoComparator --transformers=ExecuteAsDeleteReturning,ExecuteAsPreparedTwice,DisableOptimizations,EnableOptimizations,OrderBy --redefine=conf/mariadb/general-workarounds.yy --redefine=conf/mariadb/10.0-features-redefine.yy --mysqld=--log_output=FILE --mysqld=--slow_query_log --mysqld=--long_query_time=0.000001 --mysqld=--log_bin_trust_function_creators=1 --mysqld=--query_cache_size=64M --views --grammar=conf/runtime/connect_kill_sql.yy --gendata=conf/runtime/connect_kill_data.zz --engine=InnoDB --mysqld=--ignore-builtin-innodb --mysqld=--plugin-load=ha_innodb.so --rpl_mode=mixed --mysqld=--slave-skip-errors=1049,1305,1539,1505,1317 --use-gtid=current_pos --mysqld=--optimizer_switch=extended_keys=on,exists_to_in=on --mysqld=--use_stat_tables=PREFERABLY --mysqld=--optimizer_selectivity_sampling_limit=100 --mysqld=--optimizer_use_condition_selectivity=5 --mysqld=--histogram_size=100 --mysqld=--histogram_type=DOUBLE_PREC_HB --mysqld=--log_slow_verbosity=query_plan,explain --mysqld=--slave_parallel_threads=8 --mtr-build-thread=72 --basedir1=/home/elenst/git/10.1 --vardir1=/home/elenst/test_results/10.1.22-general-1/current1_1
      

      (Not reproducible so far)

      Attachments

        Issue Links

          Activity

            The MySQL 5.7 test innodb.innodb-multiple-tablespaces hits this assertion:

            		/* Determine the tablespace filename before we drop
            		dict_table_t.  Free this memory before returning. */
            		if (DICT_TF_HAS_DATA_DIR(table->flags)) {
            			dict_get_and_save_data_dir_path(table, true);
            			ut_a(table->data_dir_path);
            			filepath = fil_make_filepath(
            				table->data_dir_path,
            				table->name.m_name, IBD, true);
            

            You will have to adjust the test a little:

            --- ../mysql-5.7.26/mysql-test/suite/innodb/t/innodb-multiple-tablespaces.test
            +++ mysql-test/suite/innodb/t/innodb-multiple-tablespaces.test
            @@ -208,13 +208,13 @@
             
             --source suite/innodb/include/show_i_s_tablespaces.inc
             
            ---error ER_TABLESPACE_MISSING
            +--error ER_GET_ERRNO
             SELECT * FROM yyy;
            ---error ER_TABLESPACE_MISSING
            +--error ER_GET_ERRNO
             SELECT * FROM nyy;
            ---error ER_TABLESPACE_MISSING
            +--error ER_GET_ERRNO
             SELECT * FROM yny;
            ---error ER_TABLESPACE_MISSING
            +--error ER_GET_ERRNO
             SELECT * FROM yyn;
             SELECT * FROM nyw;
             SELECT * FROM nwy;
            @@ -222,19 +222,19 @@
             SELECT * FROM ynw;
             SELECT * FROM wyn;
             SELECT * FROM ywn;
            ---error ER_TABLESPACE_MISSING
            +--error ER_GET_ERRNO
             SELECT * FROM nnn;
            ---error ER_TABLESPACE_MISSING
            +--error ER_GET_ERRNO
             SELECT * FROM www;
             SELECT * FROM nolink;
             
            ---error ER_TABLESPACE_MISSING
            +--error ER_GET_ERRNO
             SHOW CREATE TABLE yyy;
            ---error ER_TABLESPACE_MISSING
            +--error ER_GET_ERRNO
             SHOW CREATE TABLE nyy;
            ---error ER_TABLESPACE_MISSING
            +--error ER_GET_ERRNO
             SHOW CREATE TABLE yny;
            ---error ER_TABLESPACE_MISSING
            +--error ER_GET_ERRNO
             SHOW CREATE TABLE yyn;
             --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
             SHOW CREATE TABLE nyw;
            @@ -246,9 +246,9 @@
             --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
             SHOW CREATE TABLE wyn;
             SHOW CREATE TABLE ywn;
            ---error ER_TABLESPACE_MISSING
            +--error ER_GET_ERRNO
             SHOW CREATE TABLE nnn;
            ---error ER_TABLESPACE_MISSING
            +--error ER_GET_ERRNO
             SHOW CREATE TABLE www;
             --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
             SHOW CREATE TABLE nolink;
            

            cat > mysql-test/suite/innodb/t/innodb-multiple-tablespaces.opt << EOF
            --innodb-sys-tablespaces
            --innodb-sys-datafiles
            EOF
            

            10.2 92feac53a649f39f81d10c8d0ea0353e7b3d8b92

            CURRENT_TEST: innodb.innodb-multiple-tablespaces
            mysqltest: At line 278: query 'DROP TABLE ynw' failed: 2013: Lost connection to MySQL server during query
            …
            2019-06-27 15:50:01 140467396024064 [Note] InnoDB: Removed datafile /dev/shm/10.2o/mysql-test/var/tmp/alt_dir/test/yyn.ibd for table test/yyn
            2019-06-27 15:50:01 0x7fc11d3e1700  InnoDB: Assertion failure in file /mariadb/10.2o/storage/innobase/row/row0mysql.cc line 3723
            InnoDB: Failing assertion: table->data_dir_path
            

            marko Marko Mäkelä added a comment - The MySQL 5.7 test innodb.innodb-multiple-tablespaces hits this assertion: /* Determine the tablespace filename before we drop dict_table_t. Free this memory before returning. */ if (DICT_TF_HAS_DATA_DIR(table->flags)) { dict_get_and_save_data_dir_path(table, true ); ut_a(table->data_dir_path); filepath = fil_make_filepath( table->data_dir_path, table->name.m_name, IBD, true ); You will have to adjust the test a little: --- ../mysql-5.7.26/mysql-test/suite/innodb/t/innodb-multiple-tablespaces.test +++ mysql-test/suite/innodb/t/innodb-multiple-tablespaces.test @@ -208,13 +208,13 @@ --source suite/innodb/include/show_i_s_tablespaces.inc ---error ER_TABLESPACE_MISSING +--error ER_GET_ERRNO SELECT * FROM yyy; ---error ER_TABLESPACE_MISSING +--error ER_GET_ERRNO SELECT * FROM nyy; ---error ER_TABLESPACE_MISSING +--error ER_GET_ERRNO SELECT * FROM yny; ---error ER_TABLESPACE_MISSING +--error ER_GET_ERRNO SELECT * FROM yyn; SELECT * FROM nyw; SELECT * FROM nwy; @@ -222,19 +222,19 @@ SELECT * FROM ynw; SELECT * FROM wyn; SELECT * FROM ywn; ---error ER_TABLESPACE_MISSING +--error ER_GET_ERRNO SELECT * FROM nnn; ---error ER_TABLESPACE_MISSING +--error ER_GET_ERRNO SELECT * FROM www; SELECT * FROM nolink; ---error ER_TABLESPACE_MISSING +--error ER_GET_ERRNO SHOW CREATE TABLE yyy; ---error ER_TABLESPACE_MISSING +--error ER_GET_ERRNO SHOW CREATE TABLE nyy; ---error ER_TABLESPACE_MISSING +--error ER_GET_ERRNO SHOW CREATE TABLE yny; ---error ER_TABLESPACE_MISSING +--error ER_GET_ERRNO SHOW CREATE TABLE yyn; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR SHOW CREATE TABLE nyw; @@ -246,9 +246,9 @@ --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR SHOW CREATE TABLE wyn; SHOW CREATE TABLE ywn; ---error ER_TABLESPACE_MISSING +--error ER_GET_ERRNO SHOW CREATE TABLE nnn; ---error ER_TABLESPACE_MISSING +--error ER_GET_ERRNO SHOW CREATE TABLE www; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR SHOW CREATE TABLE nolink; cat > mysql-test/suite/innodb/t/innodb-multiple-tablespaces.opt << EOF --innodb-sys-tablespaces --innodb-sys-datafiles EOF 10.2 92feac53a649f39f81d10c8d0ea0353e7b3d8b92 CURRENT_TEST: innodb.innodb-multiple-tablespaces mysqltest: At line 278: query 'DROP TABLE ynw' failed: 2013: Lost connection to MySQL server during query … 2019-06-27 15:50:01 140467396024064 [Note] InnoDB: Removed datafile /dev/shm/10.2o/mysql-test/var/tmp/alt_dir/test/yyn.ibd for table test/yyn 2019-06-27 15:50:01 0x7fc11d3e1700 InnoDB: Assertion failure in file /mariadb/10.2o/storage/innobase/row/row0mysql.cc line 3723 InnoDB: Failing assertion: table->data_dir_path

            The assertion failure in the Description should be related to FLUSH TABLES…FOR EXPORT.
            Unfortunately, the following statements will not crash when added before the DROP TABLE ynw;:

            FLUSH TABLES ynw FOR EXPORT;
            UNLOCK TABLES;
            

            But, if I add those lines, then DROP TABLE ynw will not crash, and instead DROP TABLE ywn will crash.
            If I also add similar lines for ywn, then it will avoid the crash and fail on the client side:

            /dev/shm/10.2o/client/mysqltest: Error on delete of '/dev/shm/10.2o/mysql-test/var/tmp/alt_dir/test/nyy.ibd' (Errcode: 2 "No such file or directory")
            mysqltest: At line 306: command "remove_file" failed with error: 1  my_errno: 2  errno: 2
            

            Hopefully, while analyzing and fixing the DROP TABLE crash, we will figure out a scenario for the FLUSH TABLES/UNLOCK TABLES crash.

            marko Marko Mäkelä added a comment - The assertion failure in the Description should be related to FLUSH TABLES…FOR EXPORT . Unfortunately, the following statements will not crash when added before the DROP TABLE ynw; : FLUSH TABLES ynw FOR EXPORT; UNLOCK TABLES; But, if I add those lines, then DROP TABLE ynw will not crash, and instead DROP TABLE ywn will crash. If I also add similar lines for ywn , then it will avoid the crash and fail on the client side: /dev/shm/10.2o/client/mysqltest: Error on delete of '/dev/shm/10.2o/mysql-test/var/tmp/alt_dir/test/nyy.ibd' (Errcode: 2 "No such file or directory") mysqltest: At line 306: command "remove_file" failed with error: 1 my_errno: 2 errno: 2 Hopefully, while analyzing and fixing the DROP TABLE crash, we will figure out a scenario for the FLUSH TABLES / UNLOCK TABLES crash.

            The DROP TABLE crash is actually MDEV-14418.

            marko Marko Mäkelä added a comment - The DROP TABLE crash is actually MDEV-14418 .

            People

              vlad.lesin Vladislav Lesin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.