[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-07-21 Thread Steve Huston (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13068915#comment-13068915
 ] 

Steve Huston commented on QPID-3256:


The nightly scoreboard build on Windows was hanging up because of an svn 
conflict. That's resolved and now things appear to be good wrt this change.

 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene
Assignee: Cliff Jansen
 Fix For: 0.13

 Attachments: qpid-3256-3.patch, qpid-3256.patch


 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
 for (std::vectorThread::iterator i = threads.begin(); i != 
 threads.end(); ++i) {
 i-join();
 }
 }
 BUT in Excel I get stack:
 qpidclientd.dll!qpid::client::`anonymous namespace'::IOThread::~IOThread()  
 Line 130  C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x0770, unsigned long 
 dwReason=0, void * lpreserved=0x)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77ba1525()
   ntdll.dll!77b81231()
   KernelBase.dll!77281da7()   
   ole32.dll!75bb9562()
   ole32.dll!75bb9593()
   ole32.dll!75bb95a7()
   ole32.dll!75bb98bf()
   ole32.dll!75bb9805()
   ole32.dll!75bb9a8c()
   EXCEL.EXE!2f3811e9()
   EXCEL.EXE!2f6933e8()
   EXCEL.EXE!2f32a5af()
   EXCEL.EXE!2f34894a()
   EXCEL.EXE!2f670001()
   MSO.DLL!65bc6ed5()  
   MSO.DLL!65c26a34()  
   MSO.DLL!65c30305()  
   MSO.DLL!65bc910c()  
   MSO.DLL!65c4f420()  
   MSO.DLL!65bbf161()  
   comctl32.dll!7233463d() 
   user32.dll!762971be()   
   user32.dll!76297d31()   
   user32.dll!76297dfa()   
   EXCEL.EXE!2f324572()
   EXCEL.EXE!2f324534()
   EXCEL.EXE!2f324441()
   

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-07-21 Thread Justin Ross (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13069008#comment-13069008
 ] 

Justin Ross commented on QPID-3256:
---

Cliff, I'd like to produce RC2 today, and if we want to go ahead with this 
patch, I'd like to get it in RC2 (RC3 would be too late).  How does that strike 
you?

 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene
Assignee: Cliff Jansen
 Fix For: 0.13

 Attachments: qpid-3256-3.patch, qpid-3256.patch


 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
 for (std::vectorThread::iterator i = threads.begin(); i != 
 threads.end(); ++i) {
 i-join();
 }
 }
 BUT in Excel I get stack:
 qpidclientd.dll!qpid::client::`anonymous namespace'::IOThread::~IOThread()  
 Line 130  C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x0770, unsigned long 
 dwReason=0, void * lpreserved=0x)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77ba1525()
   ntdll.dll!77b81231()
   KernelBase.dll!77281da7()   
   ole32.dll!75bb9562()
   ole32.dll!75bb9593()
   ole32.dll!75bb95a7()
   ole32.dll!75bb98bf()
   ole32.dll!75bb9805()
   ole32.dll!75bb9a8c()
   EXCEL.EXE!2f3811e9()
   EXCEL.EXE!2f6933e8()
   EXCEL.EXE!2f32a5af()
   EXCEL.EXE!2f34894a()
   EXCEL.EXE!2f670001()
   MSO.DLL!65bc6ed5()  
   MSO.DLL!65c26a34()  
   MSO.DLL!65c30305()  
   MSO.DLL!65bc910c()  
   MSO.DLL!65c4f420()  
   MSO.DLL!65bbf161()  
   comctl32.dll!7233463d() 
   user32.dll!762971be()   
   user32.dll!76297d31()   
   user32.dll!76297dfa()   
   EXCEL.EXE!2f324572()
   EXCEL.EXE!2f324534()
   EXCEL.EXE!2f324441()  

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-07-21 Thread Cliff Jansen (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13069054#comment-13069054
 ] 

Cliff Jansen commented on QPID-3256:


Steve, thanks for looking into the nightly scoreboard build.

Justin, I'm fine with this patch included now.  I will apply it asap and send 
you mail.

 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene
