Bug 504602 - mount(2) for an NFS4 returns with -ENOMEM if ipv6 module is not loaded
Summary: mount(2) for an NFS4 returns with -ENOMEM if ipv6 module is not loaded
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jeff Layton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 510083 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-08 13:20 UTC by Harald Hoyer
Modified: 2014-06-18 07:38 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-04-27 14:59:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Harald Hoyer 2009-06-08 13:20:21 UTC
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 17:36:22 UTC
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 17:41:33 UTC
(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-03 03:13:02 UTC
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 19:11:36 UTC
*** Bug 510083 has been marked as a duplicate of this bug. ***

Comment 5 Matt Bernstein 2009-07-10 11:09:39 UTC
(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 15:10:36 UTC
(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 20:36:11 UTC
(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 16:50:30 UTC
Sounds like we should close this one.

Please reopen if it's still a problem.

Comment 9 Enrico Scholz 2009-09-01 18:19:35 UTC
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 20:06:07 UTC
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 22:15:03 UTC
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 18:36:51 UTC
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 20:39:41 UTC
(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 21:49:02 UTC
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 21:55:00 UTC
(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-09 02:05:16 UTC
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 14:41:44 UTC
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 14:59:42 UTC
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.