Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 59393 invoked from network); 23 Nov 2010 23:53:17 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Nov 2010 23:53:17 -0000 Received: (qmail 33225 invoked by uid 500); 23 Nov 2010 23:53:49 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 33183 invoked by uid 500); 23 Nov 2010 23:53:49 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 33175 invoked by uid 99); 23 Nov 2010 23:53:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Nov 2010 23:53:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Nov 2010 23:53:46 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oANNrP6G015563 for ; Tue, 23 Nov 2010 23:53:25 GMT Message-ID: <26945225.11081290556404990.JavaMail.jira@thor> Date: Tue, 23 Nov 2010 18:53:24 -0500 (EST) From: "Kevin Quick (JIRA)" To: dev@activemq.apache.org Subject: [jira] Updated: (AMQCPP-327) SEGFAULT on shutdown with global variable AMQCPP references In-Reply-To: <21326876.14011289323681504.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQCPP-327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kevin Quick updated AMQCPP-327: ------------------------------- Attachment: AMQCPP-327_test.patch As requested, here are some selftest patches. Applying these will show failing tests due to these shutdown issues. Note: I am not an autoconf/automake expert so I do not know if I've correctly made the modifications required to get the test target programs built properly. > 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: AMQCPP-327_test.patch, mbtest.cpp, mbtest3.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::~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.