[syslog-ng] [Bug 208] Memory leak when enabling debug logging

bugzilla at bugzilla.balabit.com bugzilla at bugzilla.balabit.com
Sat Oct 27 12:13:19 CEST 2012


https://bugzilla.balabit.com/show_bug.cgi?id=208





--- Comment #3 from Gergely Nagy <algernon at balabit.hu>  2012-10-27 12:13:19 ---
(In reply to comment #2)
> (In reply to comment #1)
> > Ouch. This is trivially reproducible, but only happens when setting the debug level with syslog-ng-ctl, as far as I see - when running with -d from the start,
> > the leak does not happen.
> > 
> 
> Right.
> But when I'm running  syslog-ng with '-d' it handles only 5-10% of all logs(in my custom configuration). I'm not sure if it's because of my current
> configuration but everything works great without '-d'. I would appreciate if somebody could try to generate some load when running syslog-ng with '-d' option.

I didn't mean to imply you should run with -d - I was merely observing what happens.

> So I have no change to debug my installation and would be really happy if developers are able to fix memory leak bug.

I'm working on it. Got as far as to produce a minimal config the problem happens with:

@version: 3.3
source s_internal { internal(); };
filter f_debug { level(debug); };
destination d_null {};
log { source(s_internal); filter(f_debug); destination(d_null); };

If either internal() or the filter is removed, the leak does not happen. From what I see from the core dump that happens when syslog-ng reaches its memory
limit, the filter-generated debug messages are the things that are leaking rapidly. Looks like we get into an infinite loop processing our own debug messages,
and producing a dozen new ones for each.


-- 
Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the syslog-ng mailing list