David Ingham created QPID-5172:
----------------------------------
Summary: 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
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: [email protected]
For additional commands, e-mail: [email protected]