Assignee: Cliff Jansen
 Fix For: 0.13

 Attachments: qpid-3256-3.patch, qpid-3256.patch


 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
 for (std::vectorThread::iterator i = threads.begin(); i != 
 threads.end(); ++i) {
 i-join();
 }
 }
 BUT in Excel I get stack:
 qpidclientd.dll!qpid::client::`anonymous namespace'::IOThread::~IOThread()  
 Line 130  C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x0770, unsigned long 
 dwReason=0, void * lpreserved=0x)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77ba1525()
   ntdll.dll!77b81231()
   KernelBase.dll!77281da7()   
   ole32.dll!75bb9562()
   ole32.dll!75bb9593()
   ole32.dll!75bb95a7()
   ole32.dll!75bb98bf()
   ole32.dll!75bb9805()
   ole32.dll!75bb9a8c()
   EXCEL.EXE!2f3811e9()
   EXCEL.EXE!2f6933e8()
   EXCEL.EXE!2f32a5af()
   EXCEL.EXE!2f34894a()
   EXCEL.EXE!2f670001()
   MSO.DLL!65bc6ed5()  
   MSO.DLL!65c26a34()  
   MSO.DLL!65c30305()  
   MSO.DLL!65bc910c()  
   MSO.DLL!65c4f420()  
   MSO.DLL!65bbf161()  
   comctl32.dll!7233463d() 
   user32.dll!762971be()   
   user32.dll!76297d31()   
   user32.dll!76297dfa()   
   EXCEL.EXE!2f324572()
   EXCEL.EXE!2f324534()
   EXCEL.EXE!2f324441()
  

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-07-19 Thread Steve Huston (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13067897#comment-13067897
 ] 

Steve Huston commented on QPID-3256:


I believe it's an important fix to get in.

 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene
Assignee: Cliff Jansen
 Fix For: 0.13

 Attachments: qpid-3256-3.patch, qpid-3256.patch


 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
 for (std::vectorThread::iterator i = threads.begin(); i != 
 threads.end(); ++i) {
 i-join();
 }
 }
 BUT in Excel I get stack:
 qpidclientd.dll!qpid::client::`anonymous namespace'::IOThread::~IOThread()  
 Line 130  C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x0770, unsigned long 
 dwReason=0, void * lpreserved=0x)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77ba1525()
   ntdll.dll!77b81231()
   KernelBase.dll!77281da7()   
   ole32.dll!75bb9562()
   ole32.dll!75bb9593()
   ole32.dll!75bb95a7()
   ole32.dll!75bb98bf()
   ole32.dll!75bb9805()
   ole32.dll!75bb9a8c()
   EXCEL.EXE!2f3811e9()
   EXCEL.EXE!2f6933e8()
   EXCEL.EXE!2f32a5af()
   EXCEL.EXE!2f34894a()
   EXCEL.EXE!2f670001()
   MSO.DLL!65bc6ed5()  
   MSO.DLL!65c26a34()  
   MSO.DLL!65c30305()  
   MSO.DLL!65bc910c()  
   MSO.DLL!65c4f420()  
   MSO.DLL!65bbf161()  
   comctl32.dll!7233463d() 
   user32.dll!762971be()   
   user32.dll!76297d31()   
   user32.dll!76297dfa()   
   EXCEL.EXE!2f324572()
   EXCEL.EXE!2f324534()
   EXCEL.EXE!2f324441()
   MSO.DLL!65b78116()  
   MSO.DLL!65ba1fd0()  
   EXCEL.EXE!2f30424b()
   

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-07-19 Thread Cliff Jansen (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13067898#comment-13067898
 ] 

Cliff Jansen commented on QPID-3256:


I wanted to see the patch run through Steve's nightly review board automated 
build and test.

It started failing precisely at the same time I did the checkin to trunk, not a 
good sign.  That plus the recent mingw build problem makes me wonder if it is a 
good idea to add it to the release at this time.  The person who reported the 
JIRA has an earlier version of the patch that works for him.

But I can't say for sure if there is a problem.  It may be differences between 
my setup and Steve's, i.e. Xp versus WS2008, or different versions of boost or 
Visual Studio, or 32 vs 64 bit.  Or the Riverace build may be failing for some 
unrelated reason.

 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene
Assignee: Cliff Jansen
 Fix For: 0.13

 Attachments: qpid-3256-3.patch, qpid-3256.patch


 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
 for (std::vectorThread::iterator i = threads.begin(); i != 
 threads.end(); ++i) {
 i-join();
 }
 }
 BUT in Excel I get stack:
 qpidclientd.dll!qpid::client::`anonymous namespace'::IOThread::~IOThread()  
 Line 130  C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x0770, unsigned long 
 dwReason=0, void * lpreserved=0x)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77ba1525()
   ntdll.dll!77b81231()
   KernelBase.dll!77281da7()   
   ole32.dll!75bb9562()
   ole32.dll!75bb9593()
   ole32.dll!75bb95a7()
   ole32.dll!75bb98bf()
   ole32.dll!75bb9805()
   ole32.dll!75bb9a8c()
   EXCEL.EXE!2f3811e9()
   EXCEL.EXE!2f6933e8()
   

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-07-12 Thread Ted Ross (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13064050#comment-13064050
 ] 

Ted Ross commented on QPID-3256:


This commit appears to break the mingw32 build.  There are two problems that 
I'm aware of:

1) In the class ThreadPrivate, the initializers in the constructors are not in 
the same order as the declarations.
2) error: 'OpenThread' was not declared in this scope from line 71.


 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene
Assignee: Cliff Jansen
 Fix For: 0.11

 Attachments: qpid-3256-3.patch, qpid-3256.patch


 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
 for (std::vectorThread::iterator i = threads.begin(); i != 
 threads.end(); ++i) {
 i-join();
 }
 }
 BUT in Excel I get stack:
 qpidclientd.dll!qpid::client::`anonymous namespace'::IOThread::~IOThread()  
 Line 130  C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x0770, unsigned long 
 dwReason=0, void * lpreserved=0x)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77ba1525()
   ntdll.dll!77b81231()
   KernelBase.dll!77281da7()   
   ole32.dll!75bb9562()
   ole32.dll!75bb9593()
   ole32.dll!75bb95a7()
   ole32.dll!75bb98bf()
   ole32.dll!75bb9805()
   ole32.dll!75bb9a8c()
   EXCEL.EXE!2f3811e9()
   EXCEL.EXE!2f6933e8()
   EXCEL.EXE!2f32a5af()
   EXCEL.EXE!2f34894a()
   EXCEL.EXE!2f670001()
   MSO.DLL!65bc6ed5()  
   MSO.DLL!65c26a34()  
   MSO.DLL!65c30305()  
   MSO.DLL!65bc910c()  
   MSO.DLL!65c4f420()  
   MSO.DLL!65bbf161()  
   comctl32.dll!7233463d() 
   user32.dll!762971be()   
   user32.dll!76297d31()   
   

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-07-06 Thread jirapos...@reviews.apache.org (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13060898#comment-13060898
 ] 

