Bug 504602 - mount(2) for an NFS4 returns with -ENOMEM if ipv6 module is not loaded
mount(2) for an NFS4 returns with -ENOMEM if ipv6 module is not loaded
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Jeff Layton
Fedora Extras Quality Assurance
: Reopened
: 510083 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-08 09:20 EDT by Harald Hoyer
Modified: 2014-06-18 03:38 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-04-27 10:59:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Harald Hoyer 2009-06-08 09:20:21 EDT
Description of problem:
blacklist the ipv6 module and try to mount a NFS4 share.
mount(2) returns with -ENOMEM. Might be a kernel or rpcbind issue??

Version-Release number of selected component (if applicable):
$ rpm -qf $(which rpcbind mount.nfs4) 
rpcbind-0.1.7-3.fc11.x86_64
nfs-utils-1.1.5-6.fc11.x86_64
$ uname -a
Linux harryh 2.6.29.4-167.fc11.x86_64 #1 SMP Wed May 27 17:27:08 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
Comment 1 Chuck Lever 2009-06-30 13:36:22 EDT
Should be addressed in 2.6.30.  For 2.6.29, a kernel code change is needed to disable the creation of AF_INET6 callback listeners.
Comment 2 Chuck Lever 2009-06-30 13:41:33 EDT
(In reply to comment #1)
> Should be addressed in 2.6.30.  For 2.6.29, a kernel code change is needed to
> disable the creation of AF_INET6 callback listeners.  

That code change is kernel commit 26298caa.
Comment 3 Chuck Ebbert 2009-07-02 23:13:02 EDT
Fix:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff_plain;h=26298caa

Probably not worth fixing this now since we plan on moving to 2.6.30 soon.
Comment 4 Steve Dickson 2009-07-07 15:11:36 EDT
*** Bug 510083 has been marked as a duplicate of this bug. ***
Comment 5 Matt Bernstein 2009-07-10 07:09:39 EDT
(In reply to comment #3)
> Probably not worth fixing this now since we plan on moving to 2.6.30 soon.  

This affects F10 too--is this moving to 2.6.30 as well? Are there any 2.6.30 builds to try? I can't see any in koji.

Thanks for the fix, though, I can apply that locally for now.
Comment 6 Chuck Lever 2009-07-10 11:10:36 EDT
(In reply to comment #5)
> (In reply to comment #3)
> > Probably not worth fixing this now since we plan on moving to 2.6.30 soon.  
> 
> This affects F10 too

Please confirm...  F10 is 2.6.27... this issue shouldn't bother that kernel.

If it does, the workaround commit above is pretty simple to backport.  Note that it disables IPv6 support for NFSv4 callbacks for everybody, not just those who blacklist ipv6.ko.
Comment 7 Matt Bernstein 2009-07-14 16:36:11 EDT
(In reply to comment #6)
> (In reply to comment #5)
> > This affects F10 too
> 
> Please confirm...  F10 is 2.6.27... this issue shouldn't bother that kernel.

You're right, I was running with the updates-testing kernel. Sorry it took so long to un-confirm. F10 with 2.6.27 is fine.
Comment 8 Jeff Layton 2009-09-01 12:50:30 EDT
Sounds like we should close this one.

Please reopen if it's still a problem.
Comment 9 Enrico Scholz 2009-09-01 14:19:35 EDT
reopened...

[root@osama ~]# mount /home
mount.nfs4: Cannot allocate memory
[root@osama ~]# rpm -q kernel
kernel-2.6.29.6-217.2.16.fc11.x86_64
Comment 10 Jeff Layton 2009-09-01 16:06:07 EDT
Ahh good point, it does look like f11 is still on 2.6.29

Chuck, you said in comment #3 that F11 would be getting 2.6.30 kernels. What's the status of that?
Comment 11 Jeff Layton 2009-09-07 18:15:03 EDT
Looks like F11 updates repo got a 2.6.30 kernel over the weekend. Re-closing as CURRENTRELEASE.
Comment 12 Enrico Scholz 2009-09-08 14:36:51 EDT
reopening again...

when 'nfs' is not loaded yet, there happens still the -ENOMEM. A subsequent mount succeeds:

# lsmod
Module                  Size  Used by
nfs_acl                 3328  0 
fscache                41544  0 

# mount /home
mount.nfs4: Cannot allocate memory

# lsmod
Module                  Size  Used by
nfs                   300560  0 
nfs_acl                 3328  1 nfs

# mount /home
#

# rmmod nfs
# strace -f mount /home
[pid  1425] mount("...", "/home", "nfs4", MS_NOSUID|MS_NODEV, "sec=krb5i,posix,nointr,bg,client"...) = -1 ENOMEM (Cannot allocate memory)

# uname -r
2.6.30.5-43.fc11.x86_64
Comment 13 Chuck Lever 2009-09-08 16:39:41 EDT
(In reply to comment #12)
> reopening again...
> 
> when 'nfs' is not loaded yet, there happens still the -ENOMEM. A subsequent
> mount succeeds:

Do you know if this problem occurred before 2.6.30?
Comment 14 Enrico Scholz 2009-09-08 17:49:02 EDT
it's related to the ipv6 module loading:

* when ipv6 module loading is allowed, 'mount /home' works both in 2.6.30, 2.6.29 and (probably) 2.6.27

* when ipv6 module loading is prohibited (by 'install ipv6 /bin/true' modprobe rule), 'mount /home'
  - fails with -ENOMEM everytime in 2.6.29

  - fails with -ENOMEM when 'nfs' module is not loaded yet in 2.6.30
  - succeeds when 'nfs' module is already loaded in 2.6.30 (e.g. due to module autoloading at the first failed 'mount /home')

  - succeeds everytime in 2.6.27
Comment 15 Chuck Lever 2009-09-08 17:55:00 EDT
(In reply to comment #14)
> it's related to the ipv6 module loading:
> 
> * when ipv6 module loading is allowed, 'mount /home' works both in 2.6.30,
> 2.6.29 and (probably) 2.6.27
> 
> * when ipv6 module loading is prohibited (by 'install ipv6 /bin/true' modprobe
> rule), 'mount /home'
>   - fails with -ENOMEM everytime in 2.6.29
> 
>   - fails with -ENOMEM when 'nfs' module is not loaded yet in 2.6.30
>   - succeeds when 'nfs' module is already loaded in 2.6.30 (e.g. due to module
> autoloading at the first failed 'mount /home')
> 
>   - succeeds everytime in 2.6.27  

Thanks, that's very clear.  Since this is probably a problem upstream as well, I'll take a look.
Comment 16 Chuck Lever 2009-09-08 22:05:16 EDT
I was able to reproduce this behavior on f11's 2.6.30 kernel (see below), but not with 2.6.31-rc8.

Sep  8 19:03:23 matisse kernel: Slow work thread pool: Starting upSep  8 19:03:23 matisse kernel: Slow work thread pool: Ready
Sep  8 19:03:23 matisse kernel: FS-Cache: LoadedSep  8 19:03:23 matisse kernel: FS-Cache: Netfs 'nfs' registered for caching
Sep  8 19:03:23 matisse kernel: RPC:       creating workqueue nfsiod
Sep  8 19:03:23 matisse kernel: NFS: nfs mount opts='actimeo=600,clientaddr=192.168.81.1
29,addr=192.168.0.55'
Sep  8 19:03:23 matisse kernel: NFS:   parsing nfs mount option 'actimeo=600'Sep  8 19:03:23 matisse kernel: NFS:   parsing nfs mount option 'clientaddr=192.168.81.1
29'
Sep  8 19:03:23 matisse kernel: NFS:   parsing nfs mount option 'addr=192.168.0.55'
Sep  8 19:03:23 matisse kernel: NFS: parsing IPv4 address 192.168.0.55Sep  8 19:03:23 matisse kernel: NFS: MNTPATH: '/export/home'
Sep  8 19:03:23 matisse kernel: --> nfs4_create_server()
Sep  8 19:03:23 matisse kernel: --> nfs4_init_server()Sep  8 19:03:23 matisse kernel: --> nfs4_set_client()
Sep  8 19:03:23 matisse kernel: --> nfs_get_client(klimt,v4)
Sep  8 19:03:23 matisse kernel: NFS: Callback listener port = 56500 (af 2)Sep  8 19:03:23 matisse kernel: <-- nfs4_set_client() = xerror -12
Sep  8 19:03:23 matisse kernel: <-- nfs4_init_server() = -12Sep  8 19:03:23 matisse kernel: --> nfs_free_server()
Sep  8 19:03:23 matisse kernel: <-- nfs_free_server()
Sep  8 19:03:23 matisse kernel: <-- nfs4_create_server() = error -12

Since we see the call to nfs4_set_client, but not the call to nfs4_init_client, it's likely that the -ENOMEM is coming from nfs_get_client().  It's probably fixed by commit 18fc3164 in 2.6.31-rc.
Comment 17 Bug Zapper 2010-04-27 10:41:44 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 18 Jeff Layton 2010-04-27 10:59:42 EDT
I'm fairly certain this is fixed in more recent Fedora versions. I'm going to go ahead and close this as resolved. Please reopen if it isn't.

Note You need to log in before you can comment on or make changes to this bug.