Devuan bug report logs - #748
nfs-ganesha: ganesha has a memory leak

version graph

Package: nfs-ganesha; Maintainer for nfs-ganesha is (unknown); Source for nfs-ganesha is src:nfs-ganesha.

Reported by: Bodo Eggert <7eggert@gmx.de>

Date: Wed, 8 Mar 2023 00:14:01 UTC

Severity: grave

Tags: debian

Found in version 3.4-1

Fixed in version 4.0.12-3~bpo11+1

Full log


🔗 View this message in rfc822 format

X-Loop: owner@bugs.devuan.org
Subject: bug#748: nfs-ganesha: ganesha has a memory leak
Reply-To: Bodo Eggert <7eggert@gmx.de>, 748@bugs.devuan.org
Resent-From: Bodo Eggert <7eggert@gmx.de>
Resent-To: devuan-bugs@lists.dyne.org
Resent-CC: devuan-dev@lists.dyne.org
X-Loop: owner@bugs.devuan.org
Resent-Date: Wed, 08 Mar 2023 00:14:01 +0000
Resent-Message-ID: <handler.748.B.16782343223141@bugs.devuan.org>
Resent-Sender: owner@bugs.devuan.org
X-Devuan-PR-Message: report 748
X-Devuan-PR-Package: nfs-ganesha
X-Devuan-PR-Keywords: 
Received: via spool by submit@bugs.devuan.org id=B.16782343223141
          (code B); Wed, 08 Mar 2023 00:14:01 +0000
Received: (at submit) by bugs.devuan.org; 8 Mar 2023 00:12:02 +0000
Delivered-To: bugs@devuan.org
Received: from email.devuan.org [2001:41d0:2:d06e::5c4:2612]
	by doc.devuan.org with IMAP (fetchmail-6.4.16)
	for <debbugs@localhost> (single-drop); Wed, 08 Mar 2023 00:12:02 +0000 (UTC)
Received: from email.devuan.org
	by email.devuan.org with LMTP
	id PMcGF4rSB2RkBQAAmSBk0A
	(envelope-from <7eggert@gmx.de>)
	for <bugs@devuan.org>; Wed, 08 Mar 2023 00:10:50 +0000
Received: by email.devuan.org (Postfix, from userid 109)
	id 47C3D96F; Wed,  8 Mar 2023 00:10:50 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on email.devuan.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.0 required=5.0 tests=FREEMAIL_FROM,
	RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_PASS,T_FILL_THIS_FORM_SHORT
	autolearn=ham autolearn_force=no version=3.4.6
Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=212.227.126.130; helo=mout.kundenserver.de; envelope-from=7eggert@gmx.de; receiver=<UNKNOWN> 
Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130])
	by email.devuan.org (Postfix) with ESMTPS id 6BC278CF
	for <submit@bugs.devuan.org>; Wed,  8 Mar 2023 00:10:43 +0000 (UTC)
