Bug 1687401 - sporadic segfault in qpid-cpp-client when closing connection
Summary: sporadic segfault in qpid-cpp-client when closing connection
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: 3.2
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: 3.2.13
: ---
Assignee: messaging-bugs
QA Contact: Messaging QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-11 12:49 UTC by Pavel Moravec
Modified: 2019-07-15 07:54 UTC (History)
4 users (show)

Fixed In Version: qpid-cpp-1.36.0-22
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-15 07:54:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:1770 0 None None None 2019-07-15 07:54:57 UTC

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


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