karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grzegorz Grzybek (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-4686) ClassLoader leak with RmiRegistryFactory and sun.rmi.transport.tcp.TCPEndpoint
Date Wed, 31 Aug 2016 15:58:20 GMT

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

Grzegorz Grzybek commented on KARAF-4686:
-----------------------------------------

PR: https://github.com/apache/karaf/pull/233

> ClassLoader leak with RmiRegistryFactory and sun.rmi.transport.tcp.TCPEndpoint
> ------------------------------------------------------------------------------
>
>                 Key: KARAF-4686
>                 URL: https://issues.apache.org/jira/browse/KARAF-4686
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 2.4.4, 4.0.6, 3.0.8
>            Reporter: Grzegorz Grzybek
>
> Here's a leak I found in JVisualVM.
> {noformat}
> this     - value: org.apache.felix.framework.BundleWiringImpl #3
>  <- m_wiring     - class: org.apache.felix.framework.BundleWiringImpl$BundleClassLoaderJava5,
value: org.apache.felix.framework.BundleWiringImpl #3
>   <- <classLoader>     - class: org.apache.karaf.management.RmiRegistryFactory$KarafServerSocketFactory,
value: org.apache.felix.framework.BundleWiringImpl$BundleClassLoaderJava5 #3
>    <- <class>     - class: org.apache.karaf.management.RmiRegistryFactory$KarafServerSocketFactory,
value: org.apache.karaf.management.RmiRegistryFactory$KarafServerSocketFactory class RmiRegistryFactory$KarafServerSocketFactory
>     <- ssf     - class: sun.rmi.transport.tcp.TCPEndpoint, value: org.apache.karaf.management.RmiRegistryFactory$KarafServerSocketFactory
#1
>      <- key     - class: java.util.HashMap$Entry, value: sun.rmi.transport.tcp.TCPEndpoint
#9
>       <- next     - class: java.util.HashMap$Entry, value: java.util.HashMap$Entry
#19809
>        <- [0]     - class: java.util.HashMap$Entry[], value: java.util.HashMap$Entry
#28136
>         <- table     - class: java.util.HashMap, value: java.util.HashMap$Entry[]
#4031
>          <- localEndpoints (sticky class)     - class: sun.rmi.transport.tcp.TCPEndpoint,
value: java.util.HashMap #4065
> {noformat}
> sun.rmi.transport.tcp.TCPEndpoint has non-weak map that keeps references to socket factories:
http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/48c99b423839/src/share/classes/sun/rmi/transport/tcp/TCPEndpoint.java#l148
> This prevents cleaning up classloader of {{org.apache.karaf.management.server}} bundle.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message