You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Gordon Sim (JIRA)" <ji...@apache.org> on 2015/04/17 16:08:58 UTC

[jira] [Commented] (QPID-6500) dangling bridge pointer in exchange

    [ https://issues.apache.org/jira/browse/QPID-6500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14499872#comment-14499872 ] 

Gordon Sim commented on QPID-6500:
----------------------------------

Possible scenario is concurrent (i) addition of new bridge, (ii) removal of existing bridge and (iii) deletion of  exchange.

If the exchange is removed from registry before the removal of the existing bridge can deregister itself, it will leave a dangling pointer. If the thread registering the new bridge got hold of the exchange just before it was deleted, it could still continue to register even if the exchange is immediately removed from the registry, and as this involves invoking on all existing bridges, that would invoke on a dangling pointer if the old bridge object has now been deleted.

> dangling bridge pointer in exchange
> -----------------------------------
>
>                 Key: QPID-6500
>                 URL: https://issues.apache.org/jira/browse/QPID-6500
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: 0.32
>            Reporter: Gordon Sim
>            Assignee: Gordon Sim
>
> Reported https://mail-archives.apache.org/mod_mbox/qpid-users/201504.mbox/%3CCABcBkRZh7%3DEVs-9hgzokDeTjhkCoOi-yVRiZNMaoTLesDDkBcg%40mail.gmail.com%3E
> {noformat}
> Program terminated with signal 6, Aborted.
> #0  0x00000036e5432925 in raise () from /lib64/libc.so.6
> (gdb) where
> #0  0x00000036e5432925 in raise () from /lib64/libc.so.6
> #1  0x00000036e5434105 in abort () from /lib64/libc.so.6
> #2  0x00000036e84bea5d in __gnu_cxx::__verbose_terminate_handler() ()
>    from /usr/lib64/libstdc++.so.6
> #3  0x00000036e84bcbe6 in ?? () from /usr/lib64/libstdc++.so.6
> #4  0x00000036e84bcc13 in std::terminate() () from /usr/lib64/libstdc++.so.6
> #5  0x00000036e84bd53f in __cxa_pure_virtual () from
> /usr/lib64/libstdc++.so.6
> #6  0x00007f2e1246d201 in qpid::broker::Exchange::registerDynamicBridge (
>     this=0x196f8b0, db=0x7f2daccc7da0)
>     at /pilot/dev/qpid_0.32_build/qpid/cpp/src/qpid/broker/Exchange.cpp:316
> #7  0x00007f2e124b0f83 in qpid::broker::Bridge::create (this=0x7f2daccc7d90,
>     c=<value optimized out>)
>     at /pilot/dev/qpid_0.32_build/qpid/cpp/src/qpid/broker/Bridge.cpp:193
> #8  0x00007f2e124e9c4a in qpid::broker::Link::ioThreadProcessing (
>     this=0x7f2d744717a0)
>     at /pilot/dev/qpid_0.32_build/qpid/cpp/src/qpid/broker/Link.cpp:481
> #9  0x00007f2e124b9026 in operator() (this=0x7f2d80006f00)
>     at /usr/include/boost/function/function_template.hpp:1013
> #10 qpid::broker::amqp_0_10::Connection::doIoCallbacks (this=0x7f2d80006f00)
>     at
> /pilot/dev/qpid_0.32_build/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.cpp:388
> #11 0x00007f2e124b9450 in qpid::broker::amqp_0_10::Connection::doOutput (
>     this=0x7f2d80006f00)
>     at
> /pilot/dev/qpid_0.32_build/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.cpp:394
> #12 0x00007f2e12443b2d in qpid::amqp_0_10::Connection::canEncode (
>     this=0x7f2d80005f10)
>     at
> /pilot/dev/qpid_0.32_build/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp:68
> #13 0x00007f2e11f89f6d in qpid::sys::AsynchIOHandler::idle (
>     this=0x7f2d80005030)
>     at
> /pilot/dev/qpid_0.32_build/qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp:215
> #14 0x00007f2e11f09a68 in operator() (this=0x7f2d800056f0, h=...)
>     at /usr/include/boost/function/function_template.hpp:1013
> #15 qpid::sys::posix::AsynchIO::writeable (this=0x7f2d800056f0, h=...)
>     at
> /pilot/dev/qpid_0.32_build/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp:582
> #16 0x00007f2e11f8e983 in boost::function1<void,
> qpid::sys::DispatchHandle&>::operator() (this=<value optimized out>,
> a0=<value optimized out>)
>     at /usr/include/boost/function/function_template.hpp:1013
> #17 0x00007f2e11f8dab0 in qpid::sys::DispatchHandle::processEvent (
>     this=0x7f2d800056f8, type=qpid::sys::Poller::WRITABLE)
>     at
> /pilot/dev/qpid_0.32_build/qpid/cpp/src/qpid/sys/DispatchHandle.cpp:287
> #18 0x00007f2e11f2eb32 in process (this=0x1959c60)
>     at /pilot/dev/qpid_0.32_build/qpid/cpp/src/qpid/sys/Poller.h:131
> #19 qpid::sys::Poller::run (this=0x1959c60)
>     at
> /pilot/dev/qpid_0.32_build/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp:522
> #20 0x00007f2e11f2397a in qpid::sys::(anonymous namespace)::runRunnable (
>     p=<value optimized out>)
>     at /pilot/dev/qpid_0.32_build/qpid/cpp/src/qpid/sys/posix/Thread.cpp:35
> #21 0x00000036e58079d1 in start_thread () from /lib64/libpthread.so.0
> #22 0x00000036e54e8b6d in clone () from /lib64/libc.so.6
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org