Bug 501689 - Segfault in connector when poller initialisation fails due to lack of available file handles
Segfault in connector when poller initialisation fails due to lack of availab...
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp (Show other bugs)
1.1.1
All Linux
urgent Severity high
: 1.1.2
: ---
Assigned To: Gordon Sim
Frantisek Reznicek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-20 06:49 EDT by Gordon Sim
Modified: 2015-11-15 19:07 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-12 13:39:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
reproducer (2.17 KB, text/x-c++src)
2009-05-20 06:49 EDT, Gordon Sim
no flags Details
fix (731 bytes, patch)
2009-05-20 06:53 EDT, Gordon Sim
no flags Details | Diff

  None (edit)
Description Gordon Sim 2009-05-20 06:49:03 EDT
Created attachment 344778 [details]
reproducer

Description of problem:

A seg fault occurs in the client library when reopening a connection after reports of lack of available file handles.

Version-Release number of selected component (if applicable):

qpidd-0.5.752581-5.el5

How reproducible:

100% with attached reproducer

Steps to Reproduce:
1. start broker
2. run attached test case
  
Actual results:

core dump

Expected results:

no core dump

Additional info:

If when opening a connection there is only one file handle remaining, the socket for the connection is created, but the fds required for the poller's readable pipe are not available. Initialisation of the connectors Poller object fails and the AsynchIO object is left uninitialised. However the closed flag has already been set to false so when the associated connector is then deleted (e.g. on reopening the connection), it tries to shutdown the AsynchIO object which has not been initialised and there is a segfault.
Comment 1 Gordon Sim 2009-05-20 06:53:41 EDT
Created attachment 344783 [details]
fix
Comment 2 Gordon Sim 2009-05-21 04:54:21 EDT
Fixed on trunk (r777006) and in qpidc-0.5.752581-7.el5.
Comment 3 Frantisek Reznicek 2009-05-29 10:38:02 EDT
The issue has been fixed, validated on RHEL 5.3 i386 / x86_64 on packages qpid*-0.5.752581-9.el5.

Waiting for RHEL4 build...
Comment 5 Frantisek Reznicek 2009-06-02 02:56:41 EDT
The issue has been fixed, validated on RHEL 4.7 / 5.3 i386 / x86_64 on packages qpid*-0.5.752581-10.el5 and qpidd-0.5.752581-11.el4.

-> VERIFIED
Comment 7 errata-xmlrpc 2009-06-12 13:39:07 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1097.html

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