Bug #114753 hang bug in mysql NDB cluster
Submitted: 24 Apr 3:07 Modified: 24 Apr 11:32
Reporter: CunDi Fang Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:8.0.35-cluster MySQL Cluster Community S OS:Any (20.04)
Assigned to: MySQL Verification Team CPU Architecture:Any

[24 Apr 3:07] CunDi Fang
Description:
Hello, I found a hang bug in 8.0.35-cluster version of MYSQL cluster. 
The detail is as follow.

Interestingly, this bug doesn't come up very often, but seems to come up in certain scenarios of situations. When I was reproducing it, I found that there was a certain probability that he would reproduce it successfully.

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_6.column2 as c0,
  ref_9.column5 as c1,
  ref_1.column1 as c2,
  ref_0.column1 as c3,
  ref_9.column5 as c4,
  ref_1.column2 as c5,
  ref_0.column66 as c6
from
  mytest90.test2 as ref_0
      left join mytest90.test2 as ref_1
                  left join mytest90.test9 as ref_2
                  on (EXISTS (
                      select
                          86 as c0,
                          ref_3.column6 as c1
                        from
                          mytest90.test9 as ref_3
                        where EXISTS (
                          select
                              ref_1.column66 as c0,
                              ref_2.column6 as c1,
                              ref_1.column2 as c2,
                              ref_4.column3 as c3,
                              ref_2.column7 as c4
                            from
                              mytest90.test1 as ref_4
                            where EXISTS (
                              select
                                  ref_3.column8 as c0,
                                  ref_1.column66 as c1,
                                  ref_1.column1 as c2,
                                  ref_2.column2 as c3
                                from
                                  mytest90.test2 as ref_5
                                where true)
                            limit 121)
                        limit 143))
                inner join mytest90.test5 as ref_6
                on (ref_1.column66 is NULL)
              right join mytest90.test0 as ref_7
              on (true)
            left join mytest90.test7 as ref_8
            on (ref_6.column1 is not NULL)
          inner join mytest90.test8 as ref_9
          on (ref_2.column5 is not NULL)
        right join mytest90.test0 as ref_10
        on (ref_9.column6 is not NULL)
      on (true)
    left join (select
          ref_11.column5 as c0,
          ref_11.column2 as c1,
          ref_11.column4 as c2,
          ref_11.column1 as c3,
          ref_11.column2 as c4
        from
          mytest90.test4 as ref_11
        where (((ref_11.column4 is not NULL)
              or (false))
            or (ref_11.column5 is not NULL))
          and (ref_11.column4 is NULL)
        limit 117) as subq_0
    on (true)
where (subq_0.c0 is not NULL)
  and (ref_0.column3 is NULL);
'''

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
[24 Apr 11:32] MySQL Verification Team
Duplicate of Bug #114464