jirapos...@reviews.apache.org commented on QPID-3256:
-


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/987/#review981
---

Ship it!


Looks good to me, Cliff - thanks!

- Steve


On 2011-07-05 17:54:17, Cliff Jansen wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/987/
bq.  ---
bq.  
bq.  (Updated 2011-07-05 17:54:17)
bq.  
bq.  
bq.  Review request for qpid.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  This is the same logic as the preceding version with naming fixes and 
refinements to DLL cleanup.
bq.  
bq.  Cleanup now uses Windows DllMain function to allows cleanup after C++ 
runtime static destructors.
bq.  
bq.  
bq.  This addresses bug qpid-3256.
bq.  https://issues.apache.org/jira/browse/qpid-3256
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq./trunk/qpid/cpp/src/qpid/sys/windows/Thread.cpp 1143151 
bq.  
bq.  Diff: https://reviews.apache.org/r/987/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  Qpid cmake run_tests
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Cliff
bq.  
bq.



 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene
Assignee: Cliff Jansen
 Fix For: 0.11

 Attachments: qpid-3256-3.patch, qpid-3256.patch


 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
 for (std::vectorThread::iterator i = threads.begin(); i != 
 threads.end(); ++i) {
 i-join();
 }
 }
 BUT in Excel I get stack:
 qpidclientd.dll!qpid::client::`anonymous namespace'::IOThread::~IOThread()  
 Line 130  C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x0770, unsigned long 
 dwReason=0, void * lpreserved=0x)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 560 + 0x11 
 

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-07-05 Thread jirapos...@reviews.apache.org (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13060041#comment-13060041
 ] 

jirapos...@reviews.apache.org commented on QPID-3256:
-


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/987/
---

(Updated 2011-07-05 17:54:17.154114)


Review request for qpid.


Changes
---

Now uses Thread local storage (TLS) instead of a std::map to locate the 
ThreadPrivate structure. DllMain baggage still there to manage the FreeLibrary 
case.


Summary
---

This is the same logic as the preceding version with naming fixes and 
refinements to DLL cleanup.

Cleanup now uses Windows DllMain function to allows cleanup after C++ runtime 
static destructors.


This addresses bug qpid-3256.
https://issues.apache.org/jira/browse/qpid-3256


Diffs (updated)
-

  /trunk/qpid/cpp/src/qpid/sys/windows/Thread.cpp 1143151 

Diff: https://reviews.apache.org/r/987/diff


Testing
---

Qpid cmake run_tests


Thanks,

Cliff



 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene
Assignee: Cliff Jansen
 Fix For: 0.11

 Attachments: qpid-3256-3.patch, qpid-3256.patch


 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
 for (std::vectorThread::iterator i = threads.begin(); i != 
 threads.end(); ++i) {
 i-join();
 }
 }
 BUT in Excel I get stack:
 qpidclientd.dll!qpid::client::`anonymous namespace'::IOThread::~IOThread()  
 Line 130  C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x0770, unsigned long 
 dwReason=0, void * lpreserved=0x)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77ba1525()
   

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-07-01 Thread jirapos...@reviews.apache.org (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13058499#comment-13058499
 ] 

jirapos...@reviews.apache.org commented on QPID-3256:
-


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/987/#review947
---


My concern with DllMain is that it precludes building qpid as static libraries 
(and having this logic still work).

- Steve


On 2011-07-01 03:08:08, Cliff Jansen wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/987/
bq.  ---
bq.  
bq.  (Updated 2011-07-01 03:08:08)
bq.  
bq.  
bq.  Review request for qpid.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  This is the same logic as the preceding version with naming fixes and 
refinements to DLL cleanup.
bq.  
bq.  Cleanup now uses Windows DllMain function to allows cleanup after C++ 
runtime static destructors.
bq.  
bq.  
bq.  This addresses bug qpid-3256.
bq.  https://issues.apache.org/jira/browse/qpid-3256
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq./trunk/qpid/cpp/src/qpid/sys/windows/Thread.cpp 1141687 
bq.  
bq.  Diff: https://reviews.apache.org/r/987/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  Qpid cmake run_tests
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Cliff
bq.  
bq.



 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene
