[
https://issues.apache.org/jira/browse/AMQCPP-527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13848012#comment-13848012
]
Christian Mamen edited comment on AMQCPP-527 at 12/13/13 10:46 PM:
-------------------------------------------------------------------
I think your right - thanks for responding. and Pointer have a reference count,
so the snapshot should be threadsafe
My dmp files (when the crash occur) doesnt show anywhere that a thread was
currently inside ActiveMQConnection::Close()
Interestingly, i notice that the broker, at about the same time (~1msec) shows
a bunch of java.net.SocketException: Connection reset
{noformat}
2013-12-10 10:24:11,632 [ActiveMQ Transport: tcp:///127.0.0.1:55606@61616] WARN
org.apache.activemq.broker.TransportConnection.Transport - Transport
Connection to: tcp://127.0.0.1:55606 failed: java.net.SocketException:
Connection reset
2013-12-10 10:24:29,459 [ActiveMQ Transport: tcp:///127.0.0.1:61992@61616] WARN
org.apache.activemq.broker.TransportConnection.Transport - Transport
Connection to: tcp://127.0.0.1:61992 failed: java.net.SocketException:
Connection reset
2013-12-10 10:24:29,459 [ActiveMQ Transport: tcp:///127.0.0.1:61288@61616] WARN
org.apache.activemq.broker.TransportConnection.Transport - Transport
Connection to: tcp://127.0.0.1:61288 failed: java.net.SocketException:
Connection reset
{noformat}
was (Author: cmamen):
I think your right - thanks for responding. and Pointer object shared ptr.
My dmp files (when the crash occur) doesnt show anywhere that a thread was
currently inside ActiveMQConnection::Close
Interestingly, i notice that the broker, at about the same time (~1msec) shows
a bunch of java.net.SocketException: Connection reset
{noformat}
2013-12-10 10:24:11,632 [ActiveMQ Transport: tcp:///127.0.0.1:55606@61616] WARN
org.apache.activemq.broker.TransportConnection.Transport - Transport
Connection to: tcp://127.0.0.1:55606 failed: java.net.SocketException:
Connection reset
2013-12-10 10:24:29,459 [ActiveMQ Transport: tcp:///127.0.0.1:61992@61616] WARN
org.apache.activemq.broker.TransportConnection.Transport - Transport
Connection to: tcp://127.0.0.1:61992 failed: java.net.SocketException:
Connection reset
2013-12-10 10:24:29,459 [ActiveMQ Transport: tcp:///127.0.0.1:61288@61616] WARN
org.apache.activemq.broker.TransportConnection.Transport - Transport
Connection to: tcp://127.0.0.1:61288 failed: java.net.SocketException:
Connection reset
{noformat}
> ConcurrentStlMap - stl map find crash with empty map
> ----------------------------------------------------
>
> Key: AMQCPP-527
> URL: https://issues.apache.org/jira/browse/AMQCPP-527
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Components: Decaf
> Affects Versions: 3.8.1
> Reporter: Christian Mamen
> Assignee: Timothy Bish
> Fix For: 3.8.3, 3.9.0
>
>
> Recently experience a crash while an activemq work thread attempts to remove
> a temporary destination from a ConcurrentStlMap. This crash happens inside a
> std::map::find() when the map is currently empty.
> {code}
> virtual V remove(const K& key) {
> V result = V();
> synchronized(&mutex) {
> typename std::map<K, V, COMPARATOR>::iterator iter =
> valueMap.find(key);
> if (iter == valueMap.end()) {
> return result;
> }
> [...]
> {code}
> I look arround in forums and found that some people do experience similar
> problems with stl map.
> http://social.msdn.microsoft.com/Forums/en-US/9fdd11cd-ab7a-4173-8fcc-ca239b10fd20/weird-crash-in-c-mapsfind-when-compiled-in-release-mode
> http://www.velocityreviews.com/forums/t278300-std-map-find-throws-exception-when-map-is-empty.html
> so it appears that this error might be an stl issue, (perhaps platform
> related?). The workaround suggested is the check if the map is empty before
> performing a find.
> The stack trace i got
> {noformat}
>
> activemq-cpp.dll!std::_Tree<std::_Tmap_traits<decaf::lang::Pointer<activemq::commands::ActiveMQTempDestination,decaf::util::concurrent::atomic::AtomicRefCounter>,decaf::lang::Pointer<activemq::commands::ActiveMQTempDestination,decaf::util::concurrent::atomic::AtomicRefCounter>,decaf::lang::PointerComparator<activemq::commands::ActiveMQDestination,decaf::util::concurrent::atomic::AtomicRefCounter>,std::allocator<std::pair<decaf::lang::Pointer<activemq::commands::ActiveMQTempDestination,decaf::util::concurrent::atomic::AtomicRefCounter>
> const
> ,decaf::lang::Pointer<activemq::commands::ActiveMQTempDestination,decaf::util::concurrent::atomic::AtomicRefCounter>
> > >,0> >::_Lbound(const
> decaf::lang::Pointer<activemq::commands::ActiveMQTempDestination,decaf::util::concurrent::atomic::AtomicRefCounter>
> & _Keyval={...}) Line 1264 + 0x8 bytes C++
>
> activemq-cpp.dll!std::_Tree<std::_Tmap_traits<decaf::lang::Pointer<activemq::commands::ActiveMQTempDestination,decaf::util::concurrent::atomic::AtomicRefCounter>,decaf::lang::Pointer<activemq::commands::ActiveMQTempDestination,decaf::util::concurrent::atomic::AtomicRefCounter>,decaf::lang::PointerComparator<activemq::commands::ActiveMQDestination,decaf::util::concurrent::atomic::AtomicRefCounter>,std::allocator<std::pair<decaf::lang::Pointer<activemq::commands::ActiveMQTempDestination,decaf::util::concurrent::atomic::AtomicRefCounter>
> const
> ,decaf::lang::Pointer<activemq::commands::ActiveMQTempDestination,decaf::util::concurrent::atomic::AtomicRefCounter>
> > >,0> >::lower_bound(const
> decaf::lang::Pointer<activemq::commands::ActiveMQTempDestination,decaf::util::concurrent::atomic::AtomicRefCounter>
> & _Keyval={...}) Line 1004 + 0x10 bytes C++
>
> activemq-cpp.dll!std::_Tree<std::_Tmap_traits<decaf::lang::Pointer<activemq::commands::ActiveMQTempDestination,decaf::util::concurrent::atomic::AtomicRefCounter>,decaf::lang::Pointer<activemq::commands::ActiveMQTempDestination,decaf::util::concurrent::atomic::AtomicRefCounter>,decaf::lang::PointerComparator<activemq::commands::ActiveMQDestination,decaf::util::concurrent::atomic::AtomicRefCounter>,std::allocator<std::pair<decaf::lang::Pointer<activemq::commands::ActiveMQTempDestination,decaf::util::concurrent::atomic::AtomicRefCounter>
> const
> ,decaf::lang::Pointer<activemq::commands::ActiveMQTempDestination,decaf::util::concurrent::atomic::AtomicRefCounter>
> > >,0> >::find(const
> decaf::lang::Pointer<activemq::commands::ActiveMQTempDestination,decaf::util::concurrent::atomic::AtomicRefCounter>
> & _Keyval={...}) Line 982 C++
> >
> > activemq-cpp.dll!decaf::util::concurrent::ConcurrentStlMap<decaf::lang::Pointer<activemq::commands::ActiveMQTempDestination,decaf::util::concurrent::atomic::AtomicRefCounter>,decaf::lang::Pointer<activemq::commands::ActiveMQTempDestination,decaf::util::concurrent::atomic::AtomicRefCounter>,decaf::lang::PointerComparator<activemq::commands::ActiveMQDestination,decaf::util::concurrent::atomic::AtomicRefCounter>
> > >::remove(const
> > decaf::lang::Pointer<activemq::commands::ActiveMQTempDestination,decaf::util::concurrent::atomic::AtomicRefCounter>
> > & key={...}) Line 920 C++
>
> activemq-cpp.dll!activemq::core::ActiveMQConnection::removeTempDestination(decaf::lang::Pointer<activemq::commands::ActiveMQTempDestination,decaf::util::concurrent::atomic::AtomicRefCounter>
> destination={...}) Line 1828 + 0x25 bytes C++
>
> activemq-cpp.dll!activemq::core::AdvisoryConsumer::processDestinationInfo(decaf::lang::Pointer<activemq::commands::DestinationInfo,decaf::util::concurrent::atomic::AtomicRefCounter>
> info={...}) Line 154 C++
> activemq-cpp.dll!activemq::core::AdvisoryConsumer::dispatch(const
> decaf::lang::Pointer<activemq::commands::MessageDispatch,decaf::util::concurrent::atomic::AtomicRefCounter>
> & message={...}) Line 135 C++
>
> activemq-cpp.dll!activemq::core::ActiveMQConnection::onCommand(decaf::lang::Pointer<activemq::commands::Command,decaf::util::concurrent::atomic::AtomicRefCounter>
> command={...}) Line 1077 C++
>
> activemq-cpp.dll!activemq::transport::TransportFilter::onCommand(decaf::lang::Pointer<activemq::commands::Command,decaf::util::concurrent::atomic::AtomicRefCounter>
> command={...}) Line 91 + 0x27 bytes C++
>
> activemq-cpp.dll!activemq::transport::correlator::ResponseCorrelator::onCommand(decaf::lang::Pointer<activemq::commands::Command,decaf::util::concurrent::atomic::AtomicRefCounter>
> command={...}) Line 295 C++
>
> activemq-cpp.dll!activemq::transport::TransportFilter::onCommand(decaf::lang::Pointer<activemq::commands::Command,decaf::util::concurrent::atomic::AtomicRefCounter>
> command={...}) Line 91 + 0x27 bytes C++
>
> activemq-cpp.dll!activemq::wireformat::openwire::OpenWireFormatNegotiator::onCommand(decaf::lang::Pointer<activemq::commands::Command,decaf::util::concurrent::atomic::AtomicRefCounter>
> command={...}) Line 145 C++
>
> activemq-cpp.dll!activemq::transport::TransportFilter::onCommand(decaf::lang::Pointer<activemq::commands::Command,decaf::util::concurrent::atomic::AtomicRefCounter>
> command={...}) Line 91 + 0x27 bytes C++
>
> activemq-cpp.dll!activemq::transport::inactivity::InactivityMonitor::onCommand(decaf::lang::Pointer<activemq::commands::Command,decaf::util::concurrent::atomic::AtomicRefCounter>
> command={...}) Line 334 C++
>
> activemq-cpp.dll!activemq::transport::TransportFilter::onCommand(decaf::lang::Pointer<activemq::commands::Command,decaf::util::concurrent::atomic::AtomicRefCounter>
> command={...}) Line 91 + 0x27 bytes C++
>
> activemq-cpp.dll!activemq::transport::IOTransport::fire(decaf::lang::Pointer<activemq::commands::Command,decaf::util::concurrent::atomic::AtomicRefCounter>
> command={...}) Line 116 C++
> activemq-cpp.dll!activemq::transport::IOTransport::run() Line 275
> C++
> activemq-cpp.dll!decaf::lang::Thread::run() Line 143 C++
> activemq-cpp.dll!`anonymous namespace'::runCallback(void *
> arg=0x02d9c3c8) Line 266 + 0x11 bytes C++
> activemq-cpp.dll!`anonymous namespace'::threadEntryMethod(void *
> arg=0x02d9c3c8) Line 254 + 0x15 bytes C++
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)