Curt Arnold | 1 Apr 07:20 2006
Picon

Re: possible memory leak with syslog feature in log4cxx-0.9.8.tar.gz?


On Mar 31, 2006, at 1:19 PM, Min Tjong wrote:

> Hello,
>
>
>
> First of all, I apologize for this rather lengthy email.  I am new  
> to log4cxx and have recently encountered a memory leak issue with  
> log4cxx-0.9.8.tar.gz.  I downloaded it fromhttp:// 
> littletux.homelinux.org/log4cxx and started playing with the syslog  
> feature
>
> by modifying the console example code provided in the package.    
> Basically the configure function is modified to use SyslogAppender  
> and PatternLayout and the main function is modified to include a  
> while loop with a sleep statement between logging occurrences.  The  
> entire modified code is presented below.
>
>
>
> Running the program on Windows XP, I am experiencing a memory leak  
> of approximately 120 bytes on each logging occurrence.
>
> I wonder if anybody has experienced something similar to this?   
> After some investigation, I found out that the leak was caused by  
> the call to apr_sockaddr_info_get in the DatagramSocket::send 
> (DatagramPacketPtr& p) method (datagramsocket.cpp).  At this point  
> I wonder if I am missing something.  Any comment/help would be much  
> appreciated.
(Continue reading)

Moshe Matitya | 2 Apr 11:48 2006

RE: Re: Expected release of 0.9.8 (mee too)

I'd like to know as well.

We're currently using 0.9.7 in our apps, because we'd rather use a
stable release than a snapshot of a moving target that  might turn out
to have problems.

But we're quite anxious to switch ovr to 0.9.8 as soon as its ready.

Thanks,

Moshe

-----Original Message-----
From: news [mailto:news <at> sea.gmane.org] On Behalf Of anton
Sent: Friday, March 31, 2006 9:06 AM
To: log4cxx-user <at> logging.apache.org
Subject: Re: Expected release of 0.9.8 (mee too)

Richards Jon <JRICHARDS <at> qinetiq.com> writes:

> 
> May I enquire as to whether there is a planned release date for 
> version 0.9.8?
> 

Yes this is a thing I would like to know too.

Is there somewhere like an actual status/roadmap/todo list?

Sorry for asking .. but 0.9.8 is on the way since .. don't remember .. a
(Continue reading)

Bruce E Durham | 3 Apr 14:47 2006

Re: Expected release of 0.9.8 (mee too)


I agree. I researched this package towards the beginning of the year and had the impression that it was not ready for 'prime-time'.  I see good potential, especially if the log4cxx common interfaces for debugging utilities like 'chainsaw' can stay in lock-step with those for log4j (cross language development concerns: java escape to C++ for heavy/legacy methods).

-Bruce.




anton <antonxx <at> gmx.de>
Sent by: news <news <at> sea.gmane.org>

03/31/2006 02:05 AM

Please respond to
"Log4CXX User" <log4cxx-user <at> logging.apache.org>

To
log4cxx-user <at> logging.apache.org
cc
Subject
Re: Expected release of 0.9.8 (mee too)





Richards Jon <JRICHARDS <at> qinetiq.com> writes:

>
> May I enquire as to whether there is a planned release date
> for version 0.9.8?
>

Yes this is a thing I would like to know too.

Is there somewhere like an actual status/roadmap/todo list?

Sorry for asking .. but 0.9.8 is on the way
since .. don't remember .. a year??

People looking around might get the impression
its not ready for use and there will never
be an "official" release.





Curt Arnold | 3 Apr 17:49 2006
Picon

Re: Expected release of 0.9.8 (mee too)


On Mar 31, 2006, at 1:05 AM, anton wrote:

> Richards Jon <JRICHARDS <at> qinetiq.com> writes:
>
>>
>> May I enquire as to whether there is a planned release date
>> for version 0.9.8?
>>
>

Actually, I suspect it will be 0.10.0.  Only differing in the minor  
version implies binary compatibility which there is no intent to  
achieve.

There has been a task list (see below) and most of the big issues  
have been knocked out.

> Yes this is a thing I would like to know too.
>
> Is there somewhere like an actual status/roadmap/todo list?
>

http://issues.apache.org/jira/browse/LOGCXX-62.  Haven't reviewed it  
for a little while, there may have been some newly created bugs that  
should be added as stoppers and maybe some bugs that should be closed  
out.

> Sorry for asking .. but 0.9.8 is on the way
> since .. don't remember .. a year??

At least.

>
> People looking around might get the impression
> its not ready for use and there will never
> be an "official" release.

I understand.  There was a long period that log4cxx was in the  
incubator and could not do an official release.  We've long since  
moved out and need to put 0.9.7 out of its misery.

Min Tjong | 4 Apr 03:05 2006

RE: possible memory leak with syslog feature in log4cxx-0.9.8.tar.gz?

Curt,

Thanks for the response. Your explanation makes sense. I probably need
to play around with it some more to get better understanding of the
memory pool.

Thanks again,
Min

-----Original Message-----
From: Curt Arnold [mailto:carnold <at> apache.org] 
Sent: Friday, March 31, 2006 9:20 PM
To: Log4CXX User
Subject: Re: possible memory leak with syslog feature in
log4cxx-0.9.8.tar.gz?

On Mar 31, 2006, at 1:19 PM, Min Tjong wrote:

