[ 
https://issues.apache.org/jira/browse/FLINK-33623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17791412#comment-17791412
 ] 

gabrywu commented on FLINK-33623:
---------------------------------

[~mapohl] it's not related to FLINK-25023. 

you can start a minimal flink cluster on your desktop, and submit an example 
`$FLINK_HOME/examples/batch/WordCount.jar`, and this leak will be there.

Flink Netty Client is using 
`org.apache.flink.runtime.io.network.netty.NettyServer.THREAD_FACTORY_BUILDER` 
to create a thread when flink job starts, this factory will create a thread 
with parent context class loader as its `contextClassLoader`

Here is a clue.

!image.png!

> Metaspce leak caused by Flink Netty Client thread
> -------------------------------------------------
>
>                 Key: FLINK-33623
>                 URL: https://issues.apache.org/jira/browse/FLINK-33623
>             Project: Flink
>          Issue Type: Bug
>    Affects Versions: 1.13.5, 1.18.0
>            Reporter: gabrywu
>            Priority: Minor
>         Attachments: image-2023-11-23-09-47-50-536.png, image.png
>
>
> Hi, folks, 
> We found that there is a Flink Netty Client thread with contextClassLoader 
> `ChildFirstClassLoader`, and it causes a metaspace leak.
> TIPs
>  classloader.check-leaked-classloader = false
>  
> !image-2023-11-23-09-47-50-536.png|width=1175,height=651!



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

Reply via email to