Chesnay Schepler created FLINK-34496:
----------------------------------------

             Summary: Classloading deadlock between ExecNodeMetadataUtil and 
JsonSerdeUtil
                 Key: FLINK-34496
                 URL: https://issues.apache.org/jira/browse/FLINK-34496
             Project: Flink
          Issue Type: Bug
          Components: Table SQL / Planner
    Affects Versions: 1.18.1
            Reporter: Chesnay Schepler
             Fix For: 1.19.0, 1.18.2, 1.20.0


This is a fun one!

ExecNodeMetadataUtil and JsonSerdeUtil have a circular dependency in their 
static initialization, which can cause a classloading lockup when 2 threads are 
running the class initialization of each class at the same time because during 
class initialization they hold a lock.

{code}
Feb 22 00:31:58 "ForkJoinPool-3-worker-11" #25 daemon prio=5 os_prio=0 
cpu=219.87ms elapsed=995.99s tid=0x00007ff11c50e000 nid=0xf0fc in Object.wait() 
 [0x00007ff12a4f3000]
Feb 22 00:31:58    java.lang.Thread.State: RUNNABLE
Feb 22 00:31:58         at 
org.apache.flink.table.planner.plan.nodes.exec.serde.JsonSerdeUtil.createFlinkTableJacksonModule(JsonSerdeUtil.java:133)
Feb 22 00:31:58         at 
org.apache.flink.table.planner.plan.nodes.exec.serde.JsonSerdeUtil.<clinit>(JsonSerdeUtil.java:111)

Feb 22 00:31:58 "ForkJoinPool-3-worker-7" #23 daemon prio=5 os_prio=0 
cpu=54.83ms elapsed=996.00s tid=0x00007ff11c50c000 nid=0xf0fb in Object.wait()  
[0x00007ff12a5f4000]
Feb 22 00:31:58    java.lang.Thread.State: RUNNABLE
Feb 22 00:31:58         at 
org.apache.flink.table.planner.plan.utils.ExecNodeMetadataUtil.addToLookupMap(ExecNodeMetadataUtil.java:235)
Feb 22 00:31:58         at 
org.apache.flink.table.planner.plan.utils.ExecNodeMetadataUtil.<clinit>(ExecNodeMetadataUtil.java:156)
{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to