Bug 471234

Summary: Client hangs if broker returns invalid URL in closeOk
Product: Red Hat Enterprise MRG Reporter: Alan Conway <aconway>
Component: qpid-cppAssignee: Gordon Sim <gsim>
Status: CLOSED CURRENTRELEASE QA Contact: Kim van der Riet <kim.vdriet>
Severity: medium Docs Contact:
Priority: medium    
Version: beta   
Target Milestone: 1.1   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-11-13 14:51:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.