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


Groups > linux.debian.kernel > #82672 > unrolled thread

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

Started bySergio Gelato <sergio.gelato@astro.su.se>
First post2024-06-04 17:20 +0200
Last post2024-09-20 21:00 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.debian.kernel


Contents

  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

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

FromSergio Gelato <sergio.gelato@astro.su.se>
Date2024-06-04 17:20 +0200
SubjectBug#1072573: rpc.idmapd runs out of file descriptors
Message-ID<ILE77-yU3-1@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

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.

[toc] | [next] | [standalone]


#82680

FromSalvatore Bonaccorso <carnil@debian.org>
Date2024-06-05 16:20 +0200
Message-ID<ILZEB-Pg5-3@gated-at.bofh.it>
In reply to#82672
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

[toc] | [prev] | [next] | [standalone]


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

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2024-09-20 21:00 +0200
SubjectBug#1072573: marked as done (rpc.idmapd runs out of file descriptors)
Message-ID<JoR1f-dFz3-1@gated-at.bofh.it>
In reply to#82672

[Multipart message — attachments visible in raw view] — view raw

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web