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

Chesnay Schepler closed FLINK-34496.
------------------------------------
    Resolution: Fixed

master: 
2d78c10211272a264712e86192c4dfc59c6a5521
6c8f3a0799c609d8076f782e5334e389e4d92eee
1.19:
dd77ee5a2501a6750387126c347cf540f3fb172b
1.18:
39ed3cf279d61e4472e1c30a17927992236df467

> 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, 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.
> 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