Assignee: Cliff Jansen
 Fix For: 0.11

 Attachments: qpid-3256.patch


 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
 for (std::vectorThread::iterator i = threads.begin(); i != 
 threads.end(); ++i) {
 i-join();
 }
 }
 BUT in Excel I get stack:
 qpidclientd.dll!qpid::client::`anonymous namespace'::IOThread::~IOThread()  
 Line 130  C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x0770, unsigned long 
 dwReason=0, void * lpreserved=0x)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long 

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-07-01 Thread jirapos...@reviews.apache.org (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13058502#comment-13058502
 ] 

jirapos...@reviews.apache.org commented on QPID-3256:
-


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/987/#review949
---


Admin note... when this review is resolved, please ensure that 
https://reviews.apache.org/r/904/ is cleaned up accordingly.

- Steve


On 2011-07-01 03:08:08, Cliff Jansen wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/987/
bq.  ---
bq.  
bq.  (Updated 2011-07-01 03:08:08)
bq.  
bq.  
bq.  Review request for qpid.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  This is the same logic as the preceding version with naming fixes and 
refinements to DLL cleanup.
bq.  
bq.  Cleanup now uses Windows DllMain function to allows cleanup after C++ 
runtime static destructors.
bq.  
bq.  
bq.  This addresses bug qpid-3256.
bq.  https://issues.apache.org/jira/browse/qpid-3256
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq./trunk/qpid/cpp/src/qpid/sys/windows/Thread.cpp 1141687 
bq.  
bq.  Diff: https://reviews.apache.org/r/987/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  Qpid cmake run_tests
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Cliff
bq.  
bq.



 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene
Assignee: Cliff Jansen
 Fix For: 0.11

 Attachments: qpid-3256.patch


 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
 for (std::vectorThread::iterator i = threads.begin(); i != 
 threads.end(); ++i) {
 i-join();
 }
 }
 BUT in Excel I get stack:
 qpidclientd.dll!qpid::client::`anonymous namespace'::IOThread::~IOThread()  
 Line 130  C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x0770, unsigned long 
 dwReason=0, void * lpreserved=0x)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long 

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-07-01 Thread jirapos...@reviews.apache.org (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13058503#comment-13058503
 ] 

jirapos...@reviews.apache.org commented on QPID-3256:
-


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/904/#review948
---


This was continued in a separate review request, 
https://reviews.apache.org/r/987/

- Steve


On 2011-06-15 01:08:18, Steve Huston wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/904/
bq.  ---
bq.  
bq.  (Updated 2011-06-15 01:08:18)
bq.  
bq.  
bq.  Review request for qpid.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  Keeps track of Qpid runnable threads and other threads, ensuring that 
rundown doesn't deadlock.
bq.  
bq.  
bq.  This addresses bug QPID-3256.
bq.  https://issues.apache.org/jira/browse/QPID-3256
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq./trunk/qpid/cpp/src/qpid/sys/windows/Thread.cpp 1132733 
bq.  
bq.  Diff: https://reviews.apache.org/r/904/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  Qpid regression test suite.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Steve
bq.  
bq.



 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene
