Your message dated Sat, 14 Feb 2015 12:33:52 +0000
with message-id <e1ymbuy-0004ur...@franck.debian.org>
and subject line Bug#778343: fixed in xymon 4.3.17-6
has caused the Debian Bug report #778343,
regarding xymon: Severe memory leaks in xymond
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
778343: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778343
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: xymon
Version: 4.3.17-5
Severity: serious
Tags: patch pending fixed-upstream

Before christmas, I've setup a new Jessie installation with Xymon. Since
two or three weeks ago that installation is fed with all the monitoring
data our current and Wheezy based production monitoring server gets.
After approximately one week without restart, the xymond process on the
Jessie installation grew to 15 GB of memory usage.

Valgrind showed chunks of ca. 9 MB and 3.5 MB getting lost. Xymons
typical activity interval is 5 minutes. (The 9 MB sound realistic:
Summing up 9 MB every 5 minutes for a week would get 17.7 GB.)

How quick the memory usage grows seems to depend on the installation
and/or usage, too. I also have a 4.3.17-2 backport running on Wheezy for
many months, and we only had a single case where it ran long enough (3
months without restart) so that the memory usage grew in areas where we
noticed something. But that installation has way fewer hosts to monitor
and hence fewer messages to handle (2 vs 28 incoming messages per
second), so the memory leak didn't become that obvious as it is now.

And the memory leak has been fixed upstream with their recent 4.3.18
release (03-Feb-2015). The 4.3.18 upstream changelog contains the
following changelog entry:

  - xymond: Fix memory leak

With cherry-picking the following two patches from upstream's 4.3.18
branch in SVN, the memory usage of the same installation stayed around
256 MB of RAM usage (fluctuating between 247 MB and 263 MB) after three
hours despite it grew to over 300 MB after less than 30 minutes before.

And Valgrind seems happy since then, too.

Description:Fix memory leak in acknowledge handling.
 Cherry-picked from the 4.3.18 upstream release.
Origin: http://sourceforge.net/p/xymon/code/7488/
Applied-Upstream: http://sourceforge.net/p/xymon/code/7488/
Reviewed-by: Axel Beckert <a...@debian.org>

Index: xymon/xymond/xymond.c
===================================================================
--- xymon.orig/xymond/xymond.c  2015-02-13 15:38:17.000000000 +0100
+++ xymon/xymond/xymond.c       2015-02-13 15:40:05.000000000 +0100
@@ -2365,6 +2365,8 @@
        if (zombie->dismsg) xfree(zombie->dismsg);
        if (zombie->ackmsg) xfree(zombie->ackmsg);
        if (zombie->grouplist) xfree(zombie->grouplist);
+       if (zombie->lastchange) xfree(zombie->lastchange);
+       if (zombie->testflags) xfree(zombie->testflags);
        flush_acklist(zombie, 1);
        xfree(zombie);
        dbgprintf("<- free_log_t\n");

Description: Set an initial size for the xymondlog output
 Cherry-picked from the 4.3.18 upstream release.
 .
 Original commit message: "xymond: Set an initial size for the
 xymondlog output, to avoid realloc'ing the buffer too much. Fix a
 valgrind complaint. JC Cleaver"
 .
 Despite the harmless sounding commit message, this seems to fix a
 severe memory leak. Without this patch, valgrind reported the loss of
 about 12 MB every five minutes on a bigger installation.
Origin: http://sourceforge.net/p/xymon/code/7489/
Applied-Upstream: http://sourceforge.net/p/xymon/code/7489/

Index: xymon/xymond/xymond.c
===================================================================
--- xymon.orig/xymond/xymond.c  2015-02-13 16:50:42.000000000 +0100
+++ xymon/xymond/xymond.c       2015-02-13 17:21:42.000000000 +0100
@@ -3679,12 +3679,13 @@
                        }
 
                        xfree(msg->buf);
-                       logdata = generate_outbuf(NULL, logfields, h, log, 
acklevel);
+                       logdata = newstrbuffer(20480);
+                       logdata = generate_outbuf(&logdata, logfields, h, log, 
acklevel);
                        addtobuffer(logdata, msg_data(log->message, 0));
 
                        msg->doingwhat = RESPONDING;
                        msg->buflen = STRBUFLEN(logdata);
-                       msg->bufp = grabstrbuffer(logdata);
+                       msg->bufp = msg->buf = grabstrbuffer(logdata);
                }
 
                clear_filter(logfilter);

I intend to upload 4.3.17-6 with these two patches, the added CVE-ID for
the previous upload and one translation update. I will initially upload
it to the DELAYED queue and will then request a freeze exception for
Jessie.

All of that is already checked in into the "jessie" branch at
https://anonscm.debian.org/cgit/collab-maint/xymon.git/log/?h=jessie

