Description:
Hello, I found a hang bug in 8.0.35-cluster version of MYSQL cluster.
The detail is as follow.
OS version and name:
Ubuntu 22.04.3 LTS (Jammy Jellyfish)
Linux eb1f47b08982 6.5.11-8-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.11-8 (2024-01-30T12:27Z) x86_64 x86_64 x86_64 GNU/Linux
PoC:
'''
select
ref_0.column5 as c0,
ref_0.column5 as c1,
89 as c2,
ref_0.column7 as c3,
ref_0.column7 as c4
from
mytest90.test7 as ref_0
where (ref_0.column4 is not NULL)
or (EXISTS (
select
ref_0.column1 as c0,
ref_2.column1 as c1,
case when (ref_0.column2 is NULL)
or (ref_0.column4 is NULL) then ref_1.column4 else ref_1.column4 end
as c2
from
mytest90.test7 as ref_1
inner join mytest90.test5 as ref_2
on ((false)
or ((true)
or (true)))
where ((true)
and (((ref_1.column2 is NULL)
and ((false)
and (true)))
and (false)))
or (EXISTS (
select
ref_3.column2 as c0
from
mytest90.test2 as ref_3
where (EXISTS (
select
ref_3.column66 as c0,
ref_4.column1 as c1,
ref_3.column2 as c2,
subq_0.c1 as c3,
(select rows_examined from sys.host_summary_by_statement_latency limit 1 offset 1)
as c4,
ref_1.column1 as c5
from
mytest90.test6 as ref_4,
lateral (select
ref_4.column1 as c0,
ref_5.column1 as c1
from
mytest90.test5 as ref_5
where ((true)
and ((ref_0.column7 is not NULL)
or ((true)
and (((ref_2.column1 is NULL)
and (ref_5.column1 is NULL))
or (false)))))
and (false)) as subq_0
where EXISTS (
select
(select INDEX_ID from information_schema.INNODB_CACHED_INDEXES limit 1 offset 1)
as c0,
(select current_max_alloc from sys.x$memory_by_host_by_current_bytes limit 1 offset 20)
as c1,
ref_6.column1 as c2,
ref_4.column1 as c3,
ref_3.column3 as c4
from
mytest90.test3 as ref_6
where ref_6.column6 is NULL)
limit 88))
or ((true)
and (EXISTS (
select
ref_1.column2 as c0,
ref_2.column2 as c1
from
mytest90.test9 as ref_7
where false
limit 132)))
limit 129))
limit 142))
limit 84;
'''
Architecture Information:
'''
[NDBD DEFAULT]
NoOfReplicas =2
DataMemory = 512M
IndexMemory = 64M
[NDB_MGMD]
NodeId=1
hostname =192.172.10.8
datadir =/var/lib/mysql-cluster
[NDBD]
NodeId =2
hostname =192.172.10.9
datadir =/usr/local/mysql-cluster/data
NodeGroup=0
[NDBD]
NodeId =3
hostname =192.172.10.10
datadir =/usr/local/mysql-cluster/data
NodeGroup=1
[NDBD]
NodeId =4
hostname =192.172.10.11
datadir =/usr/local/mysql-cluster/data
NodeGroup=0
[NDBD]
NodeId =5
hostname =192.172.10.12
datadir =/usr/local/mysql-cluster/data
NodeGroup=1
[mysqld]
NodeId =6
hostname =192.172.10.9
[mysqld]
NodeId =7
hostname =192.172.10.10
[mysqld]
NodeId =8
hostname =192.172.10.11
[mysqld]
NodeId =9
hostname =192.172.10.12
'''
Attempted and successfully reproduced!
How to repeat:
Simply execute that PoC to repeat it.
Suggested fix:
seems like a dead loop