Bug 1017113 - Windows C++ and .NET clients fail during connecting a broker via AMQP 1.0 protocol
Summary: Windows C++ and .NET clients fail during connecting a broker via AMQP 1.0 pro...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: Development
Hardware: Unspecified
OS: Windows
high
high
Target Milestone: 3.0
: ---
Assignee: Chuck Rolke
QA Contact: Petra Svobodová
URL:
Whiteboard:
Depends On:
Blocks: 1010399
TreeView+ depends on / blocked
 
Reported: 2013-10-09 09:33 UTC by Petra Svobodová
Modified: 2015-01-21 12:55 UTC (History)
4 users (show)

Fixed In Version: qpid-cpp-win-3.22.19.1-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-21 12:55:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Petra Svobodová 2013-10-09 09:33:59 UTC
Description of problem:
C++ and .NET clients on Windows fail if they try to open connection with a broker using AMQP 1.0 protocol.

Windows command line transcript:
C:\qpid_VS2008\bin\Release>spout.exe --broker 10.34.37.200 --connection-options
{protocol:amqp1.0} --content "hi" "add;{create:always}"

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

C:\qpid_VS2008\bin\Release>csharp.example.spout.exe --broker 10.34.37.200 --conn
ection-options {protocol:amqp1.0} --content "hi" "add;{create:always}"
Exception System.Runtime.InteropServices.SEHException: External component has th
rown an exception.
   at qpid.messaging.Connection.{ctor}(Connection* , basic_string<char\,std::cha
r_traits<char>\,std::allocator<char> >* , basic_string<char\,std::char_traits<ch
ar>\,std::allocator<char> >* )
   at Org.Apache.Qpid.Messaging.Connection..ctor(String url, String options) in
q:\qpid-0.22\cpp\bindings\qpid\dotnet\src\connection.cpp:line 113
   at Org.Apache.Qpid.Messaging.Examples.Spout.Main(String[] args) in c:\qpid_VS
2008\dotnet_examples\examples\csharp.example.spout\csharp.example.spout.cs:line
69.

For more information see Aditional info part, please.

Version-Release number of selected component (if applicable):
qpid-cpp-win-3.22.18.1-1

How reproducible:
100%

Steps to Reproduce:
1. Start qpid broker.
2. Unpack and compile examples.
3. Try to send a message using AMQP 1.0 protocol:
spout.exe --broker <hostname:port> --connection-options "{protocol: amqp1.0}" --content "HI" "addr;{create:always}"

Actual results:
Client fails before connecting to the broker.

Expected results:
The client should connect to the broker and the message should be sent.

Additional info:
C++ spout.exe debug information from WinDbg tool:

