qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marty B (JIRA)" <j...@apache.org>
Subject [jira] [Created] (QPID-6647) Thread Leak when Connection is closed while a MessageConsumer is in a receive()
Date Thu, 16 Jul 2015 20:01:05 GMT
Marty B created QPID-6647:

             Summary: Thread Leak when Connection is closed while a MessageConsumer is in
a receive()
                 Key: QPID-6647
                 URL: https://issues.apache.org/jira/browse/QPID-6647
             Project: Qpid
          Issue Type: Bug
          Components: Java Client
    Affects Versions: 0.32
         Environment: Tested in the following environments:
OSX 10.10.4 with Oracle Java SE Runtime 1.8.0_45-b14
OSX 10.10.4 with Oracle Java SE Runtime 1.7.0_67
RHEL 6.3 with OpenJDK RE Java 1.7.0_71 (rhel- u71-b14)
            Reporter: Marty B

A thread leak occurs in our environment running the QPID 0.32 Java client over time.  As best
as I can tell from the reproduction code and troubleshooting with jconsole the Dispatcher-X-Conn-X
threads are not always getting cleaned up.  It appears to happen when the Connection is interrupted
/ closed while the MessageConsumer is in receive() but I don't know that for a fact.

I've attached a zip with some demo code and a gradle build script that reproduces the problem.

Steps to reproduce:
1. Unzip archive.
2. Start up a QPID broker (tried with Java and C++, no difference but I didn't expect to see
3. Run ./gradlew run -PbrokerUrl="amqp://guest:guest@localhost/default?brokerlist='tcp://your.qpid.broker:5672?heartbeat='5'&retries='5'&connectdelay='5000''"
-Pconsumers=100 -Pruntime=30
4. Launch jconsole and connect to the {{Main ....}} process.
5. Switch to the Threads tab and watch that it grows over time and the Dispatcher-X-Conn-X
threads continue to accumulate.

*Note:* I disabled the WARN and INFO error logging from QPID since it is _very_ spammy with
thrown InterruptedExceptions and makes it hard to see any other errors that pop up.  That
can be changed by changing the system property being sent to the slf4j simple logger set in

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org

View raw message