-- System Information:
Debian Release: 8.0
  APT prefers unstable
  APT policy: (990, 'unstable'), (600, 'testing'), (500, 'buildd-unstable'), 
(400, 'stable'), (110, 'experimental'), (1, 'buildd-experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.18.0-trunk-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

--- End Message ---
--- Begin Message ---
Source: xymon
Source-Version: 4.3.17-6

We believe that the bug you reported is fixed in the latest version of
xymon, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 778...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Axel Beckert <a...@debian.org> (supplier of updated xymon package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 13 Feb 2015 21:59:49 +0100
Source: xymon
Binary: xymon xymon-client
Architecture: source amd64
Version: 4.3.17-6
Distribution: unstable
Urgency: medium
Maintainer: Christoph Berg <m...@debian.org>
Changed-By: Axel Beckert <a...@debian.org>
Description:
 xymon      - monitoring system for systems, networks and applications
 xymon-client - client for the Xymon network monitor
Closes: 775590 776126 778343
Changes:
 xymon (4.3.17-6) unstable; urgency=medium
 .
   [ Axel Beckert ]
   * Add CVE ID to the previous changelog entry.
   * Debconf translations, thanks!
     + ru by Yuri Kozlov (Closes: #776126)
   * Cherry pick two patches from upstream to fix multiple memory leaks.
     (Closes: #778343)
 .
   [ Christian Kastner ]
   * Document license of sha?.* files in debian/copyright (Closes: #775590)
Checksums-Sha1:
 7a3b82edc9b500af4fc2574e9d5a274005ba5b98 2067 xymon_4.3.17-6.dsc
 b6e317b12259961bf1efb54d43f3400829cff530 94824 xymon_4.3.17-6.debian.tar.xz
 8cd64063270797b5a80322a5c9055e11980f55dc 2258238 xymon_4.3.17-6_amd64.deb
 ae87054821947835aca69658bde8bedd1299d6d6 248604 xymon-client_4.3.17-6_amd64.deb
Checksums-Sha256:
 d894ccb0c865f1657870c011912c99c57272b8befbab8af61c48c28c498a8b8f 2067 
xymon_4.3.17-6.dsc
 ffeb000908a05c152afb82934a151b1938ffeac0080b882eae57d4d5b8a50c6e 94824 
xymon_4.3.17-6.debian.tar.xz
 67acc246f8b79f61b7a9cf7dcc12d74e109dc4a63b490dd209f867929a2b84fa 2258238 
xymon_4.3.17-6_amd64.deb
 546daa323b6cb9d3a2673afa4068f3a9ffb4091e43d4fb0b366ef3953e218396 248604 
xymon-client_4.3.17-6_amd64.deb
Files:
 a4c359b4b05aec8321a05d29743bb89b 2067 net extra xymon_4.3.17-6.dsc
 c5e760ed298f7e9a60bbb577102fbc39 94824 net extra xymon_4.3.17-6.debian.tar.xz
 2dc0a4ba43eb871078541d7da9b0aeae 2258238 net extra xymon_4.3.17-6_amd64.deb
 62b9a97d94ba64698c24a029a5e57692 248604 net extra 
xymon-client_4.3.17-6_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJU3mxPAAoJEGvmY8daNcl15ngQAIV8qMxvfXe83y47dy3XE894
QptXdKZSHAbDRgevVnKkUHd6lEVpDEhkVEO0BBiohR47SRlYENrZF/axjX8TC01w
iHvAeJ+ZdSw/5//unikFm4RPcyeRGpsTujgrwYjV3C70X5lgLboDn8+qwaY4O0Q1
cloXvE0IWPiCGWtXWoMrr79hVgG6kp/omUudnadegUoXY0Gz0Yz2oRxG2niPUZLd
SeC6+adfg5dVDaCNT6+cEgxwPjkPUbAciLLfNEHotN/EosME3EEvJRqSi+qYFv2R
Wt64GbrRhGyj5kH80iYLtCNcrcz8gKyoAmpuK5uy4zZuDT7ZjsFDUm5+5isQzzgs
dKVg2J2/OUjNEgJro8cNUWV8gSuGY3la+vwAXUY1M1Pz4gdE6vkH/CwfDcN4JO2O
Ulx22LKt49f4W70veS9zDF+GxPk0clx4ZbsqierQs1lyDfP6Zqrnhr+tpqFjogFs
2AbF1WwMvCTdPZUo2BWn7bNcybdZd0POXzpV6mnan7V0gQFd7Hi54r/qHPVgDVGf
31Aj42utny/QQQR0fUvEAOoBdAWeSmu4c1pI0H07UwV9Y4No7XPe+NxTqZC6HzJP
2mcTGkpg9VDuNg2lJKiJwfmB6U2I766mVpgXwcIeU4fbfyGVvtqur32+0yIEiKne
9/Z9znOn/crbRIqzz2UQ
=4vUI
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to