Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-7967

[Java Broker] Internal Oracle TLS classes leaked per connection when connecting the Qpid JMS Client

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: qpid-java-broker-7.0.0
    • Component/s: Broker-J
    • Labels:
      None
    • Environment:

      Java version "1.8.0_144"
      Mac OS X 10.12.6

      Description

      Performing leak analysis shows that the following internal TLS classes are leaked, once per TLS connection, when connecting using the Qpid JMS Client 0.26.0 over AMQP 1.0 with TLS. The same leak was not apparent when connecting the older Qpid JMS AMQP 0-x client.

      The classes are:

      1. sun.security.ssl.SessionId
      2. sun.security.ssl.SSLSessionImpl

      The test is run with the following command:

      mvn exec:java -pl tools  -Dstresstest=qpid-jms-client  -Dexec.args="jndiProperties=stress-test-client-qpid-jms-client.properties jndiConnectionFactory=qpidConnectionFactoryTls connections=100" -Djavax.net.ssl.trustStore=/Users/keith/Downloads/myks.jks -Dqpid-jms-client-version=0.26.0
      

      It seems there is session caching going on within the JDK. The cache size and timeout looks to be tuneable with javax.net.ssl.SSLContext#getServerSessionContext. The default timeout is 86400s (1day) and a session cache size of 0 (unbounded). I suspect if Broker had a sufficiently large number of TLS connections over a short time period, memory may be exhausted.

      I don't currently understand why the behaviour is different between the old/new JMS client. Edit - see comment below.

        Attachments

          Activity

            People

            • Assignee:
              orudyy Alex Rudyy
              Reporter:
              kwall Keith Wall
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: