[jboss-jira] [JBoss JIRA] (REMJMX-105) Memory leak with http remoting jmx

Darran Lofthouse (JIRA) issues at jboss.org
Tue Aug 21 08:03:03 EDT 2018


     [ https://issues.jboss.org/browse/REMJMX-105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Darran Lofthouse reassigned REMJMX-105:
---------------------------------------

    Assignee:     (was: Darran Lofthouse)


> Memory leak with http remoting jmx
> ----------------------------------
>
>                 Key: REMJMX-105
>                 URL: https://issues.jboss.org/browse/REMJMX-105
>             Project: Remoting JMX
>          Issue Type: Bug
>          Components: Connection
>    Affects Versions: 2.0.1.Final
>            Reporter: Andy G
>         Attachments: screenshot-1.png
>
>
> We see the memory leak with the RemoteConnectionChannel.java when we try to use the JBOSS mbean server connection in web application.
> We initialize the JMX connection factory as below
> {code:borderStyle=solid}
>   try {
>             this.jmxConnector = JMXConnectorFactory.connect(serviceURL, auth);
>             if (this.jmxConnector != null) {
>              
>                 MBeanServerConnection mbs = this.jmxConnector.getMBeanServerConnection();
>                 if (mbs != null) {
>                     this.mbs = mbs;
>                 }
>             }
>             
>         } catch (IOException e) {
>             connected = false;
>             
>             
>         }
> {code}
> Then use mbean server connection after scheduled interval say 60 secs to read the mbeans from above mbean server connection.
> {code:borderStyle=solid}
>   private Map<String, Object> getAttributesForMBean(ObjectName objectName, List<String> attributeNames) {
>     	 
>          HashMap<String, Object> attributeMap = new HashMap<String, Object>();
>         for (String attributeName : attributeNames) {
>             Object attributeValue = null;
>             if (this.hasAttribute(objectName, attributeName)) {
>                 try {
>                     attributeValue = this.mbs.getAttribute(objectName, attributeName);
>                 } catch (Exception e) {
>                     logger.warn("In getAttributes(), for " + objectName + ": " , e);
>                 }
>             }
>             attributeMap.put(attributeName, attributeValue);
>         }
>         
>         return attributeMap;
>     }
> {code}
> We see that RemoteConnectionChannel keeps accumulating XnioWorkerTaskPool and leads to memory leak. 



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list