Assignee: Cliff Jansen
 Fix For: 0.11

 Attachments: qpid-3256.patch


 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
 for (std::vectorThread::iterator i = threads.begin(); i != 
 threads.end(); ++i) {
 i-join();
 }
 }
 BUT in Excel I get stack:
 qpidclientd.dll!qpid::client::`anonymous namespace'::IOThread::~IOThread()  
 Line 130  C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x0770, unsigned long 
 dwReason=0, void * lpreserved=0x)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x0770, 

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-07-01 Thread jirapos...@reviews.apache.org (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13058714#comment-13058714
 ] 

jirapos...@reviews.apache.org commented on QPID-3256:
-



bq.  On 2011-07-01 11:44:51, Steve Huston wrote:
bq.   My concern with DllMain is that it precludes building qpid as static 
libraries (and having this logic still work).

Good point.  I was so focused on the bug as presented I lost complete sight of 
this valid use case.

I suppose I could do away with locks and maps altogether with use of TLS 
storage.  In this case the only leaked resource would be the TLS slot on 
multiple uses of LoadLibrary/FreeLibrary, which is obviously not relevant in 
the static build case.  So I should be able to use logic to free the slot in 
DllMain and comment out that code in a static build.  Does this seem reasonable?


- Cliff


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/987/#review947
---


On 2011-07-01 03:08:08, Cliff Jansen wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/987/
bq.  ---
bq.  
bq.  (Updated 2011-07-01 03:08:08)
bq.  
bq.  
bq.  Review request for qpid.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  This is the same logic as the preceding version with naming fixes and 
refinements to DLL cleanup.
bq.  
bq.  Cleanup now uses Windows DllMain function to allows cleanup after C++ 
runtime static destructors.
bq.  
bq.  
bq.  This addresses bug qpid-3256.
bq.  https://issues.apache.org/jira/browse/qpid-3256
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq./trunk/qpid/cpp/src/qpid/sys/windows/Thread.cpp 1141687 
bq.  
bq.  Diff: https://reviews.apache.org/r/987/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  Qpid cmake run_tests
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Cliff
bq.  
bq.



 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene
Assignee: Cliff Jansen
 Fix For: 0.11

 Attachments: qpid-3256.patch


 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
 for (std::vectorThread::iterator i = threads.begin(); i != 
 

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-07-01 Thread jirapos...@reviews.apache.org (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13058734#comment-13058734
 ] 

jirapos...@reviews.apache.org commented on QPID-3256:
-



bq.  On 2011-07-01 11:44:51, Steve Huston wrote:
bq.   My concern with DllMain is that it precludes building qpid as static 
libraries (and having this logic still work).
bq.  
bq.  Cliff Jansen wrote:
bq.  Good point.  I was so focused on the bug as presented I lost complete 
sight of this valid use case.
bq.  
bq.  I suppose I could do away with locks and maps altogether with use of 
TLS storage.  In this case the only leaked resource would be the TLS slot on 
multiple uses of LoadLibrary/FreeLibrary, which is obviously not relevant in 
the static build case.  So I should be able to use logic to free the slot in 
DllMain and comment out that code in a static build.  Does this seem reasonable?

Yes it does - thanks!


- Steve


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/987/#review947
---


On 2011-07-01 03:08:08, Cliff Jansen wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/987/
bq.  ---
bq.  
bq.  (Updated 2011-07-01 03:08:08)
bq.  
bq.  
bq.  Review request for qpid.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  This is the same logic as the preceding version with naming fixes and 
refinements to DLL cleanup.
bq.  
bq.  Cleanup now uses Windows DllMain function to allows cleanup after C++ 
runtime static destructors.
bq.  
bq.  
bq.  This addresses bug qpid-3256.
bq.  https://issues.apache.org/jira/browse/qpid-3256
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq./trunk/qpid/cpp/src/qpid/sys/windows/Thread.cpp 1141687 
bq.  
bq.  Diff: https://reviews.apache.org/r/987/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  Qpid cmake run_tests
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Cliff
bq.  
bq.



 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene
Assignee: Cliff Jansen
 Fix For: 0.11

 Attachments: qpid-3256.patch


 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
  

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-06-30 Thread jirapos...@reviews.apache.org (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13058032#comment-13058032
 ] 

jirapos...@reviews.apache.org commented on QPID-3256:
-



bq.  On 2011-06-16 12:56:46, Alan Conway wrote:
bq.   /trunk/qpid/cpp/src/qpid/sys/windows/Thread.cpp, line 85
bq.   https://reviews.apache.org/r/904/diff/1/?file=21139#file21139line85
bq.  
bq.   Why the pointer? Just declare 
bq.   
bq.   std::mapunsigned, ThreadPrivate::shared_ptr pQpidThreads;
bq.   
bq.   and let std::map take care of the memory management.
bq.  
bq.  Andrew Stitcher wrote:
bq.  I'd also add that we don't use the hungarian variable notation either 
so the 'p' should be stripped (possibly from other places too)

OK... this was previously invisible because I missed the Publish step :-(

The intended logic was that Thread::current() should have defined behavior, 
even if called from a static destructor.  Otherwise, you need a way to 
guarantee the std:map destructor is never called too soon.

The original JIRA's deadlock was in the context of a static destructor calling 
Thread::join().

On re-examiniation, the use of a non-POD lock mechanism is inconsistent with 
the stated goal.  Thank-you for the heads up.  I will work with Steve to 
address this and the naming problem.

I have a fixed version I will upload to a separate review... coming soon.


- Cliff


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/904/#review849
---


On 2011-06-15 01:08:18, Steve Huston wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/904/
bq.  ---
bq.  
bq.  (Updated 2011-06-15 01:08:18)
bq.  
bq.  
bq.  Review request for qpid.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  Keeps track of Qpid runnable threads and other threads, ensuring that 
rundown doesn't deadlock.
bq.  
bq.  
bq.  This addresses bug QPID-3256.
bq.  https://issues.apache.org/jira/browse/QPID-3256
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq./trunk/qpid/cpp/src/qpid/sys/windows/Thread.cpp 1132733 
bq.  
bq.  Diff: https://reviews.apache.org/r/904/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  Qpid regression test suite.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Steve
bq.  
bq.



 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene
Assignee: Cliff Jansen
 Fix For: 0.11

 Attachments: qpid-3256.patch


 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main 

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-06-30 Thread jirapos...@reviews.apache.org (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13058197#comment-13058197
 ] 

jirapos...@reviews.apache.org commented on QPID-3256:
-


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/987/
---

Review request for qpid.


Summary
---

This is the same logic as the preceding version with naming fixes and 
refinements to DLL cleanup.

Cleanup now uses Windows DllMain function to allows cleanup after C++ runtime 
static destructors.


This addresses bug qpid-3256.
https://issues.apache.org/jira/browse/qpid-3256


Diffs
-

  /trunk/qpid/cpp/src/qpid/sys/windows/Thread.cpp 1141687 

Diff: https://reviews.apache.org/r/987/diff


Testing
---

Qpid cmake run_tests


Thanks,

Cliff



 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene
Assignee: Cliff Jansen
 Fix For: 0.11

 Attachments: qpid-3256.patch


 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
 for (std::vectorThread::iterator i = threads.begin(); i != 
 threads.end(); ++i) {
 i-join();
 }
 }
 BUT in Excel I get stack:
 qpidclientd.dll!qpid::client::`anonymous namespace'::IOThread::~IOThread()  
 Line 130  C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x0770, unsigned long 
 dwReason=0, void * lpreserved=0x)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77ba1525()
   ntdll.dll!77b81231()
   KernelBase.dll!77281da7()   
   ole32.dll!75bb9562()
   ole32.dll!75bb9593()
   ole32.dll!75bb95a7()
   ole32.dll!75bb98bf()
   ole32.dll!75bb9805()
   ole32.dll!75bb9a8c()
 

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-06-14 Thread jirapos...@reviews.apache.org (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13049557#comment-13049557
 ] 

