[
https://issues.apache.org/jira/browse/LOG4J2-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16338080#comment-16338080
]
edgar wang commented on LOG4J2-2216:
------------------------------------
Since the clientgui is enabled by default, we think the connection is not being
closed by java as we restart log4j.
To clarify, I analyzed thread dump with a thread analysis tool and see there
are many blocked connection timeout JMX threads. Although I don't know exactly
how this could happen, I'm bringing it up as a potential bug and starting
place. There are only 2 places in our stack where we use JMXFactoryConnector.
> JMXFactoryConnector is not closed in ClientGui
> ----------------------------------------------
>
> Key: LOG4J2-2216
> URL: https://issues.apache.org/jira/browse/LOG4J2-2216
> Project: Log4j 2
> Issue Type: Bug
> Components: JMX
> Affects Versions: 2.6, 2.8
> Reporter: edgar wang
> Priority: Minor
>
> JMXFactoryConnector is not closed in ClientGui. This potentially could cause
> a thread leak according to
> [https://stackoverflow.com/questions/564589/dynamic-proxies-with-jmx-can-cause-thread-leaks]
> . Since JMXFactoryConnector implements closable and autoclosable, it should
> be wrapped in a try with resources or the connector should be closed
> somewhere.
> We've seen several unclosed JMX threads in our production environment and
> believe this could be a reason why.
> Could anyone advise?
> Thanks!
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)