Bug 720821 - Client aborts when replaying sender after connection recovery
Summary: Client aborts when replaying sender after connection recovery
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: 1.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: messaging-bugs
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks: 698367
TreeView+ depends on / blocked
 
Reported: 2011-07-12 21:44 UTC by Jason Dillaman
Modified: 2012-03-29 19:58 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-29 19:58:18 UTC
Target Upstream Version:


Attachments (Terms of Use)
Stack backtrace from crash (4.89 KB, text/plain)
2011-07-12 21:45 UTC, Jason Dillaman
no flags Details
Suggested patch (448 bytes, patch)
2011-07-12 21:46 UTC, Jason Dillaman
no flags Details | Diff

Description Jason Dillaman 2011-07-12 21:44:59 UTC
Description of problem:
There is a race condition between qpid::client::SessionImpl::waitForCompletion and qpid::client::SessionImpl::~SessionImpl.  If one thread is waiting for a completion and another thread causes the destructor for the session to be invoked, the destructor can abort the client if waitForCompletion is still holding the state mutex.  The reason this occurs is because waitForCompletion is not holding a Waiter::ScopedWait, so the destructor completes while the mutex is still being held.  This was discovered when testing connection loss and recovery.

Version-Release number of selected component (if applicable):
qpid-cpp-client-0.7.946106-28_ptc_hotfix_5_v2.el5

How reproducible:
Hard to reproduce, but have had several crashes

Actual results:
The client application aborts due to a failed assertion

Expected results:
The client application should continue to function

Additional info:
See attached backtrace between the two competing threads.

Comment 1 Jason Dillaman 2011-07-12 21:45:47 UTC
Created attachment 512527 [details]
Stack backtrace from crash

Comment 2 Jason Dillaman 2011-07-12 21:46:45 UTC
Created attachment 512528 [details]
Suggested patch

Comment 3 Jason Dillaman 2011-07-12 21:51:32 UTC
See https://issues.apache.org/jira/browse/QPID-3355 for details and proposed
patch

Comment 4 Gordon Sim 2011-07-13 10:02:58 UTC
I believe the fix for this is http://svn.apache.org/viewvc?rev=1145935&view=rev, patch attached to QPID-3355 has also been applied however.

Comment 5 Ted Ross 2012-03-29 19:58:18 UTC
This is in the 0.14 rebase


Note You need to log in before you can comment on or make changes to this bug.