Thread leak when performing JMS operations in JBoss EAP

Solution Verified - Updated -

Issue

  • There is an instance of JBoss which frequently sends JMS messages to another instance via the ClusteredConnectionFactory.  Each JMS connection is only used to send one message and then is closed.  However, the thread count in A keeps growing. The thread dump in JBoss A reveals that the majority of the threads are bisocket control threads, with the following stack trace:
    "control: Socket[addr=127.0.0.1,port=45892,localport=51040]" daemon prio=3 tid=0x056c2800 nid=0x2002 runnable [0x5ba4f000]
        java.lang.Thread.State: RUNNABLE
            java.net.SocketInputStream.socketRead0(Native Method)
            java.net.SocketInputStream.read(SocketInputStream.java:129)
            java.net.SocketInputStream.read(SocketInputStream.java:182)
            java.io.FilterInputStream.read(FilterInputStream.java:66)
    org.jboss.remoting.transport.bisocket.BisocketServerInvoker$ControlConnectionThread.run(BisocketServerInvoker.java:748)
  • Application performance is very slow and thread dump shows above stack trace.
  • Eventually, no new threads can be created in JBoss A and java.lang.OutOfMemoryError: unable to create new native thread errors are received.

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 4.3
    • 5.x
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.