Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11, 11.1(EOL)
Description
This is a serious locking bug where Spider fails to see that table t was already created previously (and not locked?).
Affects optimized and debug builds. Issue is not sporadic.
INSTALL PLUGIN Spider SONAME 'ha_spider.so'; |
CREATE USER Spider@localhost IDENTIFIED BY 'PWD123'; |
CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET '../socket.sock',DATABASE 'test',user 'Spider',PASSWORD 'PWD123'); |
CREATE TABLE t (c INT) ENGINE=InnoDB; |
CREATE TABLE t1 (c INT) ENGINE=Spider; |
CREATE TABLE t2 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",srv "srv",TABLE "t"'; |
LOCK TABLES t2 WRITE;
|
LOCK TABLES t1 READ; |
CREATE TABLE t (c INT) ENGINE=Spider; |
Leads to:
10.11.0 bc563f1a4b0b38de3b41fd0f0d3d8b7f1aacbd8b (Optimized) |
10.11.0-dbg>LOCK TABLES t1 READ;
|
ERROR 1429 (HY000): Unable to connect to foreign data source: localhost
|
10.11.0-dbg>CREATE TABLE t(c INT) ENGINE=Spider;
|
# Hang
|
10.11.0 bc563f1a4b0b38de3b41fd0f0d3d8b7f1aacbd8b (Optimized) |
10.11.0-opt>SHOW FULL PROCESSLIST;
|
+----+-------------+-----------+------+---------+------+----------------------------------------------------+-------------------------------------+----------+
|
| Id | User | Host | db | Command | Time | State | Info | Progress |
|
+----+-------------+-----------+------+---------+------+----------------------------------------------------+-------------------------------------+----------+
|
| 5 | root | localhost | test | Query | 77 | Waiting for table metadata lock | CREATE TABLE t(c INT) ENGINE=Spider | 0.000 |
|
| 6 | system user | | NULL | Daemon | NULL | Spider table background statistics 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 |
|
| 10 | system user | | NULL | Daemon | NULL | Spider table background statistics action handler | NULL | 0.000 |
|
| 11 | system user | | NULL | Daemon | NULL | Spider table background statistics action handler | NULL | 0.000 |
|
| 12 | system user | | NULL | Sleep | 77 | Reset for next command | NULL | 0.000 |
|
| 13 | system user | | NULL | Daemon | NULL | Spider table background statistics action handler | NULL | 0.000 |
|
| 14 | system user | | NULL | Daemon | NULL | Spider table background cardinality action handler | NULL | 0.000 |
|
| 17 | system user | | NULL | Daemon | NULL | Spider table background cardinality action handler | NULL | 0.000 |
|
| 18 | system user | | NULL | Daemon | NULL | Spider table background cardinality action handler | NULL | 0.000 |
|
| 20 | system user | | NULL | Daemon | NULL | Spider table background cardinality action handler | NULL | 0.000 |
|
| 19 | system user | | NULL | Daemon | NULL | Spider table background cardinality action handler | NULL | 0.000 |
|
| 24 | system user | | NULL | Daemon | NULL | Spider table background cardinality action handler | NULL | 0.000 |
|
| 15 | system user | | NULL | Daemon | NULL | Spider table background cardinality action handler | NULL | 0.000 |
|
| 22 | system user | | NULL | Daemon | NULL | Spider table background statistics action handler | NULL | 0.000 |
|
| 16 | system user | | NULL | Daemon | NULL | Spider table background cardinality action handler | NULL | 0.000 |
|
| 21 | system user | | NULL | Daemon | NULL | Spider table background statistics action handler | NULL | 0.000 |
|
| 23 | system user | | NULL | Daemon | NULL | Spider table background statistics action handler | NULL | 0.000 |
|
| 25 | system user | | NULL | Daemon | NULL | Spider table background statistics action handler | NULL | 0.000 |
|
| 26 | spider | localhost | test | Sleep | 77 | | NULL | 0.000 |
|
| 27 | root | localhost | test | Query | 0 | starting | SHOW FULL PROCESSLIST | 0.000 |
|
+----+-------------+-----------+------+---------+------+----------------------------------------------------+-------------------------------------+----------+
|
23 rows in set (0.001 sec)
|
Attachments
Issue Links
- is blocked by
-
MDEV-30014 heap-use-after-free in ha_spider::lock_tables(), highly sporadic SIGSEGV in intern_close_table
- Closed
- is part of
-
MDEV-30014 heap-use-after-free in ha_spider::lock_tables(), highly sporadic SIGSEGV in intern_close_table
- Closed
- relates to
-
MDEV-29484 Assertion `!trx_free || !trx->locked_connections' failed in spider_free_trx_conn on LOCK TABLES
- Closed