Received: from be1.lan ([46.142.249.254]) by mrelayeu.kundenserver.de
 (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id
 1N49Yn-1qYqhP3REf-0101ft; Wed, 08 Mar 2023 01:10:42 +0100
Received: from nas10.lan ([192.168.7.240])
	by be1.lan with esmtp (Exim 4.95)
	(envelope-from <7eggert@gmx.de>)
	id 1pZhOC-0008QN-La;
	Wed, 08 Mar 2023 01:10:41 +0100
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Bodo Eggert <7eggert@gmx.de>
To: Devuan Bug Tracking System <submit@bugs.devuan.org>
Message-ID: <167823424058.6029.9134929213701540816.reportbug@nas10.lan>
X-Mailer: reportbug 7.10.3+devuan1
Date: Wed, 08 Mar 2023 01:10:40 +0100
X-Provags-ID: V03:K1:eguLIurMnT57GdryXfZjWRJlJ2JGj1QsYvIKIAOuyhhjD9roWlZ
 vA283BFoK13OJ1mbFFYOTNxYi4Blme1HferE8gTJcRGUMc6kkSpfFSanjjD22V6TVjyQ2mN
 DweNIpQ73FEwia/gOWBAv1ncpRyCTjsHlrXTMKnKIH2M8eYaBbFjM1WEVhv1ZYtwCXHO0CV
 Os22KtjNff0vfs0itnUrQ==
UI-OutboundReport: notjunk:1;M01:P0:9NWuh+nJxNQ=;ZJ7ouMCT2qj0KSXWRy/HK9TAljO
 m/r78AxrIrd6ECn3zkIOpaHYqnh//QgaPK1kReOkF0iq7NKcMsewhNRyQkz3BzkkMlVXogRnP
 Uwg8W5zArCPQEQM8ixWH692UGsLNdw7qhwjNkp4YYHSx/SuO0NQuYlVvdcfJBg+DdQofRz53l
 DJucbAFZx6HbuceVYwIqWebeHTfuWDazcQqw4TvITDNaN+8JnFUaHfWqOcxA4bZl47UNapcx2
 A7lfD9nnopra/QlBMSGiDsJ1Pw6ecd9qgY9p1nGeBZcVRh7vaDNOl39k7TlkeblTufFRBIxxi
 Qw/oArpsxEqrvo4hTHS8Sda84mMvhaldQyhfLcGYlgwwCm8Zh+T+slDIvQgsg9yTzSDW4cyb2
 wCMw6MzJr6EoPe2o7jaDr0KHOWM1ni6vcq7GQ1YeR4feAEHcs+xxrNJVJswvpk4F+GS4/GXZE
 b5d44qMq4SWnkUluVzLpYUaUPNuURI7NxrTV0eN/4aNR/S9aCNKAkfl4uR6WwuyGBHb5c6XYJ
 VEdX3FGqWeNia449L2vOcgn+NjYsBLidFNxbTqU5MulERivbpVCCiL+46swxMuAI8muZ6k/hy
 R8QqHmgcd1y5Ygdwhzh8egTL8rLeQTsGlYDGX7vyRmyVuN5yA+sUBlM8r/xdfadYAO2JJ+6jM
 YLS6+hchLUBWeezeSA8wRofFmhATr6Ho9/p1Fgbyng==
Package: nfs-ganesha
Version: 3.4-1
Severity: grave
Justification: renders package unusable

Dear Maintainer,

the shipped version of ganesha, version 3.4, does have a memory leak that
causes it to consume all available RAM and more.  I have 4 GB installed, but
yesterday ganesha did use about 6 GB and each stat() required swapping.

I did research about this some time ago, the recommended fix was to upgrade
to 4.x.  Today I tried to find that information again so I could link it but
I couldn't.  Still I think that it needs an upgrade as the proper fix, there
are a lot of memory leak threads on the maintainers' github.

In case the upgrade is not possible: (Otherwise ignore this please)

Currently I'm mitigating this with cgrpups and daily restarting the service. 
This (below) is the configuration that I'm trying since yesterday; I added
memory.soft_limit_in_bytes.  memory.limit_in_bytes alone did not help. 
Today the process did behave as expected.

$ cat /etc/boot.d/00cgconfig
#!/bin/sh
/usr/sbin/cgconfigparser -l /etc/cgconfig.conf
/usr/sbin/cgrulesengd
exit 0


/etc/cgconfig.conf:group daemon/nfsd {
/etc/cgconfig.conf:  cpu {
/etc/cgconfig.conf:    cpu.shares = 500;
/etc/cgconfig.conf:  }
/etc/cgconfig.conf:  memory {
/etc/cgconfig.conf:    memory.limit_in_bytes = 1000000000;
/etc/cgconfig.conf:    memory.soft_limit_in_bytes = 1000000000;
/etc/cgconfig.conf:  }
/etc/cgconfig.conf:}

/etc/cgrules.conf:*:/usr/bin/ganesha.nfsd       memory  daemon/nfsd


-- System Information:
Distributor ID:	Devuan
Description:	Devuan GNU/Linux 4 (chimaera)
Release:	4
Codename:	chimaera
Architecture: x86_64

Kernel: Linux 5.10.0-18-amd64 (SMP w/2 CPU threads)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages nfs-ganesha depends on:
ii  dbus              1.12.24-0+deb11u1devuan1
ii  libacl1           2.2.53-10
ii  libblkid1         2.36.1-8+devuan2
ii  libc6             2.31-13+deb11u5
ii  libcap2           1:2.44-1
ii  libcom-err2       1.46.2-2
ii  libdbus-1-3       1.12.24-0+deb11u1devuan1
ii  libgssapi-krb5-2  1.18.3-6+deb11u3
ii  libkrb5-3         1.18.3-6+deb11u3
ii  libnfsidmap2      0.25-6
ii  libntirpc3.4      3.4-2
ii  librados2         14.2.21-1
ii  liburcu6          0.12.2-1
ii  libuuid1          2.36.1-8+devuan2
ii  libwbclient0      2:4.13.13+dfsg-1~deb11u5
ii  nfs-common        1:1.3.4-6
ii  rpcbind           1.2.5-9

nfs-ganesha recommends no packages.

nfs-ganesha suggests no packages.

-- Configuration Files:
/etc/ganesha/ganesha.conf changed:
NFS_CORE_PARAM {
	## Allow NFSv3 to mount paths with the Pseudo path, the same as NFSv4,
	## instead of using the physical paths.
	#mount_path_pseudo = true;
	## Configure the protocols that Ganesha will listen for.  This is a hard
	## limit, as this list determines which sockets are opened.  This list
	## can be restricted per export, but cannot be expanded.
	Protocols = 3,4,9P;
}
EXPORT_DEFAULTS {
	## Access type for clients.  Default is None, so some access must be
	## given either here or in the export itself.
	#Access_Type = RW;
	Protocols = 3,4,9P;
	#FSAL {
	#	Name = VFS;
	#}
}
MDCACHE {
	## The point at which object cache entries will start being reused.
	#Entries_HWMark = 100000;
	Entries_HWMark = 50000;
}
EXPORT
{
	## Export Id (mandatory, each EXPORT must have a unique Export_Id)
	Export_Id = 1;
	## Exported path (mandatory)
	Path = /export;
	## Pseudo Path (required for NFSv4 or if mount_path_pseudo = true)
	Pseudo = /;
	## Restrict the protocols that may use this export.  This cannot allow
	## access that is denied in NFS_CORE_PARAM.
	Protocols = 3,4,9P;
	## Access type for clients.  Default is None, so some access must be
	## given. It can be here, in the EXPORT_DEFAULTS, or in a CLIENT block
	## Whether to squash various users.
	## Allowed security types for this export
	#Sectype = sys,krb5,krb5i,krb5p;
        FSAL {
                Name = VFS;
        }
	CLIENT
	{
		Clients = 192.168.redacted.0/24;
		Squash = None;
		Access_Type = RW;
		Sectype = sys;
	}
}
	## Default log level for all components
	#Default_Log_Level = WARN;
	## Configure per-component log levels.
	#Components {
		#FSAL = INFO;
		#NFS4 = EVENT;
	#}
	## Where to log
	#Facility {
		#name = FILE;
		#destination = "/var/log/ganesha.log";
		#enable = active;
	#}


-- no debconf information

Send a report that this bug log contains spam.


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Thu Dec 19 23:38:46 2024;