logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: log4cxx on ia64 and MutexException
Date Wed, 21 Nov 2007 05:37:23 GMT

On Nov 20, 2007, at 3:55 PM, Tomasz NoiƄski wrote:

> Hi list,
>
>
> I've been using log4cxx for one project (pre-apache version 0.9.7,
> from official Debian packages). Recently I had to run this project  
> on a
> ia64 server (instead of a regular x86).
> On ia64, this version of log4cxx simply segfaulted before even
> outputting anything.
>
> I knew this version was rather old, so I tried the svn.
> I downloaded revision 596412 and compiled it without problems.
> This time there was no segmentation fault, but the program was killed
> by a "MutexException".
> I tested it with a simple "helloworld" program:
> --- 8< ---
> #include "log4cxx/logger.h"
> #include "log4cxx/basicconfigurator.h"
> int main() {
>         log4cxx::LoggerPtr logger(log4cxx::Logger::getLogger("x"));
>         log4cxx::BasicConfigurator::configure();
>         LOG4CXX_INFO(logger, "hello world");
> }
> --- 8< ---
>
> The exact result was:
> --- 8< ---
> 0 [0x20000000016d4420] INFO x null - hello world
> terminate called after throwing an instance of
> 'log4cxx::helpers::MutexException' what():  Mutex exception: stat = 22
> Aborted
> --- 8< ---
>
> I thought it might have been a problem with this revision and not ia64
> arch, so I tried the same revision on a regular PC. The same
> "helloworld" program _didn't_ crash on ia32.
>
>
> My questions are:
> - is ia64 architecture supported?
> - should I try other svn revisions? which ones?
> - how could I help to track this bug down? I'll be happy to run it
> through gdb etc. if it could help
>
>
> Some details about the system it crashes on:
> - Itanium2 processor (x86_64)
> - Debian Etch (ia64 version)
> - gcc 4.2.3 (also tries with gcc 4.1.2, same results)
> - Linux kernel 2.6.18
>
>
> Thanks in advance,
>
> Noix

Could you try rev 596934 and see if it fixes the issue.  I just built  
on Ubuntu AMD64 without issue, but I didn't test prior to that fix.   
I had been meaning to get in there and tweak the implementation of  
ObjectPtrBase::exchange, but needed some motivation.

log4cxx-0.9.7 did not attempt to do atomic exchanges on pointer  
assignments.  SVN HEAD does but it is complicated by:

apr_atomic_xchgptr has only recently been added to APR
apr_atomic_xchg32 is only appropriate for when void* is 32-bits
apr_atomic_xchgXXX will work outside of the lifetime of APR on most,  
but not all, platforms.
Checking (or triggering) APR initialization on every pointer  
assignments seems undesirable.
InterlockedExchangePointer is not in the Platform SDK shipped with VC6



Mime
View raw message