CommandLine: C:\qpid_VS2008\bin\Debug\spout.exe --broker 10.34.33.199 --connection-options "{protocol: amqp1.0}" --content "HELLO" "ad;{create:always}"
Starting directory: C:\qpid_VS2008\bin\Debug
WARNING: Path element is empty
WARNING: Non-directory path: 'C:\qpid_VS2010\bin\Debug\map_receiver.pdb'
WARNING: Inaccessible path: 'C:\qpid_VS2010\bin\Debug\qpidcommond.pdb'
WARNING: Inaccessible path: 'C:\qpid_VS2010\bin\Debug\qpidmessagingd.pdb'
WARNING: Inaccessible path: 'C:\qpid_VS2010\bin\Debug\qpidclientd.pdb'
WARNING: Inaccessible path: 'C:\qpid_VS2010\bin\Debug\qpidtypesd.pdb'
Symbol search path is: http://msdl.microsoft.com/download/symbols;;C:\qpid_VS2010\bin\Debug\map_receiver.pdb;C:\qpid_VS2010\bin\Debug\qpidcommond.pdb;C:\qpid_VS2010\bin\Debug\qpidmessagingd.pdb;C:\qpid_VS2010\bin\Debug\qpidclientd.pdb;C:\qpid_VS2010\bin\Debug\qpidtypesd.pdb
Executable search path is: 
ModLoad: 00400000 00428000   spout.exe
ModLoad: 7c900000 7c9b2000   ntdll.dll
ModLoad: 7c800000 7c8f6000   C:\WINDOWS\system32\kernel32.dll
ModLoad: 10000000 1014a000   C:\qpid_VS2008\bin\Debug\qpidmessagingd.dll
ModLoad: 00250000 003d4000   C:\qpid_VS2008\bin\Debug\qpidclientd.dll
ModLoad: 00dc0000 0112f000   C:\qpid_VS2008\bin\Debug\qpidcommond.dll
ModLoad: 77dd0000 77e6b000   C:\WINDOWS\system32\ADVAPI32.dll
ModLoad: 77e70000 77f03000   C:\WINDOWS\system32\RPCRT4.dll
ModLoad: 77fe0000 77ff1000   C:\WINDOWS\system32\Secur32.dll
ModLoad: 01130000 01180000   C:\qpid_VS2008\bin\Debug\qpidtypesd.dll
ModLoad: 10480000 10557000   C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_f863c71f\MSVCP90D.dll
ModLoad: 10200000 10323000   C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_f863c71f\MSVCR90D.dll
ModLoad: 71ab0000 71ac7000   C:\WINDOWS\system32\WS2_32.dll
ModLoad: 77c10000 77c68000   C:\WINDOWS\system32\msvcrt.dll
ModLoad: 71aa0000 71aa8000   C:\WINDOWS\system32\WS2HELP.dll
ModLoad: 01190000 011a3000   C:\qpid_VS2008\bin\Debug\boost_thread-vc90-mt-gd-1_47.dll
ModLoad: 011c0000 011d5000   C:\qpid_VS2008\bin\Debug\boost_date_time-vc90-mt-gd-1_47.dll
ModLoad: 011f0000 0126f000   C:\qpid_VS2008\bin\Debug\boost_program_options-vc90-mt-gd-1_47.dll
(de8.d20): Break instruction exception - code 80000003 (first chance)
eax=00151eb4 ebx=7ffd5000 ecx=00000002 edx=00000004 esi=00151f48 edi=00151eb4
eip=7c90120e esp=00dbfb20 ebp=00dbfc94 iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202
ntdll!DbgBreakPoint:
7c90120e cc              int     3
0:000> g
(de8.d20): C++ EH exception - code e06d7363 (first chance)
(de8.d20): C++ EH exception - code e06d7363 (first chance)
(de8.d20): C++ EH exception - code e06d7363 (first chance)
(de8.d20): C++ EH exception - code e06d7363 (first chance)
(de8.d20): C++ EH exception - code e06d7363 (first chance)
(de8.d20): C++ EH exception - code e06d7363 (first chance)
(de8.d20): C++ EH exception - code e06d7363 (first chance)
(de8.d20): C++ EH exception - code e06d7363 (!!! second chance !!!)
eax=00dbf7f0 ebx=7ffd5000 ecx=00000000 edx=00000003 esi=00dbf880 edi=00dbf880
eip=7c812fd3 esp=00dbf7ec ebp=00dbf840 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000206
kernel32!RaiseException+0x53:
7c812fd3 5e              pop     esi
*** WARNING: Unable to verify checksum for C:\qpid_VS2008\bin\Debug\qpidmessagingd.dll
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\qpid_VS2008\bin\Debug\qpidmessagingd.dll - 
*** WARNING: Unable to verify checksum for spout.exe
WARNING: Path element is empty
WARNING: Non-directory path: 'C:\qpid_VS2008\bin\Debug\spout.pdb'
WARNING: Inaccessible path: 'C:\qpid_VS2008\bin\Debug\qpidcommond.pdb'
WARNING: Inaccessible path: 'C:\qpid_VS2008\bin\Debug\qpidmessagingd.pdb'
WARNING: Inaccessible path: 'C:\qpid_VS2008\bin\Debug\qpidclientd.pdb'
WARNING: Inaccessible path: 'C:\qpid_VS2008\bin\Debug\qpidtypesd.pdb'
0:000> .reload
Reloading current modules
..................
*** WARNING: Unable to verify checksum for C:\qpid_VS2008\bin\Debug\qpidmessagingd.dll
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\qpid_VS2008\bin\Debug\qpidmessagingd.dll - 
*** WARNING: Unable to verify checksum for spout.exe
0:000> .reload
Reloading current modules
..................
*** WARNING: Unable to verify checksum for C:\qpid_VS2008\bin\Debug\qpidmessagingd.dll
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\qpid_VS2008\bin\Debug\qpidmessagingd.dll - 
*** WARNING: Unable to verify checksum for spout.exe
0:000> .reload
Reloading current modules
..................
*** WARNING: Unable to verify checksum for C:\qpid_VS2008\bin\Debug\qpidmessagingd.dll
*** WARNING: Unable to verify checksum for spout.exe

