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

Server hangs or assertion `strcmp(share->unique_file_name,filename) || share->last_version' fails in test_if_reopen or unexpected ER_LOCK_DEADLOCK

    XMLWordPrintable

Details

    Description

      --source include/have_partition.inc
       
      CREATE TABLE t1 (i INT) ENGINE=MyISAM PARTITION BY HASH(i) PARTITIONS 2;
      LOCK TABLE t1 WRITE;
      TRUNCATE TABLE t1;
      DESC t1;
       
      # Cleanup
      DROP TABLE t1;
      

      10.0 debug b728641e862d

      mysqld: /data/src/10.0/storage/myisam/mi_open.c:67: test_if_reopen: Assertion `strcmp(share->unique_file_name,filename) || share->last_version' failed.
      180312 15:30:32 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fda603e3ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x0000000000b0bfc5 in test_if_reopen (filename=0x7fda624af990 "/data/bld/10.0/mysql-test/var/mysqld.1/data/test/t1#P#p0.MYI") at /data/src/10.0/storage/myisam/mi_open.c:66
      #9  0x0000000000b0c1cb in mi_open (name=0x7fda624afdb0 "./test/t1#P#p0", mode=2, open_flags=1106) at /data/src/10.0/storage/myisam/mi_open.c:122
      #10 0x0000000000ae22bf in ha_myisam::open (this=0x7fda58881088, name=0x7fda624afdb0 "./test/t1#P#p0", mode=2, test_if_locked=1042) at /data/src/10.0/storage/myisam/ha_myisam.cc:755
      #11 0x000000000083edf2 in handler::ha_open (this=0x7fda58881088, table_arg=0x7fda5889f070, name=0x7fda624afdb0 "./test/t1#P#p0", mode=2, test_if_locked=1042) at /data/src/10.0/sql/handler.cc:2550
      #12 0x0000000000def762 in ha_partition::open (this=0x7fda58880888, name=0x7fda58861178 "./test/t1", mode=2, test_if_locked=18) at /data/src/10.0/sql/ha_partition.cc:3526
      #13 0x000000000083edf2 in handler::ha_open (this=0x7fda58880888, table_arg=0x7fda5889f070, name=0x7fda58861178 "./test/t1", mode=2, test_if_locked=18) at /data/src/10.0/sql/handler.cc:2550
      #14 0x000000000072ba4c in open_table_from_share (thd=0x7fda5a2a2070, share=0x7fda58860b88, alias=0x7fda58bfefe8 "t1", db_stat=39, prgflag=44, ha_open_flags=18, outparam=0x7fda5889f070, is_create_table=false) at /data/src/10.0/sql/table.cc:2869
      #15 0x00000000005ec2f6 in open_table (thd=0x7fda5a2a2070, table_list=0x7fda58948e60, mem_root=0x7fda624b0680, ot_ctx=0x7fda624b0640) at /data/src/10.0/sql/sql_base.cc:2516
      #16 0x00000000005eea5c in open_and_process_table (thd=0x7fda5a2a2070, lex=0x7fda624b0850, tables=0x7fda58948e60, counter=0x7fda624b078c, flags=1282, prelocking_strategy=0x7fda624b0790, has_prelocking_list=false, ot_ctx=0x7fda624b0640, new_frm_mem=0x7fda624b0680) at /data/src/10.0/sql/sql_base.cc:4034
      #17 0x00000000005efb11 in open_tables (thd=0x7fda5a2a2070, start=0x7fda624b0740, counter=0x7fda624b078c, flags=1282, prelocking_strategy=0x7fda624b0790) at /data/src/10.0/sql/sql_base.cc:4568
      #18 0x00000000005f0d39 in open_normal_and_derived_tables (thd=0x7fda5a2a2070, tables=0x7fda58948e60, flags=1282, dt_phases=34) at /data/src/10.0/sql/sql_base.cc:5283
      #19 0x00000000006d2ff3 in fill_schema_table_by_open (thd=0x7fda5a2a2070, is_show_fields_or_keys=true, table=0x7fda589a6088, schema_table=0x15fb000 <schema_tables+384>, orig_db_name=0x7fda624b23d0, orig_table_name=0x7fda624b23c0, open_tables_state_backup=0x7fda624b1d90, can_deadlock=true) at /data/src/10.0/sql/sql_show.cc:4378
      #20 0x00000000006d3ebe in get_all_tables (thd=0x7fda5a2a2070, tables=0x7fda588fb1c8, cond=0x0) at /data/src/10.0/sql/sql_show.cc:4900
      #21 0x00000000006e2328 in get_schema_tables_result (join=0x7fda58bfe138, executed_place=PROCESSED_BY_JOIN_EXEC) at /data/src/10.0/sql/sql_show.cc:8308
      #22 0x0000000000687a2f in JOIN::exec_inner (this=0x7fda58bfe138) at /data/src/10.0/sql/sql_select.cc:2559
      #23 0x000000000068701e in JOIN::exec (this=0x7fda58bfe138) at /data/src/10.0/sql/sql_select.cc:2394
      #24 0x000000000068a3c0 in mysql_select (thd=0x7fda5a2a2070, rref_pointer_array=0x7fda5a2a63a0, tables=0x7fda588fb1c8, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2686716672, result=0x7fda58bfe118, unit=0x7fda5a2a5a08, select_lex=0x7fda5a2a60f8) at /data/src/10.0/sql/sql_select.cc:3333
      #25 0x000000000068061e in handle_select (thd=0x7fda5a2a2070, lex=0x7fda5a2a5940, result=0x7fda58bfe118, setup_tables_done_option=0) at /data/src/10.0/sql/sql_select.cc:377
      #26 0x0000000000654dbd in execute_sqlcom_select (thd=0x7fda5a2a2070, all_tables=0x7fda588fb1c8) at /data/src/10.0/sql/sql_parse.cc:5293
      #27 0x000000000064d356 in mysql_execute_command (thd=0x7fda5a2a2070) at /data/src/10.0/sql/sql_parse.cc:2553
      #28 0x0000000000657a3e in mysql_parse (thd=0x7fda5a2a2070, rawbuf=0x7fda588fa088 "DESC t1", length=7, parser_state=0x7fda624b3640) at /data/src/10.0/sql/sql_parse.cc:6569
      #29 0x000000000064a57d in dispatch_command (command=COM_QUERY, thd=0x7fda5a2a2070, packet=0x7fda5b7e5071 "DESC t1", packet_length=7) at /data/src/10.0/sql/sql_parse.cc:1296
      #30 0x000000000064987d in do_command (thd=0x7fda5a2a2070) at /data/src/10.0/sql/sql_parse.cc:999
      #31 0x0000000000769a20 in do_handle_one_connection (thd_arg=0x7fda5a2a2070) at /data/src/10.0/sql/sql_connect.cc:1377
      #32 0x0000000000769792 in handle_one_connection (arg=0x7fda5a2a2070) at /data/src/10.0/sql/sql_connect.cc:1292
      #33 0x0000000000aca18c in pfs_spawn_thread (arg=0x7fda5a1a2370) at /data/src/10.0/storage/perfschema/pfs.cc:1861
      #34 0x00007fda620e7494 in start_thread (arg=0x7fda624b4700) at pthread_create.c:333
      #35 0x00007fda604a093f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      10.0.34 release (hangs)

      Thread 2 (Thread 0x7fa63fbf3700 (LWP 23297)):
      #0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
      #1  0x00000000006d8792 in inline_mysql_cond_wait (src_line=1054, mutex=<optimized out>, that=0x7fa6380353a0, src_file=<optimized out>) at /home/buildbot/buildbot/build/include/mysql/psi/mysql_thread.h:1154
      #2  tdc_remove_table (thd=<optimized out>, remove_type=remove_type@entry=TDC_RT_REMOVE_ALL, db=<optimized out>, table_name=<optimized out>, kill_delayed_threads=kill_delayed_threads@entry=false) at /home/buildbot/buildbot/build/sql/table_cache.cc:1054
      #3  0x0000000000589ae9 in Open_table_context::recover_from_failed_open (this=this@entry=0x7fa63fbed8a0) at /home/buildbot/buildbot/build/sql/sql_base.cc:3583
      #4  0x0000000000590d06 in open_tables (thd=thd@entry=0x7fa638ff6008, start=start@entry=0x7fa63fbed968, counter=counter@entry=0x7fa63fbed97c, flags=1282, prelocking_strategy=prelocking_strategy@entry=0x7fa63fbed980) at /home/buildbot/buildbot/build/sql/sql_base.cc:4596
      #5  0x0000000000591d16 in open_normal_and_derived_tables (thd=thd@entry=0x7fa638ff6008, tables=tables@entry=0x7fa63698acf8, flags=<optimized out>, dt_phases=dt_phases@entry=34) at /home/buildbot/buildbot/build/sql/sql_base.cc:5283
      #6  0x0000000000622459 in fill_schema_table_by_open (thd=thd@entry=0x7fa638ff6008, is_show_fields_or_keys=is_show_fields_or_keys@entry=true, table=table@entry=0x7fa6369f1020, orig_db_name=orig_db_name@entry=0x7fa63fbeeff0, orig_table_name=orig_table_name@entry=0x7fa63fbef070, open_tables_state_backup=open_tables_state_backup@entry=0x7fa63fbef020, can_deadlock=can_deadlock@entry=true, schema_table=0x1379820 <schema_tables+384>, schema_table=0x1379820 <schema_tables+384>) at /home/buildbot/buildbot/build/sql/sql_show.cc:4378
      #7  0x0000000000634872 in get_all_tables (thd=0x7fa638ff6008, tables=0x7fa636a2e160, cond=0x0) at /home/buildbot/buildbot/build/sql/sql_show.cc:4900
      #8  0x0000000000635d7e in get_schema_tables_result (join=join@entry=0x7fa63680d0d0, executed_place=executed_place@entry=PROCESSED_BY_JOIN_EXEC) at /home/buildbot/buildbot/build/sql/sql_show.cc:8308
      #9  0x000000000061d5dd in JOIN::exec_inner (this=this@entry=0x7fa63680d0d0) at /home/buildbot/buildbot/build/sql/sql_select.cc:2559
      #10 0x000000000061f6b1 in JOIN::exec (this=this@entry=0x7fa63680d0d0) at /home/buildbot/buildbot/build/sql/sql_select.cc:2394
      #11 0x000000000061c31d in mysql_select (thd=thd@entry=0x7fa638ff6008, rref_pointer_array=rref_pointer_array@entry=0x7fa638ffa200, tables=<optimized out>, wild_num=<optimized out>, fields=..., conds=<optimized out>, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2686716672, result=result@entry=0x7fa63680d0b0, unit=0x7fa638ff9868, select_lex=select_lex@entry=0x7fa638ff9f58) at /home/buildbot/buildbot/build/sql/sql_select.cc:3333
      #12 0x000000000061fa0d in handle_select (thd=thd@entry=0x7fa638ff6008, lex=lex@entry=0x7fa638ff97a0, result=result@entry=0x7fa63680d0b0, setup_tables_done_option=setup_tables_done_option@entry=0) at /home/buildbot/buildbot/build/sql/sql_select.cc:377
      #13 0x00000000005c4c38 in execute_sqlcom_select (thd=thd@entry=0x7fa638ff6008, all_tables=0x7fa636a2e160) at /home/buildbot/buildbot/build/sql/sql_parse.cc:5293
      #14 0x00000000005d002e in mysql_execute_command (thd=thd@entry=0x7fa638ff6008) at /home/buildbot/buildbot/build/sql/sql_parse.cc:2553
      #15 0x00000000005d1b37 in mysql_parse (thd=thd@entry=0x7fa638ff6008, parser_state=parser_state@entry=0x7fa63fbf25d0, length=<optimized out>, rawbuf=<optimized out>) at /home/buildbot/buildbot/build/sql/sql_parse.cc:6569
      #16 0x00000000005d4006 in dispatch_command (command=COM_QUERY, thd=0x7fa638ff6008, packet=<optimized out>, packet_length=7) at /home/buildbot/buildbot/build/sql/sql_parse.cc:1771
      #17 0x00000000005d41b3 in do_command (thd=<optimized out>) at /home/buildbot/buildbot/build/sql/sql_parse.cc:999
      #18 0x0000000000694d33 in do_handle_one_connection (thd_arg=thd_arg@entry=0x7fa638ff6008) at /home/buildbot/buildbot/build/sql/sql_connect.cc:1377
      #19 0x0000000000694e02 in handle_one_connection (arg=arg@entry=0x7fa638ff6008) at /home/buildbot/buildbot/build/sql/sql_connect.cc:1292
      #20 0x00000000008965dd in pfs_spawn_thread (arg=0x7fa63d83f608) at /home/buildbot/buildbot/build/storage/perfschema/pfs.cc:1861
      #21 0x00007fa63f1e2494 in start_thread (arg=0x7fa63fbf3700) at pthread_create.c:333
      #22 0x00007fa63e69b93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      MariaDB 5.5 instead fails with ER_LOCK_DEADLOCK:

      CREATE TABLE t1 (i INT) ENGINE=MyISAM PARTITION BY HASH(i) PARTITIONS 2;
      LOCK TABLE t1 WRITE;
      TRUNCATE TABLE t1;
      DESC t1;
      bug.travis1a                             [ fail ]
              Test ended at 2018-03-12 15:36:12
       
      CURRENT_TEST: bug.travis1a
      mysqltest: At line 6: query 'DESC t1' failed: 1213: Deadlock found when trying to get lock; try restarting transaction
      

      Not reproducible with any MySQL.

      Attachments

        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.