Race in qpid::client::Bounds causes (rare) deadlock
---------------------------------------------------
Key: QPID-2631
URL: https://issues.apache.org/jira/browse/QPID-2631
Project: Qpid
Issue Type: Bug
Components: C++ Client
Affects Versions: 0.6, 0.5
Reporter: Gordon Sim
Assignee: Gordon Sim
Fix For: 0.7
There is a race condition in the use of Bounds in SessionImpl::sendFrame. This
function sends the frame first, then calls
Bounds::expand(). But it's possible the network thread calls Bounds::reduce()
between sending the frame and calling expand. If the Bounds::current value is 0
that reduce() is lost. If enough reduce() calls are lost in this way eventually
we will deadlock.
In investigating this it also became clear that the connection frames weren't
correctly accounted for (i.e. the bounds are never expended for connection
frames, though they are included in the byte count passed in on reduce()).
Though this shouldn't actually cause any problem it is logically incorrect,
unintuitive and could mask problems that are hard to diagnose.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]