Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3841 LevelDB storage engine
  3. MDEV-3965

[recreate] Server hangs or assertion `slice->size() == table->s->reclength' fails on a table created instead of a dropped one

    XMLWordPrintable

Details

    • Technical task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      Scenario 1 - server hangs on the second DROP TABLE:

      CREATE TABLE t1 (b CHAR(1) PRIMARY KEY) ENGINE=LevelDB;
      INSERT INTO t1 VALUES ('a');
      DROP TABLE t1;
       
      CREATE TABLE t1 (c CHAR(64) PRIMARY KEY) ENGINE=LevelDB;
      INSERT INTO t1 VALUES ('val');
      DROP TABLE t1;

      client/mysql -uroot --protocol=tcp --port=3306 -A -e "show processlist"
      +----+------+-----------------+------+---------+------+----------------------+------------------+
      | Id | User | Host            | db   | Command | Time | State                | Info             |
      +----+------+-----------------+------+---------+------+----------------------+------------------+
      |  2 | root | localhost:45107 | NULL | Query   |    0 | init                 | show processlist |
      |  1 | root | localhost       | test | Query   |   42 | checking permissions | DROP TABLE t1    |
      +----+------+-----------------+------+---------+------+----------------------+------------------+

      Stack trace of the hanging thread:

      #0  0xb7419388 in __memcpy_ia32 () from /lib/libc.so.6
      #1  0xb764171b in std::string::_M_replace_safe(unsigned int, unsigned int, char const*, unsigned int) () from /usr/lib/libstdc++.so.6
      #2  0xb764178b in std::string::assign(char const*, unsigned int) () from /usr/lib/libstdc++.so.6
      #3  0xb76dd868 in leveldb::(anonymous namespace)::DBIter::Next() () from leveldb-1.7.0/libleveldb.so.1
      #4  0x0891d174 in ha_leveldb::delete_table (this=0xb6a18758, tablename=0xa59fd86d "test/t1") at mysql-5.6-leveldb/storage/leveldb/ha_leveldb.cc:1151
      #5  0x082520de in handler::ha_delete_table (this=0xb6a18758, name=0xa59fd86b "./test/t1") at mysql-5.6-leveldb/sql/handler.cc:4360
      #6  0x0824d8b6 in ha_delete_table (thd=0xb629570, table_type=0xb120458, path=0xa59fd86b "./test/t1", db=0xb6a18590 "test", alias=0xb6a181a0 "t1", generate_warning=true) at mysql-5.6-leveldb/sql/handler.cc:2266
      #7  0x083fbfad in mysql_rm_table_no_locks (thd=0xb629570, tables=0xb6a181c8, if_exists=false, drop_temporary=false, drop_view=false, dont_log_query=false) at mysql-5.6-leveldb/sql/sql_table.cc:2428
      #8  0x083fb51e in mysql_rm_table (thd=0xb629570, tables=0xb6a181c8, if_exists=0 '\000', drop_temporary=0 '\000') at mysql-5.6-leveldb/sql/sql_table.cc:2124
      #9  0x083a7d2f in mysql_execute_command (thd=0xb629570) at mysql-5.6-leveldb/sql/sql_parse.cc:3542
      #10 0x083ae558 in mysql_parse (thd=0xb629570, rawbuf=0xb6a18130 "DROP TABLE t1", length=13, parser_state=0xa59fe758) at mysql-5.6-leveldb/sql/sql_parse.cc:6097
      #11 0x083a2f3e in dispatch_command (command=COM_QUERY, thd=0xb629570, packet=0xb6f9011 "DROP TABLE t1", packet_length=13) at mysql-5.6-leveldb/sql/sql_parse.cc:1312
      #12 0x083a236e in do_command (thd=0xb629570) at mysql-5.6-leveldb/sql/sql_parse.cc:1036
      #13 0x08371d29 in do_handle_one_connection (thd_arg=0xb629570) at mysql-5.6-leveldb/sql/sql_connect.cc:969
      #14 0x083718d2 in handle_one_connection (arg=0xb629570) at mysql-5.6-leveldb/sql/sql_connect.cc:885
      #15 0x08650747 in pfs_spawn_thread (arg=0xb6d3a68) at mysql-5.6-leveldb/storage/perfschema/pfs.cc:1853
      #16 0xb7717e32 in start_thread () from /lib/libpthread.so.0

      Scenario 2 - assertion fails on SELECT:

      CREATE TABLE t1 (b CHAR(1) PRIMARY KEY) ENGINE=LevelDB;
      INSERT INTO t1 VALUES ('a');
      DROP TABLE t1;
       
      CREATE TABLE t1 (c CHAR(64) PRIMARY KEY) ENGINE=LevelDB;
      INSERT INTO t1 VALUES ('val');
      SELECT * FROM t1;

      mysqld: mysql-5.6-leveldb/storage/leveldb/ha_leveldb.cc:543: void ha_leveldb::convert_record_from_storage_format(leveldb::Slice*): Assertion `slice->size() == table->s->reclength' failed.
      mysqld got signal 6 ;

      #9  0xb73c8167 in __assert_fail () from /lib/libc.so.6
      #10 0x0891b8d2 in ha_leveldb::convert_record_from_storage_format (this=0x9a042b8, slice=0xaf85376c) at mysql-5.6-leveldb/storage/leveldb/ha_leveldb.cc:543
      #11 0x0891c4fe in ha_leveldb::rnd_next (this=0x9a042b8, buf=0x9a04470 "\377", ' ' <repeats 64 times>"\217, \217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\bE\240\t") at mysql-5.6-leveldb/storage/leveldb/ha_leveldb.cc:825
      #12 0x0824e840 in handler::ha_rnd_next (this=0x9a042b8, buf=0x9a04470 "\377", ' ' <repeats 64 times>"\217, \217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\bE\240\t") at mysql-5.6-leveldb/sql/handler.cc:2603
      #13 0x08514226 in rr_sequential (info=0x99c34e0) at mysql-5.6-leveldb/sql/records.cc:478
      #14 0x0837f683 in join_init_read_record (tab=0x99c3494) at mysql-5.6-leveldb/sql/sql_executor.cc:2373
      #15 0x0837d0d4 in sub_select (join=0x99c2b78, join_tab=0x99c3494, end_of_records=false) at mysql-5.6-leveldb/sql/sql_executor.cc:1246
      #16 0x0837cba4 in do_select (join=0x99c2b78) at mysql-5.6-leveldb/sql/sql_executor.cc:933
      #17 0x0837adc3 in JOIN::exec (this=0x99c2b78) at mysql-5.6-leveldb/sql/sql_executor.cc:191
      #18 0x083cd6e5 in mysql_execute_select (thd=0x991eaf0, select_lex=0x9920638, free_join=true) at mysql-5.6-leveldb/sql/sql_select.cc:1085
      #19 0x083cd9f9 in mysql_select (thd=0x991eaf0, tables=0x99c2718, wild_num=1, fields=..., conds=0x0, order=0x992072c, group=0x99206c8, having=0x0, select_options=2147748608, result=0x99c2b60, unit=0x99201e0, select_lex=0x9920638) at mysql-5.6-leveldb/sql/sql_select.cc:1206
      #20 0x083cbda0 in handle_select (thd=0x991eaf0, result=0x99c2b60, setup_tables_done_option=0) at mysql-5.6-leveldb/sql/sql_select.cc:110
      #21 0x083ac34f in execute_sqlcom_select (thd=0x991eaf0, all_tables=0x99c2718) at mysql-5.6-leveldb/sql/sql_parse.cc:4982
      #22 0x083a56f3 in mysql_execute_command (thd=0x991eaf0) at mysql-5.6-leveldb/sql/sql_parse.cc:2552
      #23 0x083ae558 in mysql_parse (thd=0x991eaf0, rawbuf=0x99c25c8 "SELECT * FROM t1", length=16, parser_state=0xaf854758) at mysql-5.6-leveldb/sql/sql_parse.cc:6097
      #24 0x083a2f3e in dispatch_command (command=COM_QUERY, thd=0x991eaf0, packet=0x99be2e9 "", packet_length=16) at mysql-5.6-leveldb/sql/sql_parse.cc:1312
      #25 0x083a236e in do_command (thd=0x991eaf0) at mysql-5.6-leveldb/sql/sql_parse.cc:1036
      #26 0x08371d29 in do_handle_one_connection (thd_arg=0x991eaf0) at mysql-5.6-leveldb/sql/sql_connect.cc:969
      #27 0x083718d2 in handle_one_connection (arg=0x991eaf0) at mysql-5.6-leveldb/sql/sql_connect.cc:885
      #28 0x08650747 in pfs_spawn_thread (arg=0x991c0d8) at mysql-5.6-leveldb/storage/perfschema/pfs.cc:1853
      #29 0xb771ce32 in start_thread () from /lib/libpthread.so.0

      revision-id: psergey@askmonty.org-20121221181426-m94ou0fykf40dfno
      date: 2012-12-21 22:14:26 +0400
      build-date: 2012-12-22 03:48:59 +0400
      revno: 4477
      branch: mysql-5.6-leveldb

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            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.