You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Christopher L. Shannon (Jira)" <ji...@apache.org> on 2021/06/02 13:35:00 UTC

[jira] [Comment Edited] (AMQ-8169) StompNIOSSLTest test fails with more recent JDK 8 versions

    [ https://issues.apache.org/jira/browse/AMQ-8169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17355696#comment-17355696 ] 

Christopher L. Shannon edited comment on AMQ-8169 at 6/2/21, 1:34 PM:
----------------------------------------------------------------------

FYI - I ran into a deadlock after this fix, I created a new Jira to track the issue to fix it: AMQ-8287


was (Author: christopher.l.shannon):
FYI - I ran into a deadlock after this fix. The newly added synchronized on the serviceRead() caused a deadlock between the transport and the TransportConnection. One thread acquired a lock on the TransportConnection and was waiting on serviceRead() to acquire the NIOSSLTransport lock. Another thread had was inside secureRead() so it acquired the NIOSSLTransport lock and was then later waiting for the TransportConnection lock.

The main issue is that processCommand(plain) ends up being protected by the lock and since there's multiple brokers/filters running we run into a deadlock (my current deadlock happened processing a ConsumerInfo command)

To fix this we simply need to narrow the lock as it's too broad. The goal here was to protect the SSL handshake and initialization so we can move the lock to secureRead() or doHandshake() and not lock serviceRead() and that should fix the deadlock problem while still solving the initial issue which was demonstrated by the StompNIOSSL failing before this fix. I will open a new Jira shortly and push a fix.

> StompNIOSSLTest test fails with more recent JDK 8 versions
> ----------------------------------------------------------
>
>                 Key: AMQ-8169
>                 URL: https://issues.apache.org/jira/browse/AMQ-8169
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.17.0
>            Reporter: Matt Pavlovich
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>             Fix For: 5.17.0, 5.15.15, 5.16.2
>
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> The StompNIOSSL test fails during CI/CD tests with certain JDK versions. This blocks PR's from getting a green status
> To reproduce:
> [x] Fails with jdk1.8.0_281
> [x] Passes with jdk1.8.0_211
> Suspects:
> * The test SSL cert needs to be generated with a newer cipher and/or length 
> * The NIOSSLTransport has a bad byte[] read bug



--
This message was sent by Atlassian Jira
(v8.3.4#803005)