[syslog-ng] Possible memleak in 3.3 HEAD

Jakub Jankowski shasta at toxcorp.com
Mon Sep 19 09:06:18 CEST 2011


On Mon, 19 Sep 2011 07:13:28 +0200, Gergely Nagy wrote:
> Jakub Jankowski <shasta at toxcorp.com> writes:
> > I think I'm having a memleak in 3.3's HEAD. My production system, which 
> > receives ~300 messages/s throughout the day (so ~26.4 million 
> > messages daily) leaks ~700MB of memory per day.
> >
> > I did some investigation, here are the details:
> >
> > # syslog-ng -V
> > syslog-ng 3.3.0beta2
> > Installer-Version: 3.3.0beta2
> > Revision:
> > ssh+git://bazsi@git.balabit//var/scm/git/syslog-ng/syslog-ng-ose--mainline--3.3#no_branch#d6eea6a1130f8343b6600976d9f2319f9ed86c88
> 
> Could you try with a more recent git checkout? Bazsi fixed a couple of
> memory leaks since d6eea6a1130f8343b6600976d9f2319f9ed86c88, and they
> should all be gone with the most recent git HEAD
> (0a3d844ff94a14d770bcdfa993f02e87e58a81f2).

Actually, the code I run is from HEAD, despite syslog-ng -V output. This
is because of me having difficulties building directly from git checkout,
I took 3.3.0beta2 tarball and applied all the patches that went into
Bazsi's tree since 3.3.0beta2 tag. So, for example:

$ grep -B 4 'nv_table_clone.*value_len'  lib/logmsg.c 
  if (!log_msg_chk_flag(self, LF_STATE_OWN_PAYLOAD))
    {
      NVTable *payload = self->payload;

      self->payload = nv_table_clone(payload, name_len + value_len + 2);
$
Which, if I'm right, comes from 951659d2cdda1a522740881354de25dcbd4e42ce,
newer than that is only 0a3d844ff94a14d770bcdfa993f02e87e58a81f2 that adds
nothing but a comment.

> (I'll have a look at the valgrind logs when time permits, thanks for
> investigating!)

I'd be grateful, thanks. And sorry for misleading version output.


Cheers,

-- 
Jakub Jankowski|shasta at toxcorp.com|http://toxcorp.com/
GPG: FCBF F03D 9ADB B768 8B92 BB52 0341 9037 A875 942D


More information about the syslog-ng mailing list