jirapos...@reviews.apache.org commented on QPID-3256:
-


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/904/
---

Review request for qpid.


Summary
---

Keeps track of Qpid runnable threads and other threads, ensuring that rundown 
doesn't deadlock.


This addresses bug QPID-3256.
https://issues.apache.org/jira/browse/QPID-3256


Diffs
-

  /trunk/qpid/cpp/src/qpid/sys/windows/Thread.cpp 1132733 

Diff: https://reviews.apache.org/r/904/diff


Testing
---

Qpid regression test suite.


Thanks,

Steve



 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene
Assignee: Steve Huston
 Fix For: 0.11

 Attachments: qpid-3256.patch


 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
 for (std::vectorThread::iterator i = threads.begin(); i != 
 threads.end(); ++i) {
 i-join();
 }
 }
 BUT in Excel I get stack:
 qpidclientd.dll!qpid::client::`anonymous namespace'::IOThread::~IOThread()  
 Line 130  C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x0770, unsigned long 
 dwReason=0, void * lpreserved=0x)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77ba1525()
   ntdll.dll!77b81231()
   KernelBase.dll!77281da7()   
   ole32.dll!75bb9562()
   ole32.dll!75bb9593()
   ole32.dll!75bb95a7()
   ole32.dll!75bb98bf()
   ole32.dll!75bb9805()
   ole32.dll!75bb9a8c()
   EXCEL.EXE!2f3811e9()
   EXCEL.EXE!2f6933e8()
   EXCEL.EXE!2f32a5af()

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-06-14 Thread Cliff Jansen (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13049564#comment-13049564
 ] 

Cliff Jansen commented on QPID-3256:


I requested that the reporter test the patch in the JIRA and received the 
following response:

fromSmirnov Eugene eugen...@yandex.ru
to  Cliff Jansen cliffjan...@gmail.com
dateTue, Jun 14, 2011 at 10:41 AM
subject Re: qpid 3256 excel hang

Hi Cliff

I've checked and it works fine.

Thank you!!!


 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene
Assignee: Steve Huston
 Fix For: 0.11

 Attachments: qpid-3256.patch


 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
 for (std::vectorThread::iterator i = threads.begin(); i != 
 threads.end(); ++i) {
 i-join();
 }
 }
 BUT in Excel I get stack:
 qpidclientd.dll!qpid::client::`anonymous namespace'::IOThread::~IOThread()  
 Line 130  C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x0770, unsigned long 
 dwReason=0, void * lpreserved=0x)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77ba1525()
   ntdll.dll!77b81231()
   KernelBase.dll!77281da7()   
   ole32.dll!75bb9562()
   ole32.dll!75bb9593()
   ole32.dll!75bb95a7()
   ole32.dll!75bb98bf()
   ole32.dll!75bb9805()
   ole32.dll!75bb9a8c()
   EXCEL.EXE!2f3811e9()
   EXCEL.EXE!2f6933e8()
   EXCEL.EXE!2f32a5af()
   EXCEL.EXE!2f34894a()
   EXCEL.EXE!2f670001()
   MSO.DLL!65bc6ed5()  
   MSO.DLL!65c26a34()  
   MSO.DLL!65c30305()  
   MSO.DLL!65bc910c()  
   MSO.DLL!65c4f420()  
   MSO.DLL!65bbf161()  
   comctl32.dll!7233463d() 
   user32.dll!762971be()   
   

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-05-16 Thread Cliff Jansen (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13033898#comment-13033898
 ] 

Cliff Jansen commented on QPID-3256:


I can reproduce the problem with a program that is not linked against
qpidclientd but loads and unloads it directly.  A deadlock occurs
processing the global static destructors.


Thread 1 blocks waiting for thread 2 to exit/die.  It also owns the
infamous loader lock (thanks to the use of FreeLibrary())