Callstack transcript:

 # ChildEBP RetAddr  
00 00dbf840 102af8f2 kernel32!RaiseException+0x53 (FPO: [Non-Fpo])
01 00dbf880 100b08e4 MSVCR90D!_CxxThrowException(void * pExceptionObject = 0x00dbf914, struct _s__ThrowInfo * pThrowInfo = 0x10112640)+0x52 (FPO: [Non-Fpo]) (CONV: stdcall) [f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\throw.cpp @ 161]
02 00dbfa44 100a6481 qpidmessagingd!qpid::messaging::ProtocolRegistry::create(class std::basic_string<char,std::char_traits<char>,std::allocator<char> > * url = 0x00dbfe60, class std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,qpid::types::Variant,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,qpid::types::Variant> > > * options = 0x00dbfad8)+0x3d4 (FPO: [Non-Fpo]) (CONV: cdecl) [q:\qpid-0.22\cpp\src\qpid\messaging\protocolregistry.cpp @ 64]
03 00dbfb08 00401f48 qpidmessagingd!qpid::messaging::Connection::Connection(class std::basic_string<char,std::char_traits<char>,std::allocator<char> > * url = 0x00dbfe60, class std::basic_string<char,std::char_traits<char>,std::allocator<char> > * o = 0x00dbff30)+0xa1 (FPO: [Non-Fpo]) (CONV: thiscall) [q:\qpid-0.22\cpp\src\qpid\messaging\connection.cpp @ 48]
04 00dbff68 004130c8 spout!main(int argc = 0n8, char ** argv = 0x0128e420)+0xd8 (FPO: [Non-Fpo]) (CONV: cdecl) [c:\qpid_vs2008\examples\messaging\spout.cpp @ 138]
05 00dbffb8 00412f0f spout!__tmainCRTStartup(void)+0x1a8 (FPO: [Non-Fpo]) (CONV: cdecl) [f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 586]
06 00dbffc0 7c81776f spout!mainCRTStartup(void)+0xf (FPO: [Non-Fpo]) (CONV: cdecl) [f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 403]
07 00dbfff0 00000000 kernel32!BaseProcessStart+0x23 (FPO: [Non-Fpo])

Comment 1 Chuck Rolke 2013-10-09 13:59:48 UTC
Version 3.22.18.1 requires an environment variable to be set before the client library loads Amqp 1.0 support.

From <kit>\bin\debug directory:

> hello_world

   works ok

> hello_world localhost:5672 amq.topic "{protocol:amqp1.0}"

   fails as this issue describes

> set QPID_LOAD_MODULE=%cd%\ampqcd.dll
> hello_world localhost:5672 amq.topic "{protocol:amqp1.0}"

   works as expected

Upstream issue https://issues.apache.org/jira/browse/QPID-5115 addresses this situation.

Comment 3 Petra Svobodová 2013-10-14 13:33:18 UTC
The C++ and .NET clients are able to run over AMQP 1.0 protocol without exceptions. 

Verified on qpid-cpp-win-3.22.19.1-1 on:
- all supported Windows platforms:
  - WindowsXP-x86
  - Windows7-x86 and x64
  - Windows Server2003-x86 and x64
  - Windows Server2008-x86, x64 and R2
- all supported Visual Studio versions:
  - MS Visual Studio 2008
  - MS Visual Studio 2010

--> VERIFIED


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