Bug 471234 - Client hangs if broker returns invalid URL in closeOk
Client hangs if broker returns invalid URL in closeOk
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp (Show other bugs)
All Linux
medium Severity medium
: 1.1
: ---
Assigned To: Gordon Sim
Kim van der Riet
Depends On:
  Show dependency treegraph
Reported: 2008-11-12 10:49 EST by Alan Conway
Modified: 2011-08-12 12:22 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-11-13 09:51:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alan Conway 2008-11-12 10:49:39 EST
Description of problem:

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

How reproducible: easy

Steps to Reproduce:
1. Hack the broker to return an invalid URL,e.g. comment out the body of  SystemInfo::getLocalIpAddresses so it returns an empty list.
2. Run any client, e.g. client_test or perftest.

Actual results:
Client hangs

Expected results:
Client exits with appropriate exception message.

Additional info:

Looks like the exception is caught in ConnectionHandler::incoming and the state set to CLOSING, but the client thread is waiting for CLOSED and it seems that this transition never happens.
Comment 1 Gordon Sim 2008-11-13 09:51:01 EST
This is a result of the Connector being closed before the connection_close request is written to the wire, this means the broker never receives it and never responds with a close-ok which triggers the change tto the CLOSED state.

Fix is to record the error, let the close be sent and on receiving the clos-ok handle the error if set.

By-passing QE on this one as (a) its an obscure corner case in error handling and thus not a priority for verification and (b) testing it requires hacking the broker to send a bad url.

Fixed in r713739.

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