activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (AMQ-6801) race in WSTransportProxy startup can lead to WebSocket connection failure
Date Fri, 01 Sep 2017 12:02:01 GMT


ASF subversion and git services commented on AMQ-6801:

Commit 2e492569db2345cf3be8532630f93219159a8b15 in activemq's branch refs/heads/master from
[;h=2e49256 ]

AMQ-6801: ensure transport listener is set before tripping latch to indicate startup is occuring

> race in WSTransportProxy startup can lead to WebSocket connection failure
> -------------------------------------------------------------------------
>                 Key: AMQ-6801
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.15.0
>            Reporter: Robbie Gemmell
>            Assignee: Robbie Gemmell
>             Fix For: 5.15.1, 5.16.0
> There is a race between the startup and arrival of data in the WSTransportProxy class
that can lead to failure to create a WebSocket connection because there is no transport listener
available when data arrives, at least over AMQP where the SASL header arrives and can't be
processed. This has been observed causing Websocket related test failures in the ActiveMQ
CI jobs and also in Qpid JMS CI jobs (seemingly only since it was updated to use 5.15.0, though
this code hasn't changed since introduction in 5.14.0 it appears?).
> When supplied with new frame data, there is a check that the WSTransportProxy instance
has already been started, and if not a latch wait is performed until it is before proceeding.
This latch is tripped during startup but before the transport listener has been set, meaning
it is possible for frame data processing to proceed before the listener is actually set on
the transport. Also, the listener field isn't volatile so it could additionally be true that
the thread processing the data doesnt yet see a listener which has been set on the transport
in the startup thread. Moving the latch trip to after setting the listener should address
both those issues.

This message was sent by Atlassian JIRA

View raw message