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

Robert Metzger commented on FLINK-17554:
----------------------------------------

After an offline discussion, I took over this ticket from Till (I'm assigning 
it to me).

I tried registering a shutdown hook for the Kinesis Producer, but the 
classloaders are still not unloading, after calling 
{{AwsSdkMetrics.unregisterMetricAdminMBean()}}.

The problem is the {{FileAgeManager}}, which can not be unloaded. [~hwanju] 
[mentioned|https://github.com/apache/flink/pull/11196#issuecomment-592035356] 
this problem already in February.
I propose and work these next steps:
- File a ticket with Amazon to fix the {{FileAgeManager}}
- manually fix the {{FileAgeManager}} in the KPL and validate that there's 
nothing else causing any further problems
- finalize the shutdownhook pull request so that we can merge this for future 
use.


> Add release hooks for user code class loader
> --------------------------------------------
>
>                 Key: FLINK-17554
>                 URL: https://issues.apache.org/jira/browse/FLINK-17554
>             Project: Flink
>          Issue Type: New Feature
>          Components: Runtime / Coordination
>    Affects Versions: 1.11.0
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.12.0
>
>
> Release hooks for the user code class loader which are run just before the 
> user code class loader is released would allow clean up static references to 
> classes of the user code class loader. This is important because these static 
> references could prevent the user code classes from being garbage collected 
> and eventually causing metaspace OOMs.
> Hence I suggest to extend the {{RuntimeContext}} with an additional method 
> {{registerUserCodeClassLoaderReleaseHook(Runnable releaseHook)}} which allows 
> the user code to register a release hook for the user code class loader.



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

Reply via email to