# NFS over autofs, lot of pending NFSv4 callback

## Massimo B.

Hi,

I'm mounting NFS via autofs:

```
# grep nfs /etc/autofs/auto.master 

/mnt/nfs    /etc/autofs/auto.nfs  --timeout=120 --ghost

# cat /etc/autofs/auto.nfs 

data                -fstype=nfs,rw,noatime,nodiratime,async,tcp,soft,fsc   nfs01:/export/nfs/data

users               -fstype=nfs,rw,noatime,nodiratime,async,tcp,soft,fsc   nfs01:/export/nfs/users

local.SLES12        -fstype=nfs,rw,noatime,nodiratime,async,tcp,soft,fsc   nfs02:/export/usr/local/run/SLES12
```

However I have a huge list of NFSv4 callback processes and increasing:

```
# pgrep -alf NFS |wc -l

5196

# pgrep -alf NFS |head

310 NFSv4 callback

312 NFSv4 callback

314 NFSv4 callback

346 NFSv4 callback

347 NFSv4 callback

348 NFSv4 callback

350 NFSv4 callback

351 NFSv4 callback

352 NFSv4 callback

353 NFSv4 callback
```

The number is never decreasing over uptime but getting higher. What is wrong here? The nfs mounts are working fine. I'm not even using the mounts right now. But there is one mount that always gets remounted as soon as I umount it. Umount works without issue and no log message. But 2 seconds later autofs has mounted that mount again. lsof on that mount is empty. What can I do?

P.S.: Seems to be an upstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=1427493

----------

## Ant P.

Just checked my own system... ouch.

```
 ~ $ pgrep -alf NFS | wc -l

38
```

Running 4.11.3, it looks like the patch isn't in .4 either.

----------

## Massimo B.

Which patch, you mean the upstream patches from Redhat?

4.11.0-gentoo running here right now, but I've seen this issue since lot of earlier versions and also other kernels.

----------

## Zucca

Whoa. This might also be the reason I've been having randomly unable to mount NFS mounts (I tend to put my system to sleep rather than shutdown, thus making several remounts on each uptime, plus all the mounts have idle timeouts). At first I thought it was the RDMA that messed things up, but I've now been mounting the shares without it and nothing seems to have changed.

----------

## Massimo B.

Should we file that bug on bgo for tracking the upstream patch or even for including the patch already in gentoo-sources?

----------

## Zucca

 *Massimo B. wrote:*   

> Should we file that bug on bgo...

 There's already a bug report but it's still UNCONFIRMED. :o

----------

## peppev

 *Zucca wrote:*   

>  *Massimo B. wrote:*   Should we file that bug on bgo... There's already a bug report but it's still UNCONFIRMED. 

 

And I'm the author of this bug report:

https://bugs.gentoo.org/show_bug.cgi?id=617708

Not sure if they are the correct, definitive, patches, but my autofs gentoo systems seems

to work correctly from more than one month, now, with these patches applied to the gentoo kernel

4.9.16.

I can't understand why this bug is still in this state ;-(

G. Vitillaro.

----------

## Zucca

I'm on 4.11. I wonder how long I have to wait for upstream to fix this... *sigh*

----------

## Massimo B.

The bug has impact on 24/7 systems with lots of NFS mounts.

A bugfix already exists.

Should we raise the priority? Is any of the upstream vanilla sources already delivering that patch?

From what I see the bug currently is requesting for information about emerge --info which doesn't make much sense for a kernel bug if not architecture specific or something.

----------

## Zucca

I wonder if this bug can be circumvented by forcing certain NFS protocol version..? Unfortnately for me, I think RDMA features can only be used with version 4 or newer. :\

----------

## steveL

 *Massimo B. wrote:*   

> The bug has impact on 24/7 systems with lots of NFS mounts.
> 
> A bugfix already exists.
> 
> Should we raise the priority? Is any of the upstream vanilla sources already delivering that patch?

  Gentoo definitely wants the patches, IMO; they're minimally invasive, only touching NFSv4 code, and they've been tested and reviewed by a RH bod (I think he is.)

Best not to go playing with the bug settings (leave that to the wranglers.)

If you've been hit by the bug, and the patches correct the problem (preferably tested over more than a week) then chime in on the bug and say so (briefly; don't get into any rambles, and don't keep posting. Post once to confirm the problem and the fix.)

Positive reports like that from Gentoo users will add weight to carrying the patch. (Users not enabling NFSv4 won't even notice.) 

You can always vote for it, too, of course.

----------

