Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 914204 - cannot mount nfs4 partitions after kernel update 6.1.53
Summary: cannot mount nfs4 partitions after kernel update 6.1.53
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Distribution Kernel Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-15 03:27 UTC by email200202
Modified: 2023-09-18 23:19 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description email200202 2023-09-15 03:27:31 UTC
After updating to latest kernel 6.1.53, all nfs4 partitions failed to mount. I can mount them as nfs3.

# mount.nfs4 -v 10.x.y.z:/blah  /mnt/blah/
mount.nfs4: timeout set for Fri Sep 15 13:18:38 2023
mount.nfs4: trying text-based options 'vers=4.2,addr=10.x.y.z,clientaddr=10.x.y.w'
mount.nfs4: mount(2): Invalid argument
mount.nfs4: trying text-based options 'vers=4,minorversion=1,addr=10.x.y.z,clientaddr=10.x.y.w'
mount.nfs4: mount(2): Invalid argument
mount.nfs4: trying text-based options 'vers=4,addr=10.x.y.z,clientaddr=10.x.y.w'
mount.nfs4: mount(2): Invalid argument
mount.nfs4: an incorrect mount option was specified for /mnt/blah


# mount.nfs -v 10.x.y.z:/blah  /mnt/blah/
mount.nfs: timeout set for Fri Sep 15 13:25:36 2023
mount.nfs: trying text-based options 'vers=4.2,addr=10.x.y.z,clientaddr=10.x.y.w'
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options 'vers=4,minorversion=1,addr=10.x.y.z,clientaddr=10.x.y.w'
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options 'vers=4,addr=10.x.y.z,clientaddr=10.x.y.w'
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options 'addr=10.x.y.z'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 10.x.y.z prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 10.x.y.z prog 100005 vers 3 prot UDP port 37217


Reproducible: Always

Steps to Reproduce:
1. update kernel to 6.1.53
2. run mount.nfs4 to mount an nfs partition

Actual Results:  
Failed to mount

Expected Results:  
Should work
Comment 1 email200202 2023-09-15 11:13:24 UTC
I downgraded the client to 6.1.52 and kept the server at 6.1.53. The nfs4 mount started to work again

# uname -r
6.1.52-gentoo

# mount.nfs4 -v 10.x.y.z:/views  /mnt/blah/
mount.nfs4: timeout set for Fri Sep 15 21:06:32 2023
mount.nfs4: trying text-based options 'vers=4.2,addr=10.x.y.z,clientaddr=10.x.y.w'
Comment 2 Sebastian Parborg 2023-09-15 13:21:35 UTC
I just want to chime in and say that I have the exact same issue with kernel 6.5.3.

6.5.2 works fine. 6.5.3, I get the exact same error as reported here.

Perhaps it is SELinux related?
I'm not on a SELinux profile, but when I try to mount nfs4 shared now I get a "SELinux: Unable to set superblock options before the security server is initialized" error in dmesg.

