Return-Path: X-Original-To: apmail-logging-log4cxx-user-archive@www.apache.org Delivered-To: apmail-logging-log4cxx-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 892F84546 for ; Wed, 8 Jun 2011 08:15:38 +0000 (UTC) Received: (qmail 71048 invoked by uid 500); 8 Jun 2011 08:15:38 -0000 Delivered-To: apmail-logging-log4cxx-user-archive@logging.apache.org Received: (qmail 70818 invoked by uid 500); 8 Jun 2011 08:15:37 -0000 Mailing-List: contact log4cxx-user-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4CXX User" List-Id: Delivered-To: mailing list log4cxx-user@logging.apache.org Received: (qmail 70805 invoked by uid 99); 8 Jun 2011 08:15:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jun 2011 08:15:36 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gcallu-log4cxx-user@m.gmane.org designates 80.91.229.12 as permitted sender) Received: from [80.91.229.12] (HELO lo.gmane.org) (80.91.229.12) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jun 2011 08:15:30 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QUDus-00029Y-Lx for log4cxx-user@logging.apache.org; Wed, 08 Jun 2011 10:15:07 +0200 Received: from eng051092.eng.uts.edu.au ([138.25.51.92]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Jun 2011 10:15:06 +0200 Received: from stephen.webb by eng051092.eng.uts.edu.au with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Jun 2011 10:15:06 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: log4cxx-user@logging.apache.org From: Stephen Webb Subject: Re: MutexException at exit when using SocketHubAppender Date: Wed, 8 Jun 2011 05:31:58 +0000 (UTC) Lines: 31 Message-ID: References: <4A0B16C0.8030905@newwireless.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 138.25.51.92 (Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24) > > See https://issues.apache.org/jira/browse/LOGCXX-278, which is fixed in 0.10.1 that has never been released. > On Wed, May 13, 2009 at 2:51 PM, Gerrit van Doorn newwireless.com> wrote:When I use SocketHubAppender and the application exits I get a "Debug Error!" message telling me the application requested the Runtime to terminate in an unusual way. When debugging the application it runs fine (I receive messages in Chainsaw) but when the application exits it tells me: > > "Unhandled exception at .... in ... Microsoft C++ exception: log4cxx::helpers::MutexException at memory location ...". > Is there a solution to this? Am I using the SocketHubAppender incorrectly? My config is: > log4j.rootLogger=TRACE, SOCKETHUB > log4j.appender.SOCKETHUB=org.apache.log4j.net.SocketHubAppender > log4j.appender.SOCKETHUB.port=4445 > > > -- Dale King > To fix this remove the LogLog::debug(...) lines from SocketHubAppender::close(). As the application shuts down, the mutex used by LogLog is deleted before SocketHubAppender::close() is called. You also should remove the throw ThreadException() from Thread::join() as the tread can be stopped when this is called. -- Stephen Webb