Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1687401

Summary: sporadic segfault in qpid-cpp-client when closing connection
Product: Red Hat Enterprise MRG Reporter: Pavel Moravec <pmoravec>
Component: qpid-cppAssignee: messaging-bugs <messaging-bugs>
Status: CLOSED ERRATA QA Contact: Messaging QE <messaging-qe-bugs>
Severity: high Docs Contact:
Priority: medium    
Version: 3.2CC: jfrancin, jross, mcressma, zkraus
Target Milestone: 3.2.13Keywords: OtherQA
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: qpid-cpp-1.36.0-22 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-15 07:54:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pavel Moravec 2019-03-11 12:49:02 UTC
Description of problem:
Under an unknown scenario, sporadic segfaults of qpid-cpp client were seen. It is assumed the cause is due to the fix in https://bugzilla.redhat.com/show_bug.cgi?id=1663609 that was in the right direction but swapped 2 commands:

Index: qpid-cpp-1.36.0/src/qpid/client/TCPConnector.cpp
===================================================================
--- qpid-cpp-1.36.0/src/qpid/client/TCPConnector.cpp	(revision 23730)
+++ qpid-cpp-1.36.0/src/qpid/client/TCPConnector.cpp	(revision 23991)
@@ -316,8 +316,8 @@
 
 void TCPConnector::aborted(AsynchIO&) {
     closed = true;
+    socket->close();
     socketClosed(*aio, *socket);
-    socket->close();
 }

The above should be the fix for this BZ.

Rationale: we should close socket first, and then release its FD it used (in socketClosed that calls Poller::unregisterHandle later on).



Version-Release number of selected component (if applicable):
qpid-cpp 1.36.0-20+hf1


How reproducible:
n.a.


Steps to Reproduce:
???


Actual results:


Expected results:


Additional info:

Comment 5 errata-xmlrpc 2019-07-15 07:54:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:1770