[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown
[ 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] [Created] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown
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 Environment: OS: Windows. Qpid is assembled as DLL. Reporter: Eugene Fix For: 0.8 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 bytes C 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 are terminated. The only thread is: 1 21720 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 130C++ 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 bytes C 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() msvcr90.dll!749b04f3() EXCEL.EXE!2f303f0a() kernel32.dll!77653677() ntdll.dll!77b79f02() ntdll.dll!77b79ed5() And threads: 0 24016 Worker Thread _threadstartex _threadstartex Normal 0 0 22928 Main Thread
[jira] [Updated] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown
[ https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eugene updated QPID-3256: - Description: 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 bytes C 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: 1 21720 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 130C++ 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 bytes C 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() msvcr90.dll!749b04f3() EXCEL.EXE!2f303f0a() kernel32.dll!77653677() ntdll.dll!77b79f02() ntdll.dll!77b79ed5() And threads: 0 24016 Worker Thread _threadstartex _threadstartex Normal 0 0 22928 Main Thread Main Thread qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal 0 0 20224 RPC Thread RPC Callback Thread 77b5fd21 Normal 0 0
[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown
[ 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] [Updated] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown
[ https://issues.apache.org/jira/browse/QPID-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eugene updated QPID-3256: - Description: 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 bytes C 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: 1 21720 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 130C++ 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 bytes C 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() msvcr90.dll!749b04f3() EXCEL.EXE!2f303f0a() kernel32.dll!77653677() ntdll.dll!77b79f02() ntdll.dll!77b79ed5() And threads: 0 24016 Worker Thread _threadstartex _threadstartex Normal 0 0 22928 Main Thread Main Thread qpid::client::`anonymous namespace'::IOThread::~IOThreadNormal 0 0 20224 RPC Thread RPC Callback Thread 77b5fd21
[jira] [Commented] (QPID-3256) Application which uses Qpid (in my case Excel) hangs on shutdown
[ 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()