I'm guessing the original reporter also gets the same dmesg print?
Comment 3 Sebastian Parborg 2023-09-15 13:29:04 UTC
Yepp, if I disable SELinux support in the kernel, I can now mount the nfs4 drives seemingly without any issue.
Comment 4 Mike Pagano gentoo-dev 2023-09-15 14:04:54 UTC
(In reply to Sebastian Parborg from comment #3)
> Yepp, if I disable SELinux support in the kernel, I can now mount the nfs4
> drives seemingly without any issue.

Can one of you do a git bisect.  It's easier to do it with a smaller jump in versions.

e.g. 6.1.52 -> 6.1.53 would be quicker
Comment 5 Sebastian Parborg 2023-09-15 14:10:51 UTC
@Mike Where do I find the correct git repo?
I tried to look at the kernel sources, but I didn't find the repo with the point release branches. My google fu only got me to the official download tarballs and Linus kernel git repo (which doesn't have the point release branches it seems)
Comment 6 Sebastian Parborg 2023-09-15 14:55:20 UTC
Found it: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Comment 8 Mike Pagano gentoo-dev 2023-09-15 16:54:44 UTC
(In reply to Sebastian Parborg from comment #7)
> Bisected it down to this commit:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/
> ?h=v6.5.3&id=a8d3a6e285f6bc92b37ffd30028869642b1d2682

Really great job.

Can you try this patch?

https://www.spinics.net/lists/linux-fsdevel/msg249428.html
Comment 9 Sebastian Parborg 2023-09-15 17:01:54 UTC
That patch seems to fix this issue!
Comment 10 Mike Pagano gentoo-dev 2023-09-15 17:22:57 UTC
(In reply to Sebastian Parborg from comment #9)
> That patch seems to fix this issue!

Thanks, I'll add it genpatches and roll releases this weekend.
Comment 11 Larry the Git Cow gentoo-dev 2023-09-15 18:54:50 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e5290890815822be747de50baf1dc95f5133cfd

commit 2e5290890815822be747de50baf1dc95f5133cfd
Author:     Mike Pagano <mpagano@gentoo.org>
AuthorDate: 2023-09-15 18:53:36 +0000
Commit:     Mike Pagano <mpagano@gentoo.org>
CommitDate: 2023-09-15 18:53:36 +0000

    sys-kernel/gentoo-sources: fix emp opts hndl in selinux_fs_context_submount
    
    selinux: fix handling of empty opts in selinux_fs_context_submount()
    
    Bug: https://bugs.gentoo.org/914204
    
    Signed-off-by: Mike Pagano <mpagano@gentoo.org>

 sys-kernel/gentoo-sources/Manifest                 |  3 +++
 .../gentoo-sources/gentoo-sources-6.5.3-r1.ebuild  | 28 ++++++++++++++++++++++
 2 files changed, 31 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e39eeaec9c68618503e9a7eed06147ea6299c49

commit 0e39eeaec9c68618503e9a7eed06147ea6299c49
Author:     Mike Pagano <mpagano@gentoo.org>
AuthorDate: 2023-09-15 18:51:37 +0000
Commit:     Mike Pagano <mpagano@gentoo.org>
CommitDate: 2023-09-15 18:51:37 +0000

    sys-kernel/gentoo-sources: selinux fix in selinux_fs_context_submount
    
    selinux: fix handling of empty opts in selinux_fs_context_submount()
    
    Bug: https://bugs.gentoo.org/914204
    
    Signed-off-by: Mike Pagano <mpagano@gentoo.org>

 sys-kernel/gentoo-sources/Manifest                 |  3 +++
 .../gentoo-sources/gentoo-sources-6.1.53-r1.ebuild | 28 ++++++++++++++++++++++
 2 files changed, 31 insertions(+)
Comment 12 Mike Pagano gentoo-dev 2023-09-15 18:56:34 UTC
Fixed in gentoo-sources-6.1.53-r1 and gentoo-sources-6.5.3-r1

Reassigning to distribution kernel team to decide whether they want to release new versions with this patch or wait until it flows downstream
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-16 03:00:29 UTC
thanks mike, ill handle that now
Comment 14 Larry the Git Cow gentoo-dev 2023-09-16 07:03:42 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b77c4f65b5ca9168b2272dcf769983672fbadd7f

commit b77c4f65b5ca9168b2272dcf769983672fbadd7f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-09-16 07:03:01 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-09-16 07:03:33 +0000

    sys-kernel/gentoo-kernel-bin: patch 6.5.3 for NFS issue
    
    Bring us up to genpatches-6.5-5 for a backported NFS fix.
    
    Bug: https://bugs.gentoo.org/914204
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-kernel/gentoo-kernel-bin/Manifest              |   4 +
 .../gentoo-kernel-bin-6.5.3-r1.ebuild              | 132 +++++++++++++++++++++
 2 files changed, 136 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18823cfea1ab9bfb4d96b56b6d2e5d93f481f77a

commit 18823cfea1ab9bfb4d96b56b6d2e5d93f481f77a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-09-16 07:02:11 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-09-16 07:03:32 +0000

    sys-kernel/gentoo-kernel-bin: patch 6.1.53 for NFS issue
    
    Bring us up to genpatches-6.1-60 for a backported NFS fix.
    
    Bug: https://bugs.gentoo.org/914204
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-kernel/gentoo-kernel-bin/Manifest              |   4 +
 .../gentoo-kernel-bin-6.1.53-r1.ebuild             | 127 +++++++++++++++++++++
 2 files changed, 131 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c701dda61770be9b23141b377fcff63c9be1ad7d

commit c701dda61770be9b23141b377fcff63c9be1ad7d
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-09-16 03:05:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-09-16 07:03:31 +0000

    sys-kernel/gentoo-kernel: patch 6.5.3 for NFS issue
    
    Bring us up to genpatches-6.5-5 for a backported NFS fix.
    
    Bug: https://bugs.gentoo.org/914204
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-kernel/gentoo-kernel/Manifest                  |   2 +
 .../gentoo-kernel/gentoo-kernel-6.5.3-r1.ebuild    | 147 +++++++++++++++++++++
 2 files changed, 149 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f142aee35f943e94de733d63161da88d87d9dfe

commit 9f142aee35f943e94de733d63161da88d87d9dfe
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-09-16 03:04:47 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-09-16 07:03:31 +0000

    sys-kernel/gentoo-kernel: patch 6.1.53 for NFS issue
    
    Bring us up to genpatches-6.1-60 for a backported NFS fix.
    
    Bug: https://bugs.gentoo.org/914204
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-kernel/gentoo-kernel/Manifest                  |   2 +
 .../gentoo-kernel/gentoo-kernel-6.1.53-r1.ebuild   | 146 +++++++++++++++++++++
 2 files changed, 148 insertions(+)
Comment 15 Larry the Git Cow gentoo-dev 2023-09-16 10:03:42 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=184108f5bdee1b11052fc4f03b0332e28e3f2e49

commit 184108f5bdee1b11052fc4f03b0332e28e3f2e49
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-09-16 10:02:15 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-09-16 10:02:15 +0000

    virtual/dist-kernel: add 6.5.3-r1
    
    On reflection, we really do need to bump the virtuals otherwise out of tree modules
    are going to be broken (whenever we rebuilt the binaries, this is going to cause
    an issue).
    
    Bug: https://bugs.gentoo.org/914204
    Signed-off-by: Sam James <sam@gentoo.org>

 virtual/dist-kernel/dist-kernel-6.5.3-r1.ebuild | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=733beabc35631f09e3ee27135c134fe501471df7

commit 733beabc35631f09e3ee27135c134fe501471df7
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-09-16 10:01:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-09-16 10:01:53 +0000

    virtual/dist-kernel: add 6.1.53-r1
    
    On reflection, we really do need to bump the virtuals otherwise out of tree modules
    are going to be broken (whenever we rebuilt the binaries, this is going to cause
    an issue).
    
    Bug: https://bugs.gentoo.org/914204
    Signed-off-by: Sam James <sam@gentoo.org>

 virtual/dist-kernel/dist-kernel-6.1.53-r1.ebuild | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
Comment 16 Larry the Git Cow gentoo-dev 2023-09-18 23:19:49 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=963140f26ae955299892109cf2ed54dc6de082c5

commit 963140f26ae955299892109cf2ed54dc6de082c5
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-09-18 23:18:44 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-09-18 23:19:38 +0000

    sys-kernel/gentoo-sources: stabilize 6.1.53-r1
    
    Pick up the NFS/SELinux fix.
    
    Bug: https://bugs.gentoo.org/914204
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-kernel/gentoo-sources/gentoo-sources-6.1.53-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)