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

Assertion `vfield' failed in TABLE::update_virtual_fields after crash recovery on corrupted MyISAM table

    XMLWordPrintable

Details

    Description

      CREATE TABLE t1 (
        pk INT AUTO_INCREMENT,
        b BIT DEFAULT NULL,
        PRIMARY KEY (pk),
        KEY(b)
      ) ENGINE=MyISAM;
      	
      INSERT INTO t1 VALUES (NULL, 0);
      --let $shutdown_timeout= 0
      --source include/restart_mysqld.inc
      DELETE FROM t1;
      DROP TABLE t1;
      

      10.2 348ccb6f038a6

      Version: '10.2.4-MariaDB-debug-log'  socket: '/data/bld/10.2/mysql-test/var/tmp/mysqld.1.sock'  port: 16000  Source distribution
      2017-01-09 18:57:25 139854912324352 [ERROR] mysqld: Table './test/t1' is marked as crashed and should be repaired
      2017-01-09 18:57:25 139854912324352 [Warning] Checking table:   './test/t1'
      mysqld: /data/src/10.2/sql/table.cc:7327: int TABLE::update_virtual_fields(enum_vcol_update_mode): Assertion `vfield' failed.
      170109 18:57:25 [ERROR] mysqld got signal 6 ;
      

      #7  0x00007f327e9df312 in __GI___assert_fail (assertion=0x7f3281f60f2c "vfield", file=0x7f3281f5f12a "/data/src/10.2/sql/table.cc", line=7327, function=0x7f3281f624c0 <TABLE::update_virtual_fields(enum_vcol_update_mode)::__PRETTY_FUNCTION__> "int TABLE::update_virtual_fields(enum_vcol_update_mode)") at assert.c:101
      #8  0x00007f32815c71d0 in TABLE::update_virtual_fields (this=0x7f3275cdbc70, update_mode=VCOL_UPDATE_INDEXED) at /data/src/10.2/sql/table.cc:7327
      #9  0x00007f3281df9a63 in compute_vcols (info=0x7f3275cfce70, record=0x7f3275c5da90 "\371\001", keynum=-1) at /data/src/10.2/storage/myisam/ha_myisam.cc:667
      #10 0x00007f3281e044ad in chk_data_link (param=0x7f3275d28088, info=0x7f3275cfce70, extend=0 '\000') at /data/src/10.2/storage/myisam/mi_check.c:1194
      #11 0x00007f3281dfa94b in ha_myisam::check (this=0x7f3275cbb088, thd=0x7f3275c16070, check_opt=0x7f32825e5610) at /data/src/10.2/storage/myisam/ha_myisam.cc:965
      #12 0x00007f3281dfd075 in ha_myisam::check_and_repair (this=0x7f3275cbb088, thd=0x7f3275c16070) at /data/src/10.2/storage/myisam/ha_myisam.cc:1729
      #13 0x00007f328172fd24 in handler::ha_check_and_repair (this=0x7f3275cbb088, thd=0x7f3275c16070) at /data/src/10.2/sql/handler.cc:4139
      #14 0x00007f328144f416 in auto_repair_table (thd=0x7f3275c16070, table_list=0x7f3275c648d0) at /data/src/10.2/sql/sql_base.cc:2692
      #15 0x00007f328144f9b5 in Open_table_context::recover_from_failed_open (this=0x7f32825e5820) at /data/src/10.2/sql/sql_base.cc:2926
      #16 0x00007f3281451666 in open_tables (thd=0x7f3275c16070, options=..., start=0x7f32825e5898, counter=0x7f32825e58b4, flags=0, prelocking_strategy=0x7f32825e5930) at /data/src/10.2/sql/sql_base.cc:3939
      #17 0x00007f3281452e07 in open_and_lock_tables (thd=0x7f3275c16070, options=..., tables=0x7f3275c64150, derived=true, flags=0, prelocking_strategy=0x7f32825e5930) at /data/src/10.2/sql/sql_base.cc:4664
      #18 0x00007f3281447a97 in open_and_lock_tables (thd=0x7f3275c16070, tables=0x7f3275c64150, derived=true, flags=0) at /data/src/10.2/sql/sql_base.h:493
      #19 0x00007f32818b98e8 in mysql_delete (thd=0x7f3275c16070, table_list=0x7f3275c64150, conds=0x0, order_list=0x7f3275c1a4a8, limit=18446744073709551615, options=0, result=0x0) at /data/src/10.2/sql/sql_delete.cc:252
      #20 0x00007f32814c1a03 in mysql_execute_command (thd=0x7f3275c16070) at /data/src/10.2/sql/sql_parse.cc:4566
      #21 0x00007f32814cc328 in mysql_parse (thd=0x7f3275c16070, rawbuf=0x7f3275c64088 "DELETE FROM t1", length=14, parser_state=0x7f32825e6dd0, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7839
      #22 0x00007f32814b9eee in dispatch_command (command=COM_QUERY, thd=0x7f3275c16070, packet=0x7f3275c58071 "DELETE FROM t1", packet_length=14, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1799
      #23 0x00007f32814b88c8 in do_command (thd=0x7f3275c16070) at /data/src/10.2/sql/sql_parse.cc:1359
      #24 0x00007f328160073e in do_handle_one_connection (connect=0x7f327e071410) at /data/src/10.2/sql/sql_connect.cc:1354
      #25 0x00007f32816004cb in handle_one_connection (arg=0x7f327e071410) at /data/src/10.2/sql/sql_connect.cc:1260
      #26 0x00007f328193f32c in pfs_spawn_thread (arg=0x7f327e00f9f0) at /data/src/10.2/storage/perfschema/pfs.cc:1862
      #27 0x00007f3280aec0a4 in start_thread (arg=0x7f32825e8300) at pthread_create.c:309
      #28 0x00007f327ea9987d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f3275c9a58d): t1
      Connection ID (thread ID): 2
      Status: NOT_KILLED
      

      Also reproducible on bb-10.2-monty 4ec3e60ae3734f.

      Also crashes on a non-debug build:

      10.2 fd0479ce59 non-debug build

      #2  <signal handler called>
      #3  TABLE::update_virtual_fields (this=this@entry=0x7f8bd3caac08, update_mode=update_mode@entry=VCOL_UPDATE_FOR_READ) at /data/src/10.2/sql/table.cc:7366
      #4  0x00007f8bdef77fea in compute_vcols (info=<optimized out>, record=<optimized out>, keynum=-1) at /data/src/10.2/storage/myisam/ha_myisam.cc:668
      #5  0x00007f8bdef82b35 in chk_data_link (param=<optimized out>, info=0x7f8bd3de3e08, extend=0 '\000') at /data/src/10.2/storage/myisam/mi_check.c:1194
      #6  0x00007f8bdef7bd2e in ha_myisam::check (this=0x7f8bd3c99d20, thd=0x7f8bd3c12008, check_opt=<optimized out>) at /data/src/10.2/storage/myisam/ha_myisam.cc:969
      #7  0x00007f8bdef790d7 in ha_myisam::check_and_repair (this=0x7f8bd3c99d20, thd=0x7f8bd3c12008) at /data/src/10.2/storage/myisam/ha_myisam.cc:1733
      #8  0x00007f8bde853137 in auto_repair_table (table_list=<optimized out>, thd=0x7f8bd3c12008) at /data/src/10.2/sql/sql_base.cc:2692
      #9  Open_table_context::recover_from_failed_open (this=this@entry=0x7f8bdf6dbc60) at /data/src/10.2/sql/sql_base.cc:2926
      #10 0x00007f8bde85413b in open_tables (thd=thd@entry=0x7f8bd3c12008, options=..., start=start@entry=0x7f8bdf6dbea8, counter=counter@entry=0x7f8bdf6dbebc, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x7f8bdf6dbff0) at /data/src/10.2/sql/sql_base.cc:4001
      #11 0x00007f8bde8551b3 in open_and_lock_tables (thd=thd@entry=0x7f8bd3c12008, options=..., tables=tables@entry=0x7f8bd3c3e0e8, derived=derived@entry=true, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x7f8bdf6dbff0) at /data/src/10.2/sql/sql_base.cc:4664
      #12 0x00007f8bdeb73655 in open_and_lock_tables (flags=0, derived=true, tables=0x7f8bd3c3e0e8, thd=0x7f8bd3c12008) at /data/src/10.2/sql/sql_base.h:493
      #13 mysql_delete (thd=thd@entry=0x7f8bd3c12008, table_list=0x7f8bd3c3e0e8, conds=0x0, order_list=order_list@entry=0x7f8bd3c16300, limit=18446744073709551615, options=0, result=0x0) at /data/src/10.2/sql/sql_delete.cc:252
      #14 0x00007f8bde899fea in mysql_execute_command (thd=thd@entry=0x7f8bd3c12008) at /data/src/10.2/sql/sql_parse.cc:4569
      #15 0x00007f8bde8a0b31 in mysql_parse (thd=thd@entry=0x7f8bd3c12008, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7f8bdf6dddb0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.2/sql/sql_parse.cc:7842
      #16 0x00007f8bde8a403b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f8bd3c12008, packet=packet@entry=0x7f8bd3c32009 "DELETE FROM t1", packet_length=packet_length@entry=14, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.2/sql/sql_parse.cc:1800
      #17 0x00007f8bde8a4960 in do_command (thd=0x7f8bd3c12008) at /data/src/10.2/sql/sql_parse.cc:1360
      #18 0x00007f8bde974c72 in do_handle_one_connection (connect=connect@entry=0x7f8bdc05b1a8) at /data/src/10.2/sql/sql_connect.cc:1354
      #19 0x00007f8bde974e0d in handle_one_connection (arg=arg@entry=0x7f8bdc05b1a8) at /data/src/10.2/sql/sql_connect.cc:1260
      #20 0x00007f8bdebdcf01 in pfs_spawn_thread (arg=0x7f8bdc01b608) at /data/src/10.2/storage/perfschema/pfs.cc:1862
      #21 0x00007f8bddf960a4 in start_thread (arg=0x7f8bdf6df300) at pthread_create.c:309
      #22 0x00007f8bdcc0987d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              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.