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

Stephan Ewen commented on FLINK-16245:
--------------------------------------

This is not meat to fix FLINK-14162 (leak via JMX bean), but exactly for 
caching of the thread context class loader, as described here: 
https://issues.apache.org/jira/browse/FLINK-11205?focusedCommentId=16888411&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16888411

Given that we probably build a "delegating classloader" anyways for this 
approach https://github.com/apache/flink/pull/11196#issuecomment-591347938
we could make this here a simple addition in that patch.

> Use a delegating classloader as the user code classloader to prevent class 
> leaks.
> ---------------------------------------------------------------------------------
>
>                 Key: FLINK-16245
>                 URL: https://issues.apache.org/jira/browse/FLINK-16245
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / Task
>            Reporter: Stephan Ewen
>            Priority: Critical
>              Labels: usability
>             Fix For: 1.11.0
>
>
> As reported in FLINK-11205, a reference to the user-code ClassLoader can be 
> held by some libraries, causing class leaks.
> One way to circumvent this class leak is if the ClassLoader that we set as 
> the user-code ClassLoader is a delegating ClassLoader to the real class 
> loader, and when closing the user code ClassLoader we null out the reference.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to