Bug 1009467 - [amqp1.0] Client is not finished when connecting to address that do not provide the service
Summary: [amqp1.0] Client is not finished when connecting to address that do not provi...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: Development
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: 3.0
: ---
Assignee: Gordon Sim
QA Contact: Petr Matousek
URL:
Whiteboard:
Depends On:
Blocks: 1010399
TreeView+ depends on / blocked
 
Reported: 2013-09-18 14:03 UTC by Petr Matousek
Modified: 2015-01-21 12:55 UTC (History)
4 users (show)

Fixed In Version: qpid-cpp-0.22-17
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-21 12:55:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Apache JIRA QPID-5147 0 None None None Never
Red Hat Bugzilla 1001772 0 medium CLOSED [AMQP 1.0] support for automatic reconnect 2021-02-22 00:41:40 UTC

Internal Links: 1001772

Description Petr Matousek 2013-09-18 14:03:00 UTC
Description of problem:

When connecting using a client to the address that do not provide the service, clients reports following message, but the client is not finished:
2013-09-17 08:51:55 [Messaging] error wakeupDriver() called while not connected

Note: The same applies to qpid-send client (see additional info)
Note: The same applies when trying to connect using ssl to the broker that is listening only for tcp connections only, ie:
./spout  --connection-options "{protocol:'amqp1.0',transport:ssl}" "q;{ create:always}"

Version-Release number of selected component (if applicable):
qpid-cpp-*-0.22-14

How reproducible:
100%

Steps to Reproduce:
1. spout -b BADADDRESS --connection-options '{protocol:amqp1.0}' amq.direct
2. connection error is reported, client is not finished

Actual results:
Clients reports an connection error, but the client is never finished

Expected results:
Client shall report an error and exit with non-zero exit code

Additional info:

client process stack:

#0  0x00e2e424 in __kernel_vsyscall ()
#1  0x006ad326 in epoll_wait () from /lib/libc.so.6
#2  0x00f5a19c in qpid::sys::Poller::wait(qpid::sys::Duration) () from /usr/lib/libqpidcommon.so.9
#3  0x00f5a973 in qpid::sys::Poller::run() () from /usr/lib/libqpidcommon.so.9
#4  0x00f4ea51 in qpid::sys::(anonymous namespace)::runRunnable(void*) () from /usr/lib/libqpidcommon.so.9
#5  0x00769a49 in start_thread () from /lib/libpthread.so.0
#6  0x006acaae in clone () from /lib/libc.so.6
Thread 1 (Thread 0xb76f5730 (LWP 5726)):
#0  0x00e2e424 in __kernel_vsyscall ()
#1  0x0076d2bc in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x006bc6dd in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libc.so.6
#3  0x0094bc75 in qpid::messaging::amqp::ConnectionContext::wait() () from /usr/lib/qpid/client/amqpc.so
#4  0x0094eb13 in qpid::messaging::amqp::ConnectionContext::newSession(bool, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/qpid/client/amqpc.so
#5  0x00954944 in qpid::messaging::amqp::ConnectionHandle::newSession(bool, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/qpid/client/amqpc.so
#6  0x00c5ddea in qpid::messaging::Connection::createSession(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/libqpidmessaging.so.3
#7  0x0804a424 in main ()


qpid-send --log-to-stdout yes --log-enable debug+  --connection-options "{protocol:'amqp1.0'}" -a "node-conn_opts_transport_queue-test_transport_opts-0;{ create:always, node: {  }, link: {  } }" -b nonexistingnode
2013-09-18 09:30:47 [Messaging] debug Driver started
2013-09-18 09:30:47 [Messaging] debug Driver started
2013-09-18 09:30:47 [Messaging] info Trying to connect to nonexistingnode...
2013-09-18 09:30:47 [Messaging] info Trying to connect to nonexistingnode...
2013-09-18 09:30:47 [Messaging] debug nonexistingnode:5672 Connecting ...
2013-09-18 09:30:47 [Messaging] debug nonexistingnode:5672 Connecting ...
2013-09-18 09:30:47 [System] debug Exception constructed: Cannot resolve nonexistingnode:5672: Name or service not known (/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/sys/posix/SocketAddress.cpp:148)
2013-09-18 09:30:47 [System] debug Exception constructed: Cannot resolve nonexistingnode:5672: Name or service not known (/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/sys/posix/SocketAddress.cpp:148)
2013-09-18 09:30:47 [Messaging] info nonexistingnode:5672 Error while connecting: Cannot resolve nonexistingnode:5672: Name or service not known (/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/sys/posix/SocketAddress.cpp:148)
2013-09-18 09:30:47 [Messaging] info nonexistingnode:5672 Error while connecting: Cannot resolve nonexistingnode:5672: Name or service not known (/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/sys/posix/SocketAddress.cpp:148)
2013-09-18 09:30:47 [Messaging] error wakeupDriver() called while not connected
2013-09-18 09:30:47 [Messaging] error wakeupDriver() called while not connected

Comment 1 Gordon Sim 2013-09-20 15:49:41 UTC
Fixed upstream: https://svn.apache.org/r1525041

Comment 4 Petr Matousek 2014-01-15 18:43:04 UTC
This issue has been fixed. Verified on rhel6.5 (x86_64, i386).

packages under test:
qpid-cpp-*-0.22-30

-> VERIFIED


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