On 04/09/2015 12:44 PM, barry.barn...@wellsfargo.com wrote:
> Thread 17 down below, as well as thread 37 immediately below, both show 
> startHandshake() in the stack, but only thread 37 has the calling application 
> in the same thread. I don't see anything in the startHandshake() method that 
> spawns off a thread, and it looks like return from this method is only 
> possible if an exception is thrown (which we don't see) or if 
> handshakeCompleted is set to true. startHandshake() is only invoked or 
> re-invoked if handshakeCompleted is false. What it adds up to is that I still 
> don't understand where the other thread gets spawned off, or how it gets 
> spawned off when the handshake hasn't been completed.

https://github.com/apache/activemq-cpp/blob/3.8.x/activemq-cpp/src/main/activemq/transport/IOTransport.cpp#L173

>
> Thread 37 (Thread 0x960e720 (LWP 32567)):
> #0  0x005c7430 in __kernel_vsyscall ()
> #1  0x093dc3ac in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
> #2  0xf72bfaaa in 
> decaf::internal::util::concurrent::PlatformThread::waitOnCondition(pthread_cond_t*,
>  pthread_mutex_t*) () from /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #3  0xf72b9d1f in (anonymous 
> namespace)::doMonitorEnter(decaf::internal::util::concurrent::MonitorHandle*, 
> decaf::internal::util::concurrent::ThreadHandle*) ()
>    from /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #4  0xf72bc45c in 
> decaf::internal::util::concurrent::Threading::enterMonitor(decaf::internal::util::concurrent::MonitorHandle*)
>  () from /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #5  0xf7348e1f in decaf::util::concurrent::Mutex::lock() () from 
> /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #6  0xf734885c in decaf::util::concurrent::Lock::lock() () from 
> /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #7  0xf73485f5 in 
> decaf::util::concurrent::Lock::Lock(decaf::util::concurrent::Synchronizable*, 
> bool) () from /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #8  0xf7270735 in 
> decaf::internal::net::ssl::openssl::OpenSSLSocket::startHandshake() () from 
> /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #9  0xf72715e3 in 
> decaf::internal::net::ssl::openssl::OpenSSLSocket::write(unsigned char 
> const*, int, int, int) () from 
> /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #10 0xf7274974 in 
> decaf::internal::net::ssl::openssl::OpenSSLSocketOutputStream::doWriteArrayBounded(unsigned
>  char const*, int, int, int) () from 
> /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #11 0xf72e287b in decaf::io::OutputStream::doWriteArray(unsigned char const*, 
> int) () from /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #12 0xf72e24b6 in decaf::io::OutputStream::write(unsigned char const*, int) 
> () from /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #13 0xf72d4964 in decaf::io::BufferedOutputStream::emptyBuffer() () from 
> /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #14 0xf72d4b13 in decaf::io::BufferedOutputStream::flush() () from 
> /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #15 0xf72df72a in decaf::io::FilterOutputStream::flush() () from 
> /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #16 0xf713a4d5 in 
> activemq::transport::IOTransport::oneway(decaf::lang::Pointer<activemq::commands::Command,
>  decaf::util::concurrent::atomic::AtomicRefCounter>) ()
>    from /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #17 0xf713d534 in 
> activemq::transport::TransportFilter::oneway(decaf::lang::Pointer<activemq::commands::Command,
>  decaf::util::concurrent::atomic::AtomicRefCounter>) ()
>    from /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #18 0xf719c3d1 in 
> activemq::transport::inactivity::InactivityMonitor::oneway(decaf::lang::Pointer<activemq::commands::Command,
>  decaf::util::concurrent::atomic::AtomicRefCounter>) ()
>    from /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #19 0xf71f689e in 
> activemq::wireformat::openwire::OpenWireFormatNegotiator::afterNextIsStarted()
>  () from /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #20 0xf713c5cd in activemq::transport::TransportFilter::start() () from 
> /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #21 0xf713c5bb in activemq::transport::TransportFilter::start() () from 
> /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #22 0xf6f7a45c in 
> activemq::core::ActiveMQConnectionFactory::doCreateConnection(decaf::net::URI 
> const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> 
> > const&, std::basic_string<char, std::char_traits<char>, 
> std::allocator<char> > const&, std::basic_string<char, 
> std::char_traits<char>, std::allocator<char> > const&) () from 
> /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #23 0xf6f7a122 in 
> activemq::core::ActiveMQConnectionFactory::createConnection() () from 
> /tvapps/PSL/psl/activemq/lib/libactivemq-cpp.so.17
> #24 0x06e29365 in wf_psl::CWFActiveMQProducer::run() () from 
> /tvapps/Server/svt/lib/libsvtcommon.so
> #25 0x052fe7da in 
> NSWFServer::CWFSessionManager::deregisterPSL(std::basic_string<char, 
> std::char_traits<char>, std::allocator<char> > const&) () from 
> /tvapps/Server/svt/lib/libserver.so
> #26 0x052ff3cd in 
> NSWFServer::CWFSessionManager::deleteSessionId(std::basic_string<char, 
> std::char_traits<char>, std::allocator<char> > const&, int) () from 
> /tvapps/Server/svt/lib/libserver.so
> #27 0x052ff512 in NSWFServer::CWFSessionManager::endSession(unsigned int) () 
> from /tvapps/Server/svt/lib/libserver.so
> #28 0x05300e0f in 
> NSWFServer::CWFSessionEndHandler::handleMessage(CWFSharedPtr<CWFMessageBase_dto>)
>  () from /tvapps/Server/svt/lib/libserver.so
> #29 0x052fd1ed in 
> NSWFServer::CWFSessionManager::handleMessage(CWFSharedPtr<CWFMessageBase_dto>)
>  () from /tvapps/Server/svt/lib/libserver.so
> #30 0x052f30ed in NSWFServer::CWFDispatcher::dispatchInThread(void*, void*) 
> () from /tvapps/Server/svt/lib/libserver.so
> #31 0x06e0527e in CWFThreadPoolWorker::threadedFunc() () from 
> /tvapps/Server/svt/lib/libsvtcommon.so
> #32 0x06e066d0 in CWFThreaded::run() () from 
> /tvapps/Server/svt/lib/libsvtcommon.so
> #33 0x06e06877 in CWFThreaded::_run_thread(void*) () from 
> /tvapps/Server/svt/lib/libsvtcommon.so
> #34 0x093d8b39 in start_thread () from /lib/libpthread.so.0
> #35 0x08acbc2e in clone () from /lib/libc.so.6
>
>
> Regards,
>
> Barry
>
>
>
>


-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.b...@redhat.com | www.redhat.com 
twitter: @tabish121
blog: http://timbish.blogspot.com/

Reply via email to