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: Segmentation fault log4cxx 0.10.0 on app exit (Solaris 8)
Date Tue, 10 Jun 2008 06:47:26 GMT

On Jun 9, 2008, at 8:05 PM, Allen Liu (allliu) wrote:

> Hi Curt,
>
> I compiled log4cxx-0.10.0 with gcc on 3 Solaris 8/sparc  
> workstations, 2 of which were installed with apr/apr-util 1.2.12  
> whereas the other apr/apr-util1.2.7.
>
> Before applying the objectimpl.cpp workaround you provided,
>
> 1. 'make check' would fail on unit-test with exit status 139
> 2. a small test program I wrote got segmentation fault on exit
>
> After applying your workaround,
>
> 1. 'make check' passed on all 3 machine
> 2. my small test program still exited with 'segmentation fault' on  
> the 2 machine installed with apr/apr-util 1.2.12. But it exited  
> without a problem on the 3rd machine (with apr 1.2.7)
>
> Then I replaced apr/apr-util 1.2.12 with 1.2.7 on those 2 sun  
> machines,
>
> 1. 'make check' passed
> 2. my small test program exited without 'segmentation fault' on all  
> 3 machines
>
>
> I got the following question:
> 1. I got an impression from other posts that apr/apr-util 1.2.2 are  
> officially used by log4cxx developers. Do I have to use 1.2.2? Or  
> 1.2.7 should be fine?
> 2. Will there be a permanent fix to replace the workaround solution  
> you provided in objectimpl.cpp?
>
> Thanks,
> Allen


The reason for the premature termination of APR hasn't been  
identified: it may be a compiler bug or an log4cxx issue.  The best  
workaround for now appears to be commenting out the apr_terminate() in  
src/main/cpp/aprinitialzer.cpp.  However, removing the apr_terminate  
call would result in more reported memory leaking from tools like  
Valgrind.  Until the nature of the underlying premature destruction of  
APRInitializer is known, their can't be a reasonable fix.

It would be helpful to know the versions of gcc in use and whether the  
problems occur when using the most recent gcc release.

Apache log4cxx 0.10.0 was built and tested against APR 1.2.11.  There  
were some issues with APR 1.2.12 on VC6 without a Platform SDK  
update.  The intent is that future releases will be built and tested  
using the current APR release.  Nothing should prevent you from using  
log4cxx with earlier APR 1.x releases, but they aren't tested or  
supported.

Mime
View raw message