[ 
https://issues.apache.org/jira/browse/FLINK-34496?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chesnay Schepler updated FLINK-34496:
-------------------------------------
    Fix Version/s:     (was: 1.20.0)

> 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
>            Assignee: Chesnay Schepler
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.19.0, 1.18.2
>
>
> 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.
> https://ternarysearch.blogspot.com/2013/07/static-initialization-deadlock.html
> JsonSerdeUtils#createFlinkTableJacksonModule calls into the 
> ExecNodeMetadataUtil, while ExecNodeMetadataUtil#addToLookupMap calls into 
> the JsonSerdeUtils.
> {code}
>  "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]
>     java.lang.Thread.State: RUNNABLE
>       at 
> o.a.f.t.p.plan.nodes.exec.serde.JsonSerdeUtil.createFlinkTableJacksonModule(JsonSerdeUtil.java:133)
>       at 
> o.a.f.t.p.plan.nodes.exec.serde.JsonSerdeUtil.<clinit>(JsonSerdeUtil.java:111)
> "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]
>    java.lang.Thread.State: RUNNABLE
>       at 
> o.a.f.t.p.plan.utils.ExecNodeMetadataUtil.addToLookupMap(ExecNodeMetadataUtil.java:235)
>       at 
> o.a.f.t.p.plan.utils.ExecNodeMetadataUtil.<clinit>(ExecNodeMetadataUtil.java:156)
> {code}



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

Reply via email to