Bug 471234 - Client hangs if broker returns invalid URL in closeOk
Summary: Client hangs if broker returns invalid URL in closeOk
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: beta
Hardware: All
OS: Linux
medium
medium
Target Milestone: 1.1
: ---
Assignee: Gordon Sim
QA Contact: Kim van der Riet
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-12 15:49 UTC by Alan Conway
Modified: 2011-08-12 16:22 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-13 14:51:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Alan Conway 2008-11-12 15:49:39 UTC
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 14:51:01 UTC
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.