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

LP:702776 - Deadlock around remove_table_from_cache with HANDLER + DDL

    XMLWordPrintable

Details

    Description

      maria-5.3-handler and mysql-5.1 have a tendency to deadlock if concurrent HANDLER is issued along with ALTER TABLE and logging to CSV table. mysql-5.5 is not affected.

      This thread appears to be holding everyone else:

      # 2011-01-14T10:56:34 #2  0x0876c07e in safe_cond_timedwait (cond=0x8a96f40, mp=0x8a965c0, abstime=0x915db738, file=0x88a8f70 "sql_base.cc", line=8881) at thr_mutex.c:550
      # 2011-01-14T10:56:34 #3  0x082f2dc8 in remove_table_from_cache (thd=0xbd89d20, db=0xb6cfa3d8 "test", table_name=0xb6cfa3dd "table100_myisam_int_autoinc", flags=2,
      # 2011-01-14T10:56:34     deleting=0 '\000') at sql_base.cc:8881
      # 2011-01-14T10:56:34 #4  0x083ed0ae in wait_while_table_is_used (thd=0xbd89d20, table=0x91216ae8, function=HA_EXTRA_PREPARE_FOR_RENAME) at sql_table.cc:4319
      # 2011-01-14T10:56:34 #5  0x083f5837 in mysql_alter_table (thd=0xbd89d20, new_db=0xa75cee48 "test", new_name=0xa75cebb8 "table100_myisam_int_autoinc", create_info=0x915dcaec,
      # 2011-01-14T10:56:34     table_list=0xa75cec48, alter_info=0x915dcb84, order_num=0, order=0x0, ignore=false) at sql_table.cc:7603
      # 2011-01-14T10:56:34 #6  0x08299197 in mysql_execute_command (thd=0xbd89d20) at sql_parse.cc:2917
      # 2011-01-14T10:56:34 #7  0x082a2a8b in mysql_parse (thd=0xbd89d20, rawbuf=0xa75cead8 "ALTER TABLE `table100_myisam_int_autoinc` ENGINE = Memory", length=57,
      # 2011-01-14T10:56:34     found_semicolon=0x915dd228) at sql_parse.cc:6083
      # 2011-01-14T10:56:34 #8  0x08295107 in dispatch_command (command=COM_QUERY, thd=0xbd89d20, packet=0xbd904b9 "ALTER TABLE `table100_myisam_int_autoinc` ENGINE = Memory",
      # 2011-01-14T10:56:34     packet_length=57) at sql_parse.cc:1211
      # 2011-01-14T10:56:34 #9  0x082945b4 in do_command (thd=0xbd89d20) at sql_parse.cc:904
      # 2011-01-14T10:56:34 #10 0x08291692 in handle_one_connection (arg=0xbd89d20) at sql_connect.cc:1154
      # 2011-01-14T10:56:34 #11 0x00821919 in start_thread () from /lib/libpthread.so.0
      # 2011-01-14T10:56:34 #12 0x0076acce in clone () from /lib/libc.so.6

      no timeout option applies in this case and the deadlock is permanent and unkillable.

      RQG command line:

      perl runall.pl --grammar=conf/engines/handler.yy --gendata=conf/engines/handler.zz --threads=1 --basedir=/home/philips/bzr/maria-5.3-handler/ --queries=100K --duration=600 --threads=10 --mysqld=--loose-lock-wait-timeout=1 --mysqld=--loose-table-lock-wait-timeout=1

      Attachments

        Activity

          People

            Unassigned Unassigned
            philipstoev Philip Stoev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.