[MDEV-30012] Triple thread hang in states 'NULL', 'NULL' and 'closing tables' on INSERT Created: 2022-11-15  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - Spider
Affects Version/s: 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Major
Reporter: Roel Van de Paar Assignee: Yuchen Pei
Resolution: Unresolved Votes: 0
Labels: thread_hang

Issue Links:
Relates
relates to MDEV-30580 Investigate whether self-/multi- refe... Open
relates to MDEV-29583 Disallow Spider self/dual/multi/cross... Closed

 Description   

INSTALL PLUGIN Spider SONAME 'ha_spider.so';
CREATE USER Spider@localhost IDENTIFIED BY '';
CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET '../socket.sock',DATABASE 'test',user 'Spider',PASSWORD '');
CREATE TABLE t (c1 INT) ENGINE=Spider COMMENT='WRAPPER "mysql",srv "srv",TABLE "t"';
SELECT CONCAT ('FROM JSON subSELECT ',c,' AS CHAR(1))'),CAST((SELECT 1 FROM t) AS CHAR(1)) FROM t WHERE c='NULL';
CREATE TABLE t1 (c1 INT) ENGINE=Spider COMMENT='WRAPPER "mysql",srv "srv",TABLE "t"';
INSERT INTO t1 VALUES (0);

Leads to a triple thread hang in states 'NULL', 'NULL' and 'closing tables'

10.11.1 50c5743adc87e1cdec1431a02558f6540fe5a6d5 (Debug)

10.11.1-dbg>SHOW PROCESSLIST;
+----+-------------+-----------+------+---------+------+----------------------------------------------------+----------------------------------------+----------+
| Id | User        | Host      | db   | Command | Time | State                                              | Info                                   | Progress |
+----+-------------+-----------+------+---------+------+----------------------------------------------------+----------------------------------------+----------+
|  4 | root        | localhost | test | Query   |  100 | closing tables                                     | INSERT INTO t1 VALUES (0)              |    0.000 |
|  5 | system user |           | NULL | Daemon  | NULL | Spider table background statistics 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 statistics 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 | Sleep   |  100 | Reset for next command                             | 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 cardinality 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 cardinality action handler | NULL                                   |    0.000 |
| 16 | system user |           | NULL | Daemon  | NULL | Spider table background cardinality action handler | 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 |
| 21 | 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 |
| 23 | system user |           | NULL | Daemon  | NULL | Spider table background cardinality action handler | NULL                                   |    0.000 |
| 24 | system user |           | NULL | Daemon  | NULL | Spider table background statistics action handler  | NULL                                   |    0.000 |
| 26 | Spider      | localhost | test | Query   |  100 | NULL                                               | show table status from `test` like 't' |    0.000 |
| 27 | Spider      | localhost | test | Query   |  100 | NULL                                               | show table status from `test` like 't' |    0.000 |
| 28 | root        | localhost | test | Query   |    0 | starting                                           | SHOW PROCESSLIST                       |    0.000 |
+----+-------------+-----------+------+---------+------+----------------------------------------------------+----------------------------------------+----------+
24 rows in set (0.000 sec)


Generated at Thu Feb 08 10:12:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.