You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2013/02/13 01:41:14 UTC

[jira] [Resolved] (AMQ-4312) NIO+SSL Connector fails with SSL exception under high concurrency

     [ https://issues.apache.org/jira/browse/AMQ-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish resolved AMQ-4312.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 5.9.0
         Assignee: Timothy Bish

Patch applied, great work. 
                
> NIO+SSL Connector fails with SSL exception under high concurrency
> -----------------------------------------------------------------
>
>                 Key: AMQ-4312
>                 URL: https://issues.apache.org/jira/browse/AMQ-4312
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 5.7.0, 5.8.0
>         Environment: JDK 1.7.0_09, Windows 7 x64, Linux CentOS5 64-bit
>            Reporter: Craig Condit
>            Assignee: Timothy Bish
>              Labels: nio, ssl, transport
>             Fix For: 5.9.0
>
>         Attachments: AMQ-4312.patch, AMQ-4312-test.patch, NIOSSLConcurrencyTest.java
>
>
> Under high concurrency, the NIO+SSL connector causes client connections to fail with random SSL exceptions (usually bad record MAC or invalid padding) after a period of time.
> For example:
> {code}
> javax.net.ssl.SSLException: bad record MAC
> 	at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
> 	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1902)
> 	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1855)
> 	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:988)
> 	at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:884)
> 	at sun.security.ssl.AppInputStream.read(AppInputStream.java:102)
> 	at org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50)
> 	at org.apache.activemq.transport.tcp.TcpTransport$2.fill(TcpTransport.java:604)
> 	at org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:58)
> 	at org.apache.activemq.transport.tcp.TcpTransport$2.read(TcpTransport.java:589)
> 	at java.io.DataInputStream.readInt(DataInputStream.java:387)
> 	at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:275)
> 	at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:221)
> 	at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:213)
> 	at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
> 	at java.lang.Thread.run(Thread.java:722)</pre>
> {code}
> I suspect this may be related to AMQ-4135, since we are seeing nearly identical failure modes.
> I am able to duplicate these results fairly consistently using a variant of NIOSSLLoadTest which uses 10 producers, 10 consumers, 10000 messages, and a bytes message of size 4096 with all producers and consumers using separate (multiplexed) sessions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira