[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1072573: marked as done (rpc.idmapd runs out of file descriptors)



Your message dated Fri, 20 Sep 2024 18:50:31 +0000
with message-id <E1srii7-001iaT-2q@fasolo.debian.org>
and subject line Bug#1072573: fixed in nfs-utils 1:2.7.1-3
has caused the Debian Bug report #1072573,
regarding rpc.idmapd runs out of file descriptors
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 owner@bugs.debian.org
immediately.)


-- 
1072573: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1072573
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: nfs-common
Version: 2.6.2-4
Severity: important
Tags: patch upstream

On some of our bookworm systems I've seen what looked like a file descriptor leak. Sample lsof output:

[...]
rpc.idmap 675 root  126r      DIR               0,40        0      10813 /run/rpc_pipefs/nfs/clnt11e6 (deleted)
rpc.idmap 675 root  127u     FIFO               0,40      0t0      10817 /run/rpc_pipefs/nfs/clnt11e6/idmap (deleted)
rpc.idmap 675 root  128r      DIR               0,40        0      10834 /run/rpc_pipefs/nfs/clnt11ef (deleted)
rpc.idmap 675 root  129u     FIFO               0,40      0t0      10838 /run/rpc_pipefs/nfs/clnt11ef/idmap (deleted)
rpc.idmap 675 root  130r      DIR               0,40        0      10855 /run/rpc_pipefs/nfs/clnt11f8 (deleted)
rpc.idmap 675 root  131u     FIFO               0,40      0t0      10859 /run/rpc_pipefs/nfs/clnt11f8/idmap (deleted)

Cranking up the verbosity level to 3 showed that dirscancb never reaps stale entries in its queue (no "Stale client" lines). The reason turns out to be that the scan terminates on the first directory entry that doesn't contain an "idmap" file. Applying the attached patch seems to have solved the problem for me.

As far as I can tell the bug is still present upstream, and has been for many years (that "goto out" is from 2007 and replaced a "return" so the bug is even older than that).

Marking "important" since this has actually caused observable problems in our environment.
From: Sergio Gelato <Sergio.Gelato@astro.su.se>
Date: Tue, 4 Jun 2024 16:02:59 +0200
Subject: rpc.idmapd: nfsopen() failures should not be fatal

dirscancb() loops over all clnt* subdirectories of /run/rpc_pipefs/nfs/.
Some of these directories contain /idmap files, others don't. nfsopen()
returns -1 for the latter; we then want to skip the directory, not abort
the entire scan.
---
 utils/idmapd/idmapd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
index e79c124..f3c540d 100644
--- a/utils/idmapd/idmapd.c
+++ b/utils/idmapd/idmapd.c
@@ -556,7 +556,7 @@ dirscancb(int fd, short UNUSED(which), void *data)
 			if (nfsopen(ic) == -1) {
 				close(ic->ic_dirfd);
 				free(ic);
-				goto out;
+				continue;
 			}
 
 			if (verbose > 2)

--- End Message ---
--- Begin Message ---
Source: nfs-utils
Source-Version: 1:2.7.1-3
Done: Salvatore Bonaccorso <carnil@debian.org>

We believe that the bug you reported is fixed in the latest version of
nfs-utils, 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 1072573@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Salvatore Bonaccorso <carnil@debian.org> (supplier of updated nfs-utils 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 ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Fri, 20 Sep 2024 20:36:56 +0200
Source: nfs-utils
Architecture: source
Version: 1:2.7.1-3
Distribution: unstable
Urgency: medium
Maintainer: Debian kernel team <debian-kernel@lists.debian.org>
Changed-By: Salvatore Bonaccorso <carnil@debian.org>
Closes: 1072573
Changes:
 nfs-utils (1:2.7.1-3) unstable; urgency=medium
 .
   * rpc.idmapd: nfsopen() failures should not be fatal (Closes: #1072573)
Checksums-Sha1: 
 0a7972bc75b9af9bb7cc041d0ea352740fae03db 2633 nfs-utils_2.7.1-3.dsc
 c6a5bffb2f3f63672615cfbb6a3b31ea29005f63 49756 nfs-utils_2.7.1-3.debian.tar.xz
Checksums-Sha256: 
 71075db32e8f4347356d34a1a28ef2356954be1541687f788b0b387dbeffa349 2633 nfs-utils_2.7.1-3.dsc
 95c6d028fccab2714efe089d4a6935abd377690209cc4a96e7c5d4ba2d9bbbe3 49756 nfs-utils_2.7.1-3.debian.tar.xz
Files: 
 fc48f12be58f9dbbac1bb5e3e7de3220 2633 net optional nfs-utils_2.7.1-3.dsc
 2811cb28323a6546ac5cf945334ae93e 49756 net optional nfs-utils_2.7.1-3.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQKmBAEBCgCQFiEERkRAmAjBceBVMd3uBUy48xNDz0QFAmbtwWZfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDQ2
NDQ0MDk4MDhDMTcxRTA1NTMxRERFRTA1NENCOEYzMTM0M0NGNDQSHGNhcm5pbEBk
ZWJpYW4ub3JnAAoJEAVMuPMTQ89EwGAP/1c4+aQFcizzzWEJxkeH6c4NDvCu7ip1
B2T8Ki/NwXlgw5jD++zNysGJlBf49n+8AorVsIjEgfOPWCqJAYfhL0TV+ga6VA83
3ExI5l5gAGIHB7xgDWciEkyobwTR8fwFRyRpiUylySqYfbLyhYTR7TArJkGX9oLi
XWXoNgEgKvj0oqGaR8oNrOyNnUIercH37BRSgOZw3g157mH3AqhQfzLDDEsJXnvH
iYCb8XjQn0OwKt/HLqEXcy9sNNanx+82fhiptPliNMq6NYAKGaO1tiJts6nTyPUe
oQMaVC95D9PuNvNJA+rLqzPcFbw9991NQcGxz6BqPpHey5JpdGywLrvLLllyS3Kg
FZI3kJpeTXF71oQKrww5UGYu0fuw8alVTMLQETreOndRvcsQ9AcK/35cqSEc+7ys
nomF18dwBPt3PRg8nZ8gRPRj1f5himm9Soiu187cSfYukGLqOKKEIjW/blu+XyLg
sOVZnxTUWvJLHC6egAP9sbnae+Xfcp8LOVYs7NAqIOcpkVnB9VyvBM/mnT5vVABk
WWzcWdYDyOinJoM60R0PsotqzFPSvGh+py1aoQsyTRUkvYqqHVOxE71Aw0ng6WNR
l3TVDgoSllr+40A+LQtBSJoSJZljy/6Ffc0eYwmCLiXentp0AHXHvStVEtHKzzv7
VoqoMKkVIAYk
=krNm
-----END PGP SIGNATURE-----

Attachment: pgpJ2RkuLWq1j.pgp
Description: PGP signature


--- End Message ---

Reply to: