Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #82680

Bug#1072573: rpc.idmapd runs out of file descriptors

Path csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod
From Salvatore Bonaccorso <carnil@debian.org>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#1072573: rpc.idmapd runs out of file descriptors
Date Wed, 05 Jun 2024 16:20:01 +0200
Message-ID <ILZEB-Pg5-3@gated-at.bofh.it> (permalink)
References <ILE77-yU3-1@gated-at.bofh.it> <ILE77-yU3-1@gated-at.bofh.it>
X-Original-To Sergio Gelato <sergio.gelato@astro.su.se>, 1072573@bugs.debian.org
X-Mailbox-Line From debian-bugs-dist-request@lists.debian.org Wed Jun 5 14:15:09 2024
Old-Return-Path <debbugs@buxtehude.debian.org>
X-Spam-Flag NO
X-Spam-Score 0.191
Reply-To Salvatore Bonaccorso <carnil@debian.org>, 1072573@bugs.debian.org
Resent-To debian-bugs-dist@lists.debian.org
Resent-Cc Debian kernel team <debian-kernel@lists.debian.org>
X-Debian-Pr-Message followup 1072573
X-Debian-Pr-Package nfs-common
X-Debian-Pr-Keywords patch upstream
X-Debian-Pr-Source nfs-utils
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
X-Debian-User carnil
X-Debian-Message from BTS
X-Mailing-List <debian-bugs-dist@lists.debian.org> archive/latest/1841002
List-ID <debian-bugs-dist.lists.debian.org>
List-URL <https://lists.debian.org/debian-bugs-dist/>
Approved robomod@news.nic.it
Lines 57
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Wed, 5 Jun 2024 16:12:47 +0200
X-Original-Message-ID <ZmByXzGO-rlXbbhc@eldamar.lan>
X-Original-References <9c7ede9528c3481fb0ec54e160263979@astro.su.se> <9c7ede9528c3481fb0ec54e160263979@astro.su.se>
Xref csiph.com linux.debian.bugs.dist:1199939 linux.debian.kernel:82680

Cross-posted to 2 groups.

Show key headers only | View raw


Hi Sergio

On Tue, Jun 04, 2024 at 03:03:15PM +0000, Sergio Gelato wrote:
> 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)

Can you please report your issue upstream (to the linux-nfs) list and
submit your patch there? 

Thanks already,

Regards,
Salvatore

Back to linux.debian.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#1072573: rpc.idmapd runs out of file descriptors Sergio Gelato <sergio.gelato@astro.su.se> - 2024-06-04 17:20 +0200
  Bug#1072573: rpc.idmapd runs out of file descriptors Salvatore Bonaccorso <carnil@debian.org> - 2024-06-05 16:20 +0200
  Bug#1072573: marked as done (rpc.idmapd runs out of file descriptors) "Debian Bug Tracking System" <owner@bugs.debian.org> - 2024-09-20 21:00 +0200

csiph-web