[jboss-jira] [JBoss JIRA] (WFLY-9073) Thread Leak in jboss-client on JMX remoting authentication failure

NITIN RANJAN (JIRA) issues at jboss.org
Wed Nov 15 04:51:00 EST 2017


    [ https://issues.jboss.org/browse/WFLY-9073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490254#comment-13490254 ] 

NITIN RANJAN edited comment on WFLY-9073 at 11/15/17 4:50 AM:
--------------------------------------------------------------

check *close()* method in 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. *line num: 298*  instead of making it to return it should be break statement or *safeClose(endpoint) method call; return;* 
 !close.png|thumbnail!   


was (Author: nitinranjan269):
check close method in 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. *line num: 298*  instead of making it to return it should be break statement or *safeClose(endpoint) method call; return;* 
 !close.png|thumbnail!   

> Thread Leak in jboss-client on JMX remoting authentication failure
> ------------------------------------------------------------------
>
>                 Key: WFLY-9073
>                 URL: https://issues.jboss.org/browse/WFLY-9073
>             Project: WildFly
>          Issue Type: Bug
>          Components: Application Client, JMX
>    Affects Versions: 10.1.0.Final
>            Reporter: Piotr Krokowski
>            Assignee: Stuart Douglas
>         Attachments: JbossClientThreadLeakDemo.java, close.png
>
>
> I've observed, that authentication failure, while connecting with jboss-client implementation of JMX remoting (remote+http) causes a thread leak. 
> Please find the attached code snippet to reproduce the faulty behavior.
> The attached code produces following output in my case :
> Thread count before starting:  2
> Active threads AFTER start: 2
> Connection failed.
> Active threads AFTER after success: 7
> Connection failed.
> Active threads AFTER after failure: 12
> Possible cause.
> After an initial analisys I've observed that RemotingConnector.internalConnect throws an Exception, while having state set to UNUSED, while I'd actually expect it being set to OPEN, as connection and endpoint fields are already initialized.



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


More information about the jboss-jira mailing list