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

Dual thread hang in 'closing tables' and 'Waiting for table metadata lock' on Spider CREATE OR REPLACE TABLE

Details

    Description

      Please change socket file location as required. Use CLI for replay, or MTR testcase (ref comment below). Use branch bb-10.11-midenok-MDEV-25292 (atm).

      INSTALL PLUGIN Spider SONAME 'ha_spider.so';
      CREATE USER Spider@localhost IDENTIFIED BY 'PWD1';
      CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET '../socket.sock',DATABASE 'test',user 'Spider',PASSWORD 'PWD1');
      CREATE TABLE t (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",srv "srv",TABLE "t"';
      CREATE OR REPLACE TABLE t (c INT) ENGINE=Spider;
      

      Will make 10.11 (opt+dbg) hang with:

      10.11.0 49cee4e21a8e3cc0eccff3a6f9e493247344e24f (Optimized)

      10.11.0-opt>SHOW FULL PROCESSLIST;
      +----+-------------+-----------+------+---------+------+----------------------------------------------------+-------------------------------------------------+----------+
      | Id | User        | Host      | db   | Command | Time | State                                              | Info                                            | Progress |
      +----+-------------+-----------+------+---------+------+----------------------------------------------------+-------------------------------------------------+----------+
      |  4 | root        | localhost | test | Query   |  303 | closing tables                                     | CREATE OR REPLACE TABLE t (c INT) ENGINE=Spider |    0.000 |
      |  5 | system user |           | NULL | Daemon  | NULL | Spider table background cardinality action handler | NULL                                            |    0.000 |
      |  6 | system user |           | NULL | Daemon  | NULL | Spider table background cardinality action handler | NULL                                            |    0.000 |
      |  7 | system user |           | NULL | Daemon  | NULL | Spider table background cardinality action handler | NULL                                            |    0.000 |
      |  8 | system user |           | NULL | Daemon  | NULL | Spider table background statistics action handler  | NULL                                            |    0.000 |
      |  9 | system user |           | NULL | Daemon  | NULL | Spider table background cardinality action handler | NULL                                            |    0.000 |
      | 11 | system user |           | NULL | Daemon  | NULL | Spider table background cardinality action handler | NULL                                            |    0.000 |
      | 12 | system user |           | NULL | Daemon  | NULL | Spider table background statistics action handler  | NULL                                            |    0.000 |
      | 13 | system user |           | NULL | Daemon  | NULL | Spider table background cardinality action handler | NULL                                            |    0.000 |
      | 14 | system user |           | NULL | Daemon  | NULL | Spider table background cardinality action handler | NULL                                            |    0.000 |
      | 15 | system user |           | NULL | Daemon  | NULL | Spider table background statistics action handler  | NULL                                            |    0.000 |
      | 16 | system user |           | NULL | Sleep   |  303 | Reset for next command                             | NULL                                            |    0.000 |
      | 17 | system user |           | NULL | Daemon  | NULL | Spider table background statistics action handler  | NULL                                            |    0.000 |
      | 19 | system user |           | NULL | Daemon  | NULL | Spider table background statistics action handler  | NULL                                            |    0.000 |
      | 20 | system user |           | NULL | Daemon  | NULL | Spider table background statistics action handler  | NULL                                            |    0.000 |
      | 18 | system user |           | NULL | Daemon  | NULL | Spider table background statistics action handler  | NULL                                            |    0.000 |
      | 10 | system user |           | NULL | Daemon  | NULL | Spider table background statistics action handler  | NULL                                            |    0.000 |
      | 22 | system user |           | NULL | Daemon  | NULL | Spider table background cardinality action handler | NULL                                            |    0.000 |
      | 21 | system user |           | NULL | Daemon  | NULL | Spider table background cardinality action handler | NULL                                            |    0.000 |
      | 23 | system user |           | NULL | Daemon  | NULL | Spider table background statistics action handler  | NULL                                            |    0.000 |
      | 24 | system user |           | NULL | Daemon  | NULL | Spider table background cardinality action handler | NULL                                            |    0.000 |
      | 25 | Spider      | localhost | test | Query   |  303 | Waiting for table metadata lock                    | show table status from `test` like 't'          |    0.000 |
      | 26 | root        | localhost | test | Query   |    0 | starting                                           | SHOW FULL PROCESSLIST                           |    0.000 |
      +----+-------------+-----------+------+---------+------+----------------------------------------------------+-------------------------------------------------+----------+
      23 rows in set (0.000 sec)
      

      Attachments

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Sergei Golubchik made transition -
            Open Needs Feedback
            17h 7m 1
            Roel Van de Paar made transition -
            In Progress Needs Feedback
            100d 17h 16m 1
            Roel Van de Paar made transition -
            Needs Feedback Open
            2d 13h 44m 2
            Roel Van de Paar made transition -
            Open Confirmed
            1h 3m 2
            Yuchen Pei made transition -
            Confirmed In Progress
            3d 21h 48m 2
            Yuchen Pei made transition -
            In Progress In Review
            86d 13h 21m 1
            Alexey Botchkov made transition -
            In Review Stalled
            10d 6h 31m 1
            Yuchen Pei made transition -
            Stalled Closed
            4d 4h 48m 1

            People

              ycp Yuchen Pei
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              8 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.