> Hello,
>
>
>
> First of all, I apologize for this rather lengthy email.  I am new  
> to log4cxx and have recently encountered a memory leak issue with  
> log4cxx-0.9.8.tar.gz.  I downloaded it fromhttp:// 
> littletux.homelinux.org/log4cxx and started playing with the syslog  
> feature
>
> by modifying the console example code provided in the package.    
> Basically the configure function is modified to use SyslogAppender  
> and PatternLayout and the main function is modified to include a  
> while loop with a sleep statement between logging occurrences.  The  
> entire modified code is presented below.
>
>
>
> Running the program on Windows XP, I am experiencing a memory leak  
> of approximately 120 bytes on each logging occurrence.
>
> I wonder if anybody has experienced something similar to this?   
> After some investigation, I found out that the leak was caused by  
> the call to apr_sockaddr_info_get in the DatagramSocket::send 
> (DatagramPacketPtr& p) method (datagramsocket.cpp).  At this point  
> I wonder if I am missing something.  Any comment/help would be much  
> appreciated.
>
>
>
> Regards,
>
> Min

The implementation of DatagramSocket::send does not correspond to the  
source in the Apache SVN (http://svn.apache.org/viewcvs.cgi/logging/ 
log4cxx/trunk/src/datagramsocket.cpp?rev=308840&view=markup).  I  
assume the author intended to commit the code, but somehow it fell  
through the cracks and it only appears in the littletux tarball.

 From the fragment, it appears that DatagramSocket has a member  
variable named memoryPool of type log4cxx::helpers::Pool.  Memory  
allocated from that pool is not reclaimed until the pool is destroyed  
which explains the observed memory leakage.  I would recommend that  
the member variable be removed and a Pool& be passed as a parameter  
to the send function (and another other function that needs a memory  
pool).

anton | 4 Apr 08:56 2006
Picon
Picon

Re: Expected release of 0.9.8 (mee too)

First thanks for the info :-)

One other thing.. the following link seems to be broken: 

> http://issues.apache.org/jira/browse/LOGCXX-62.  Haven't reviewed it  

also your old issue tracker seems to have gone, did
I miss something (i didnt look in this list for some time)?

The following domain does no more exist:
http://nagoya.apache.org/jira/browse

Wyles Eric - ewyles | 5 Apr 23:46 2006

RE: segmentation faults


> >
> > How should I proceed? Separate bug reports for each problem that I
> > have
> > found? Where is the proper place to submit bug reports?
> >
> 
> https://issues.apache.org:443/jira/browse/LOGCXX
> 

So far, I have identified 7 distinct stack traces on segmentation
faults. Would you prefer that I open 1 bug report or 7 different ones?

> 
> Okay, wanted to know if this was something that we might see on Intel
> linux or if it was just happening on a more obscure platform.  Does
> the problem show up with other versions of gcc like a gcc 3.3 or gcc
> 4.0?
> 

I don't have access to install additional compilers on the development
machine, so I am not sure if these things are also happening on other
versions of gcc. When I open my bug report(s) I will attach a tar file
with my application.

> 
> After that message, all use of non-local static members was
> eliminated EXCEPT Level::DEBUG, Level::INFO et all which were
> publicly exposed and left for compatibility with existing programs
> and ease of porting log4j client code.  log4cxx does not use them,
> but instead uses Level::getDebug(), Level::getInfo() et al.  There
> was a recent report of segmentation faults related to the destruction
> of the Level::DEBUG and similar static members which were eliminated
> when they were removed.  Could you try your tests again and hack
> level.h and level.cpp to remove those members.

I will give this a shot, too.
*************************************************************************
The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be
legally privileged.

If the reader of this message is not the intended recipient, you are 
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.

If you have received this communication in error, please resend this
communication to the sender and delete the original message or any copy
of it from your computer system.

Thank you.
*************************************************************************

Curt Arnold | 6 Apr 06:35 2006
Picon

Re: segmentation faults

One bug report would be preferred.  If they are distinct issues, they  
can be split out later.

claudius grieser | 6 Apr 18:28 2006
Picon

problem building logcxx with cygwin

Hi everyone,

have a problem building log4cxx under cygwin.
used the latest sources in svn.
used the ant task for build.
got the library build
but when build the examples or my application i get link errors.
e.g.
../../log4cxx-CYGWIN/lib/liblog4cxx.a(class.o): In function
`_ZN7log4cxx7helpers5Class15registerClas
sesEv':
/home/mprinzhorn/src/trunk/log4cxx-trunk/src/class.cpp:134: undefined
reference to `log4cxx::AsyncAp
pender::registerClass()'

reason is APR_HAS_THREADS set to 0 which is the default under cygwin

any idee who to solve the problem?

Tahnks!
regards

Claudius Grieser

Vinayak Mithbaokar | 6 Apr 19:45 2006

log4cxx 0.9.8 build failed on windows

Hi,
 
I have downloaded the latest tarball for littletux. When I tried to build the source on windows with msvc 6, I got the following linking error:
(socketimpl.obj) Unresolved external symbol: _apr_wait_for_io_or_timeout
 
The above function (apr_wait_for_io_or_timeout) is defined in apr-1.2.2 library inside the apr_support.h file but it is not ported on windows. The apr/support folder contains only unix specific implementation of above function. So the function apr_wait_for_io_or_timeout should not be used on windows.
 

Best regards,

Vinayak Mithbaokar

 

 

Gmane