ntdll!NtWaitForSingleObject+0xa
KERNELBASE!WaitForSingleObjectEx+0x79
qpidcommond!qpid::sys::Thread::join+0x66 [thread.cpp @ 82]
qpidclientd!qpid::client::`anonymous namespace'::IOThread::~IOThread+0x141
qpidclientd!`qpid::client::`anonymous namespace'::theIO'::`2'::`dynamic atexit 
destructor for 'io''+0x26
qpidclientd!_CRT_INIT+0x2dc
qpidclientd!__DllMainCRTStartup+0x11f
qpidclientd!_DllMainCRTStartup+0x31
ntdll!LdrpUnloadDll+0x27d
ntdll!LdrUnloadDll+0x4a
KERNELBASE!FreeLibrary+0x1d
foo!main+0x112


Thread 2 is a zombie trying to die, if only it could get the loader lock

ntdll!NtWaitForSingleObject+0xa
ntdll!RtlpWaitOnCriticalSection+0xe8
ntdll!RtlEnterCriticalSection+0xd1
ntdll!LdrShutdownThread+0x72
ntdll!RtlExitUserThread+0x38
MSVCR90D!_endthreadex+0x33
qpidcommond!`anonymous namespace'::runRunnable+0x3b [thread.cpp @ 34]
MSVCR90D!_callthreadstartex+0x25
MSVCR90D!_threadstartex+0xbd
kernel32!BaseThreadInitThunk+0xd
ntdll!RtlUserThreadStart+0x1d

Deadlock: Thread 1 does not wakeup until Thread 2 really dies, hence
neither thread can make progress.

Thread 2 has nothing left to do except the Windows DLL_THREAD_DETACH
handshake in all associated DLLs.  It has clearly finished from the
point of view of the Windows implementation of the Qpid Thread class.

One way to fix this would be to use a private synchronization
mechanism that completes before the call to endthreadex().  I will put
a patch together for review along these lines unless someone objects.

 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene

 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
 for (std::vectorThread::iterator i = threads.begin(); i != 
 threads.end(); ++i) {
 i-join();
 }
 }
 BUT in Excel I get stack:
 qpidclientd.dll!qpid::client::`anonymous namespace'::IOThread::~IOThread()  
 Line 130  C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic 

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-05-16 Thread Eugene (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13033999#comment-13033999
 ] 

Eugene commented on QPID-3256:
--

Cliff, Thank You for the answer.

 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene

 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
 for (std::vectorThread::iterator i = threads.begin(); i != 
 threads.end(); ++i) {
 i-join();
 }
 }
 BUT in Excel I get stack:
 qpidclientd.dll!qpid::client::`anonymous namespace'::IOThread::~IOThread()  
 Line 130  C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x0770, unsigned long 
 dwReason=0, void * lpreserved=0x)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77ba1525()
   ntdll.dll!77b81231()
   KernelBase.dll!77281da7()   
   ole32.dll!75bb9562()
   ole32.dll!75bb9593()
   ole32.dll!75bb95a7()
   ole32.dll!75bb98bf()
   ole32.dll!75bb9805()
   ole32.dll!75bb9a8c()
   EXCEL.EXE!2f3811e9()
   EXCEL.EXE!2f6933e8()
   EXCEL.EXE!2f32a5af()
   EXCEL.EXE!2f34894a()
   EXCEL.EXE!2f670001()
   MSO.DLL!65bc6ed5()  
   MSO.DLL!65c26a34()  
   MSO.DLL!65c30305()  
   MSO.DLL!65bc910c()  
   MSO.DLL!65c4f420()  
   MSO.DLL!65bbf161()  
   comctl32.dll!7233463d() 
   user32.dll!762971be()   
   user32.dll!76297d31()   
   user32.dll!76297dfa()   
   EXCEL.EXE!2f324572()
   EXCEL.EXE!2f324534()
   EXCEL.EXE!2f324441()
   MSO.DLL!65b78116()  
   MSO.DLL!65ba1fd0()  
   EXCEL.EXE!2f30424b()
   msvcr90.dll!749936c5()  
   msvcr90.dll!749938b3()  
   msvcr90.dll!749938c5()  
   msvcr90.dll!749ac40c()  
   msvcr90.dll!749b028d()  
 

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-05-11 Thread Eugene (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13031673#comment-13031673
 ] 

Eugene commented on QPID-3256:
--

Steve, I have reviewed src\qpid\client\ConnectionImpl.cpp for last version and 
don't find any changes(may be I'm wrong).
I think the main problem is in using static object:
 IOThread theIO() {
static IOThread io(SystemInfo::concurrency());
return io;
}
which is destroyed on shutdown and tries wait for thread completing in 
destructor.

 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene

 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
 for (std::vectorThread::iterator i = threads.begin(); i != 
 threads.end(); ++i) {
 i-join();
 }
 }
 BUT in Excel I get stack:
 qpidclientd.dll!qpid::client::`anonymous namespace'::IOThread::~IOThread()  
 Line 130  C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x0770, unsigned long 
 dwReason=0, void * lpreserved=0x)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77ba1525()
   ntdll.dll!77b81231()
   KernelBase.dll!77281da7()   
   ole32.dll!75bb9562()
   ole32.dll!75bb9593()
   ole32.dll!75bb95a7()
   ole32.dll!75bb98bf()
   ole32.dll!75bb9805()
   ole32.dll!75bb9a8c()
   EXCEL.EXE!2f3811e9()
   EXCEL.EXE!2f6933e8()
   EXCEL.EXE!2f32a5af()
   EXCEL.EXE!2f34894a()
   EXCEL.EXE!2f670001()
   MSO.DLL!65bc6ed5()  
   MSO.DLL!65c26a34()  
   MSO.DLL!65c30305()  
   MSO.DLL!65bc910c()  
   MSO.DLL!65c4f420()  
   MSO.DLL!65bbf161()  
   comctl32.dll!7233463d() 
   user32.dll!762971be()   
   user32.dll!76297d31()   
   user32.dll!76297dfa()   
   EXCEL.EXE!2f324572()
   

