Bug #114754 hang bug in mysql NDB cluster
Submitted: 24 Apr 2024 7:03 Modified: 24 Apr 2024 11:31
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 2024 7:03] CunDi Fang
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  
  (select Managed_name from mysql.replication_asynchronous_connection_failover limit 1 offset 6)
     as c0
from
  (select
            ref_0.column1 as c0,
            ref_0.column1 as c1,
            ref_0.column2 as c2,
            ref_0.column6 as c3
          from
            mytest90.test8 as ref_0
          where ref_0.column1 is not NULL
          limit 125) as subq_0
      left join mytest90.test7 as ref_1
      on (false)
    right join mytest90.test6 as ref_2
    on (subq_0.c1 is NULL),
  lateral (select
        case when ref_2.column1 is NULL then ref_1.column2 else ref_1.column2 end
           as c0,
        ref_1.column7 as c1,
        subq_0.c3 as c2,
        subq_0.c0 as c3,
        subq_0.c1 as c4,
        ref_2.column1 as c5,
        subq_1.c6 as c6,
        ref_2.column1 as c7,
        ref_3.column7 as c8
      from
        mytest90.test0 as ref_3,
        lateral (select
              ref_3.column9 as c0,
              ref_2.column1 as c1,
              ref_1.column5 as c2,
              ref_2.column1 as c3,
              ref_1.column1 as c4,
              ref_2.column1 as c5,
              ref_1.column5 as c6,
              subq_0.c0 as c7,
              ref_4.column7 as c8,
              subq_0.c2 as c9,
              ref_2.column1 as c10,
              ref_4.column5 as c11
            from
              mytest90.test7 as ref_4
            where true) as subq_1
      where ref_2.column1 is NULL
      limit 61) as subq_2
where (EXISTS (
    select
        subq_3.c0 as c0,
        ref_2.column1 as c1,
        ref_2.column1 as c2,
        case when (false)
            or ((true)
              or (false)) then subq_0.c0 else subq_0.c0 end
           as c3,
        93 as c4,
        7 as c5,
        subq_2.c6 as c6
      from
        mytest90.test1 as ref_5,
        lateral (select
              ref_5.column3 as c0
            from
              mytest90.test3 as ref_6
            where false
            limit 105) as subq_3
      where (false)
        and ((ref_5.column1 is not NULL)
          or (false))
      limit 83))
  or (cast(coalesce(subq_0.c1,
      subq_2.c4) as float) is NULL)
limit 55;
'''

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 2024 11:31] MySQL Verification Team
Duplicate of Bug #114464