You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Kevin Quick (JIRA)" <ji...@apache.org> on 2010/11/09 18:30:08 UTC
[jira] Updated: (AMQCPP-327) SEGFAULT on shutdown with global
variable AMQCPP references
[ https://issues.apache.org/activemq/browse/AMQCPP-327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Quick updated AMQCPP-327:
-------------------------------
Attachment: mbtest.cpp
C++ program to demonstrate segfault.
> SEGFAULT on shutdown with global variable AMQCPP references
> -----------------------------------------------------------
>
> Key: AMQCPP-327
> URL: https://issues.apache.org/activemq/browse/AMQCPP-327
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Components: CMS Impl
> Affects Versions: 3.2.1
> Environment: CentOS
> Reporter: Kevin Quick
> Assignee: Timothy Bish
> Priority: Minor
> Attachments: mbtest.cpp
>
>
> If AMQ-CPP resources are managed by global variables and those global variables are not explicitly shutdown, the post-exit shutdown code ordering usually causes a segfault. This is because the AMQ-CPP internal threads shutdown the apr library first and then the global variables attempt to close() their connections which result in apr calls.
> A simple program to demonstrate this is attached; when run it results in the segfault core trace:
> Program received signal SIGSEGV, Segmentation fault.
> 0xb72f72fe in mutex_hash (mem=0x806089c) at atomic/unix/mutex.c:78
> 78 atomic/unix/mutex.c: No such file or directory.
> in atomic/unix/mutex.c
> (gdb) bt
> #0 0xb72f72fe in mutex_hash (mem=0x806089c) at atomic/unix/mutex.c:78
> #1 0xb72f7457 in apr_atomic_cas32 (mem=0x806089c, with=0, cmp=1) at atomic/unix/mutex.c:152
> #2 0xb7e35bca in decaf::util::concurrent::atomic::AtomicBoolean::compareAndSet (
> this=0x8060898, expect=true, update=false)
> at decaf/util/concurrent/atomic/AtomicBoolean.cpp:42
> #3 0xb7a51238 in activemq::core::ActiveMQConnection::stop (this=0x8060880)
> at activemq/core/ActiveMQConnection.cpp:425
> #4 0xb7a56ad0 in activemq::core::ActiveMQConnection::close (this=0x8060880)
> at activemq/core/ActiveMQConnection.cpp:355
> #5 0x08048adc in mgr::~mgr() ()
> #6 0x08048b6b in std::auto_ptr<mgr>::~auto_ptr() ()
> #7 0x08048974 in __tcf_1 ()
> #8 0xb7346529 in exit () from /System/Links/Libraries/libc.so.6
> Note: possibly related to AMQCPP-231.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.