[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown

2011-05-11 Thread Eugene (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13031829#comment-13031829
 ] 

Eugene commented on QPID-3256:
--

I check issue with qpid 0.10 and get the same problem.

 Application which uses Qpid (in my case Excel) hangs on shutdown
 

 Key: QPID-3256
 URL: https://issues.apache.org/jira/browse/QPID-3256
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10
 Environment: OS: Windows.
 Qpid is assembled as DLL. 
Reporter: Eugene

 Hi All
 I encountered with strange behavior on shutdown when using qpid 0-8 and 0-10. 
 When I use qpid in standalone console-application everything is ok. But when 
 I use qpid in DLL which is loaded into Excel (as RTD module), Excel hangs on 
 shutdown. 
 I found out that in standalone application on shutdown I have next stack:
   qpidclientd.dll!qpid::client::`anonymous 
 namespace'::IOThread::~IOThread()  Line 138C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x6008, unsigned long 
 dwReason=0, void * lpreserved=0x0001)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x6008, 
 unsigned long dwReason=0, void * lpreserved=0x0001)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77b9a516()
   ntdll.dll!77b9a3b8()
   kernel32.dll!77657363() 
   msvcr90d.dll!__crtExitProcess(int status=0)  Line 732   C
   msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 644 
 + 0x9 bytes C
   msvcr90d.dll!exit(int code=0)  Line 412 + 0xd bytes C
   Test.exe!__tmainCRTStartup()  Line 599  C
   Test.exe!mainCRTStartup()  Line 403 C
   kernel32.dll!77653677() 
   ntdll.dll!77b79f02()
   ntdll.dll!77b79ed5()
 And in this state all threads of application have been already terminated. 
 The only thread is:
 121720   Main Thread Main Thread 
 qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal  0
 so code from file ConnectionImpl.cpp works well:
 ~IOThread() {
 std::vectorThread threads;
 {
 ScopedLockMutex l(threadLock);
 if (poller_)
 poller_-shutdown();
 t.swap(threads);
 }
 for (std::vectorThread::iterator i = threads.begin(); i != 
 threads.end(); ++i) {
 i-join();
 }
 }
 BUT in Excel I get stack:
 qpidclientd.dll!qpid::client::`anonymous namespace'::IOThread::~IOThread()  
 Line 130  C++
   qpidclientd.dll!`qpid::client::`anonymous 
 namespace'::theIO'::`2'::`dynamic atexit destructor for 'io''()  + 0xd bytes  
 C++
   qpidclientd.dll!_CRT_INIT(void * hDllHandle=0x0770, unsigned long 
 dwReason=0, void * lpreserved=0x)  Line 449   C
   qpidclientd.dll!__DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 560 + 0x11 
 bytesC
   qpidclientd.dll!_DllMainCRTStartup(void * hDllHandle=0x0770, 
 unsigned long dwReason=0, void * lpreserved=0x)  Line 510 + 0x11 
 bytes C
   ntdll.dll!77b79960()
   [Frames below may be incorrect and/or missing, no symbols loaded for 
 ntdll.dll] 
   ntdll.dll!77ba1525()
   ntdll.dll!77b81231()
   KernelBase.dll!77281da7()   
   ole32.dll!75bb9562()
   ole32.dll!75bb9593()
   ole32.dll!75bb95a7()
   ole32.dll!75bb98bf()
   ole32.dll!75bb9805()
   ole32.dll!75bb9a8c()
   EXCEL.EXE!2f3811e9()
   EXCEL.EXE!2f6933e8()
   EXCEL.EXE!2f32a5af()
   EXCEL.EXE!2f34894a()
   EXCEL.EXE!2f670001()
   MSO.DLL!65bc6ed5()  
   MSO.DLL!65c26a34()  
   MSO.DLL!65c30305()  
   MSO.DLL!65bc910c()  
   MSO.DLL!65c4f420()  
   MSO.DLL!65bbf161()  
   comctl32.dll!7233463d() 
   user32.dll!762971be()   
   user32.dll!76297d31()   
   user32.dll!76297dfa()   
   EXCEL.EXE!2f324572()
   EXCEL.EXE!2f324534()
   EXCEL.EXE!2f324441()
   MSO.DLL!65b78116()  
   MSO.DLL!65ba1fd0()  
   EXCEL.EXE!2f30424b()
   msvcr90.dll!749936c5()  
   msvcr90.dll!749938b3()  
   msvcr90.dll!749938c5()  
   msvcr90.dll!749ac40c()