[
https://issues.apache.org/activemq/browse/AMQCPP-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_37997
]
Albert Strasheim commented on AMQCPP-46:
----------------------------------------
Still seeing a crash on Windows when running the example I provided on 17 Jan.
Stack looks like this:
{noformat}
msvcr80d.dll!10202b13()
[Frames below may be incorrect and/or missing, no symbols loaded for
msvcr80d.dll]
msvcr80d.dll!1021866b()
...
kernel32.dll!7c812a5b()
>
> vs2005-activemq-example.exe!std::vector<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>
> >,int>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int> >
> >::_Ucopy<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int>
> *>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int> * _First=0xe06d7363,
> std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int> * _Last=0x00000001,
> std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int> * _Ptr=0x00000003) Line 1105 + 0x18 bytes C++
msvcr80d.dll!10243990()
vs2005-activemq-example.exe!activemq::transport::IOTransport::close()
Line 145 + 0x37 bytes C++
msvcr80d.dll!102418b7()
...
msvcr80d.dll!10243990()
vs2005-activemq-example.exe!activemq::network::SocketOutputStream::write(const
unsigned char * buffer=0x00b73af8, int len=83) Line 90 + 0x58 bytes C++
vs2005-activemq-example.exe!activemq::io::BufferedOutputStream::emptyBuffer()
Line 76 C++
vs2005-activemq-example.exe!activemq::io::BufferedOutputStream::flush()
Line 86 C++
vs2005-activemq-example.exe!activemq::io::BufferedOutputStream::close()
Line 67 C++
vs2005-activemq-example.exe!activemq::transport::IOTransport::close()
Line 142 C++
vs2005-activemq-example.exe!activemq::transport::IOTransport::~IOTransport()
Line 49 C++
vs2005-activemq-example.exe!activemq::transport::IOTransport::`scalar
deleting destructor'() + 0xf bytes C++
vs2005-activemq-example.exe!activemq::transport::TransportFilter::~TransportFilter()
Line 115 + 0x23 bytes C++
vs2005-activemq-example.exe!activemq::transport::TcpTransport::~TcpTransport()
Line 72 + 0xf bytes C++
vs2005-activemq-example.exe!activemq::transport::TcpTransport::`scalar
deleting destructor'() + 0xf bytes C++
vs2005-activemq-example.exe!activemq::transport::TransportFilter::~TransportFilter()
Line 115 + 0x23 bytes C++
msvcr80d.dll!10243137()
...
kernel32.dll!7c812a5b()
vs2005-activemq-example.exe!std::vector<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>,int>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>,int> >
>::_Ucopy<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>,int>
*>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>,int> * _First=0xe06d7363,
std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>,int> * _Last=0x00000001,
std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>,int> * _Ptr=0x00000003) Line 1105 + 0x18 bytes C++
msvcr80d.dll!10243990()
vs2005-activemq-example.exe!activemq::transport::IOTransport::close()
Line 145 + 0x37 bytes C++
msvcr80d.dll!102418b7()
...
msvcr80d.dll!10243990()
vs2005-activemq-example.exe!activemq::network::SocketOutputStream::write(const
unsigned char * buffer=0x00b73af8, int len=83) Line 90 + 0x58 bytes C++
vs2005-activemq-example.exe!activemq::io::BufferedOutputStream::emptyBuffer()
Line 76 C++
vs2005-activemq-example.exe!activemq::io::BufferedOutputStream::flush()
Line 86 C++
vs2005-activemq-example.exe!activemq::io::BufferedOutputStream::close()
Line 67 C++
vs2005-activemq-example.exe!activemq::transport::IOTransport::close()
Line 142 C++
vs2005-activemq-example.exe!activemq::transport::TransportFilter::close() Line
224 C++
vs2005-activemq-example.exe!activemq::transport::ResponseCorrelator::close()
Line 259 C++
vs2005-activemq-example.exe!activemq::transport::ResponseCorrelator::~ResponseCorrelator()
Line 61 C++
vs2005-activemq-example.exe!activemq::transport::ResponseCorrelator::`scalar
deleting destructor'() + 0xf bytes C++
vs2005-activemq-example.exe!activemq::core::ActiveMQConnectionData::close()
Line 123 + 0x38 bytes C++
vs2005-activemq-example.exe!activemq::core::ActiveMQConnectionData::~ActiveMQConnectionData()
Line 77 C++
vs2005-activemq-example.exe!activemq::core::ActiveMQConnectionData::`scalar
deleting destructor'() + 0xf bytes C++
vs2005-activemq-example.exe!activemq::core::ActiveMQConnection::close()
Line 133 + 0x38 bytes C++
vs2005-activemq-example.exe!activemq::core::ActiveMQConnection::~ActiveMQConnection()
Line 51 + 0xb bytes C++
vs2005-activemq-example.exe!activemq::core::ActiveMQConnection::`scalar
deleting destructor'() + 0xf bytes C++
vs2005-activemq-example.exe!main(int argc=1, char * * argv=0x003560a8)
Line 49 + 0x34 bytes C++
vs2005-activemq-example.exe!__tmainCRTStartup() Line 586 + 0x19 bytes
C
vs2005-activemq-example.exe!mainCRTStartup() Line 403 C
kernel32.dll!7c816fd7()
{noformat}
> ActiveMQConnection doesn't propagate exception listener to underlying
> connector
> -------------------------------------------------------------------------------
>
> Key: AMQCPP-46
> URL: https://issues.apache.org/activemq/browse/AMQCPP-46
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Affects Versions: 1.1
> Reporter: Albert Strasheim
> Assigned To: Nathan Mittler
> Fix For: 2.0
>
> Attachments: amqconn-exlistener.diff, main.cpp
>
>
> My program is doing the following:
> # Create connection using ActiveMQConnectionFactory
> # Set a simple exception listener that sets a boolean flag
> # Block in receive on consumer
> If I then kill the broker, various exceptions happen, but they are never sent
> to the exception listener, because the exception listener in StompConnector
> is null. It seems to me that ActiveMQConnection should set and get its
> exception listener on its underlying connector and probably doesn't have to
> contain a pointer to the listener itself.
> If I change ActiveMQConnection as in the attached patch to also set the
> exception listener on the underlying connector, my exception listener gets
> called when the broker dies.
> Once I detect the failure, I delete the producer, consumer, session and
> connection that failed. Looks like an uncaught exception is getting thrown
> during the destruction of the producer (which is the first thing I delete
> when cleaning up). The problem here is probably that the connection is trying
> to close down a socket that is already broken and something goes awry. I'm
> not quite sure how to fix this problem.
> Stack trace (with useless bits stripped out):
> {noformat}
> kernel32.dll!7c812a5b()
> [Frames below may be incorrect and/or missing, no symbols loaded for
> kernel32.dll]
> kernel32.dll!7c812a5b()
> >
> > myapp.exe!std::vector<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >
> > >,int>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> > >,int> >
> > >::_Ucopy<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> > >,int>
> > *>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> > >,int> *
> > _First=("..\src\main\activemq\connector\stomp\StompSessionManager.cpp",254),
> >
> > std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> > >,int> * _Last=(<Bad Ptr>,14297048),
> > std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> > >,int> *
> > _Ptr=("..\src\main\activemq\connector\stomp\StompSessionManager.cpp",254))
> > Line 1105 + 0x18 bytes C++
>
> myapp.exe!std::vector<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>
> >,int>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int> > >::operator=(const
> std::vector<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>
> >,int>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int> > > & _Right={...}) Line 582 + 0x1d bytes C++
> 0012b920()
> myapp.exe!activemq::core::ActiveMQConsumer::close() Line 84 + 0x34
> bytes C++
> msvcr80d.dll!102418b7()
> ...
> kernel32.dll!7c812a5b()
>
> myapp.exe!std::vector<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>
> >,int>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int> >
> >::_Ucopy<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int>
> *>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int> * _First=(<Bad Ptr>,-17891602),
> std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int> * _Last=(<Bad Ptr>,-17891602),
> std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int> * _Ptr=(<Bad Ptr>,1886220148)) Line 1105 + 0x18 bytes C++
>
> myapp!std::vector<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>
> >,int>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int> > >::operator=(const
> std::vector<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>
> >,int>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int> > > & _Right={...}) Line 582 + 0x1d bytes C++
> 0012bf74()
>
> myapp.exe!activemq::core::ActiveMQSession::onDestroySessionResource(activemq::core::ActiveMQSessionResource
> * resource=0x00000001) Line 558 + 0x37 bytes C++
> msvcr80d.dll!10241a10()
> ...
> kernel32.dll!7c812a5b()
>
> myapp.exe!std::vector<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>
> >,int>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int> >
> >::_Ucopy<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int>
> *>(std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int> * _First=(<Bad Ptr>,1886220148),
> std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int> * _Last=(<Bad Ptr>,-17891602),
> std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int> * _Ptr=("<<U",4832632)) Line 1105 + 0x18 bytes C++
>
> myapp.exe!std::vector<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>
> >,int>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int> > >::operator=(const
> std::vector<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>
> >,int>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >,int> > > & _Right={...}) Line 582 + 0x1d bytes C++
> {noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.