You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Rob Godfrey (JIRA)" <ji...@apache.org> on 2013/09/25 16:52:03 UTC

[jira] [Resolved] (QPID-5172) Thread safety issue in StringTypeConstructor.construct and SymbolTypeConstructor.construct

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

Rob Godfrey resolved QPID-5172.
-------------------------------

    Resolution: Fixed
      Assignee: Rob Godfrey

Patch applied
                
> Thread safety issue in StringTypeConstructor.construct and SymbolTypeConstructor.construct
> ------------------------------------------------------------------------------------------
>
>                 Key: QPID-5172
>                 URL: https://issues.apache.org/jira/browse/QPID-5172
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.24
>         Environment: Qpid JMS AMQP 1.0 client library (v0.24)
>            Reporter: David Ingham
>            Assignee: Rob Godfrey
>         Attachments: QPID-5172.patch, QPID-5172-stacktrace.txt
>
>
> The implementations of StringTypeConstructor.construct() and SymbolTypeConstructor.construct() use caching to reduce the amount of decoding required. The caches used in these methods are not thread safe and therefore decoding errors can occur in the event of concurrent use.
> Like most threading issues, repro is tricky and somewhat non-deterministic. I got a reliable repro with a scenario in which I primed 2 queues with a few thousand messages and then created 2 connections/sessions/consumers/messagelisteners receiving from one queue each. Eventually an exception would be thrown in CompoundTypeConstructor$MapAssembler.addItem. I'll attach a stack trace for reference.
> The fix is either to remove these caches or make them thread safe.

--
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

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