NetBSD Problem Report #51668
From www@NetBSD.org Mon Nov 28 14:38:23 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 851E37A270
for <gnats-bugs@gnats.NetBSD.org>; Mon, 28 Nov 2016 14:38:23 +0000 (UTC)
Message-Id: <20161128143822.62B577A2E0@mollari.NetBSD.org>
Date: Mon, 28 Nov 2016 14:38:22 +0000 (UTC)
From: tg@gmplib.org
Reply-To: tg@gmplib.org
To: gnats-bugs@NetBSD.org
Subject: The xentop commands leaks memory
X-Send-Pr-Version: www-1.0
>Number: 51668
>Category: port-xen
>Synopsis: The xentop commands leaks memory
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-xen-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 28 14:40:00 +0000 2016
>Closed-Date: Mon Nov 28 17:16:14 +0000 2016
>Last-Modified: Mon Nov 28 17:16:14 +0000 2016
>Originator: Torbjörn Granlund
>Release: 7.0
>Organization:
>Environment:
NetBSD martin.gmplib.org 7.0_STABLE NetBSD 7.0_STABLE (GMPLIB) #0: Sun Oct 9 00:40:15 CEST 2016 root@martin.gmplib.org:/usr/src/sys/arch/amd64/compile/GMPLIB amd64
>Description:
The xentop command leaks memory. This is a long-term issue which affected NetBSD 6.1.x and affects NetBSD 7.0.x. This has messed up my systems a few times as Dom0 runs out of memory and starts killing processes.
With my 38 guests, xentop leaks about 80 KiB per update. I don't know if the leak rate is a function of the number of guests, but it is unsurprisingly a function of the update frequency.
>How-To-Repeat:
1. Start some Xen guests (in my case both HVM and PV guests)
2. Run xentop, optionally use the D command and give 1 as delay to speed up the leak
3. Run
while true; do
x=$(ps -o vsz,comm,pid | grep xentop)
mem=$(echo $x | awk '{print $1}')
echo $mem
sleep 1
done
to enjoy the gradually increasing, apparently unbounded memory use.
>Fix:
No fix known. I run a cronjob as root on my NetBSD Dom0 systems which kills xentop processes which have become greater than 1 GiB.
>Release-Note:
>Audit-Trail:
From: coypu@SDF.ORG
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: port-xen/51668: The xentop commands leaks memory
Date: Mon, 28 Nov 2016 14:49:50 +0000
Possibly lib/51572: curses memory leak(s) appearing in systat?
From: tg@gmplib.org (=?utf-8?Q?Torbj=C3=B6rn?= Granlund)
To: gnats-bugs@NetBSD.org
Cc: port-xen-maintainer@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: port-xen/51668: The xentop commands leaks memory
Date: Mon, 28 Nov 2016 16:04:58 +0100
coypu@SDF.ORG writes:
The following reply was made to PR port-xen/51668; it has been noted by G=
NATS.
=20=20
From: coypu@SDF.ORG
To: gnats-bugs@NetBSD.org
Cc:=20
Subject: Re: port-xen/51668: The xentop commands leaks memory
Date: Mon, 28 Nov 2016 14:49:50 +0000
=20=20
Possibly lib/51572: curses memory leak(s) appearing in systat?
=20=20=20
I think you're right!
I've now run
xentop -d1 -b
for several minutes and the memory use stays fixed.
(I suppose this PR can be closed with a reference to lib/51572.)
--=20
Torbj=C3=B6rn
Please encrypt, key id 0xC8601622
State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Mon, 28 Nov 2016 17:16:14 +0000
State-Changed-Why:
Same as lib/51572, which was resolved with with lib/libc/stdio/funopen.c:1.15
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.