[jboss-jira] [JBoss JIRA] (REMJMX-157) Resource Leak in RemotingConnector
Stefan Mocken (JIRA)
issues at jboss.org
Mon Feb 19 08:17:00 EST 2018
Stefan Mocken created REMJMX-157:
------------------------------------
Summary: Resource Leak in RemotingConnector
Key: REMJMX-157
URL: https://issues.jboss.org/browse/REMJMX-157
Project: Remoting JMX
Issue Type: Bug
Reporter: Stefan Mocken
Assignee: Darran Lofthouse
If opening a Connection fails for any reason, the Endpoint is not closed.
So in a corrosponding thread dump for every failed connection there will be the following dead entries:
############################################################
"Remoting "endpoint" Accept" #215802 daemon prio=5 os_prio=0 tid=0x00007f48dc21a000 nid=0x4e8e runnable [0x00007f48894d6000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
- locked <0x00000000f01d1d10> (a sun.nio.ch.Util$3)
- locked <0x00000000f01d1d00> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000000f01d1be8> (a sun.nio.ch.EPollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:101)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:509)
"Remoting "endpoint" I/O-1" #215801 daemon prio=5 os_prio=0 tid=0x00007f48dc08c000 nid=0x4e8d runnable [0x00007f4885ea0000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
- locked <0x00000000f01cc188> (a sun.nio.ch.Util$3)
- locked <0x00000000f01cc178> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000000f01cc060> (a sun.nio.ch.EPollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:101)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:509)
############################################################
NitinRanjan suggested to patch
the close() method of RemotingConnector.java which is responsible for closing the endpoint threads and others.
In case of connection not established the state is UNUSED which makes the close method to return without closing the endpoint thread.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list