Bug 1415024 - [uninitialized struct] get wrong nfs version when doing nfs mount
Summary: [uninitialized struct] get wrong nfs version when doing nfs mount
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nfs-utils
Version: 7.4
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: JianHong Yin
URL:
Whiteboard:
: 1413828 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-20 01:21 UTC by JianHong Yin
Modified: 2017-08-01 19:48 UTC (History)
4 users (show)

Fixed In Version: nfs-utils-1.3.0-0.36.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 19:48:51 UTC
Target Upstream Version:


Attachments (Terms of Use)
patch (1.02 KB, patch)
2017-01-22 06:10 UTC, JianHong Yin
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1413828 'high' 'CLOSED' '[ppc64le] Failed to mount nfs as cannot negotiate lower nfs version 3 with server' 2019-11-12 06:14:09 UTC
Red Hat Product Errata RHBA-2017:2233 normal SHIPPED_LIVE nfs-utils bug fix and enhancement update 2017-08-01 18:19:33 UTC

Internal Links: 1413828

Description JianHong Yin 2017-01-20 01:21:02 UTC
Description of problem:

[01:35:50 root@ ~~]# timeLimitRun 300 mount -vvv 127.0.0.1://export /test10975
mount.nfs: mount(2): Connection refused
mount.nfs: portmap query retrying: RPC: Program not registered
mount.nfs: trying 127.0.0.1 prog 100003 vers 3459259728 prot UDP port 2049
                                             ^^^^^^---??

mount.nfs: portmap query failed: RPC: Program/version mismatch
mount.nfs: Protocol not supported
mount.nfs: timeout set for Thu Jan 19 01:37:50 2017
mount.nfs: trying text-based options 'vers=4.2,addr=127.0.0.1,clientaddr=127.0.0.1'
mount.nfs: trying text-based options 'addr=127.0.0.1'
mount.nfs: prog 100003, trying vers=187650580421968, prot=6
mount.nfs: prog 100003, trying vers=187650580421968, prot=17
                                      ^^^^^^---??

Version-Release number of selected component (if applicable):
------------------------------------------------
Time & CURDIR : [2017-01-19 01:35:46 @/mnt/tests/nfs-utils/function/nfs-mount-negotiation]
Case Name     : /nfs-utils/function/nfs-mount-negotiation
$HOSTNAME     : hp-moonshot-03-c11.lab.eng.rdu.redhat.com
Distro Info   : RedHatEnterpriseServer 7.4 : Pegas-7.4-20170118.n.0
NVR & host    : Linux hp-moonshot-03-c11.lab.eng.rdu.redhat.com 4.9.0-5.el7.aarch64 #1 SMP Tue Jan 17 18:20:02 EST 2017 aarch64 aarch64 aarch64 GNU/Linux
cmdline       :
	BOOT_IMAGE=/vmlinuz-4.9.0-5.el7.aarch64 root=/dev/mapper/rhelp_hp--moonshot--03--c11-root ro crashkernel=auto rd.lvm.lv=rhelp_hp-moonshot-03-c11/root rd.lvm.lv=rhelp_hp-moonshot-03-c11/swap console=ttyS0,9600n81
Package Info  :
	libnfsidmap-0.25-15.el7.aarch64
	libtirpc-0.2.4-0.8.el7.aarch64
	nfs-utils-1.3.0-0.35.el7.aarch64
	rpcbind-0.2.0-38.el7.aarch64

How reproducible:
1:1

Steps to Reproduce:
[01:35:47 root@ ~~]# mkdir -p /test10975 /export
--------------------------------------------------------------------------------
[01:35:47 root@ ~~]# echo "/$expDir *(rw,no_root_squash)" >/etc/exports
--------------------------------------------------------------------------------
[01:35:47 root@ ~~]# echo "RPCNFSDARGS=\"-N 4 --no-tcp\"" >/etc/sysconfig/nfs
--------------------------------------------------------------------------------
[01:35:48 root@ ~~]# echo "RPCMOUNTDOPTS=\"--no-tcp\"" >>/etc/sysconfig/nfs
--------------------------------------------------------------------------------
[01:35:48 root@ ~~]# service nfs restart
--------------------------------------------------------------------------------
[01:35:50 root@ ~~]# timeLimitRun 300 mount -vvv 127.0.0.1://export /test10975

Actual results:
[01:35:50 root@ ~~]# timeLimitRun 300 mount -vvv 127.0.0.1://export /test10975
mount.nfs: mount(2): Connection refused
mount.nfs: portmap query retrying: RPC: Program not registered
mount.nfs: trying 127.0.0.1 prog 100003 vers 3459259728 prot UDP port 2049
mount.nfs: portmap query failed: RPC: Program/version mismatch
mount.nfs: Protocol not supported
mount.nfs: timeout set for Thu Jan 19 01:37:50 2017
mount.nfs: trying text-based options 'vers=4.2,addr=127.0.0.1,clientaddr=127.0.0.1'
mount.nfs: trying text-based options 'addr=127.0.0.1'
mount.nfs: prog 100003, trying vers=187650580421968, prot=6
mount.nfs: prog 100003, trying vers=187650580421968, prot=17
:: [   FAIL   ] :: Running 'timeLimitRun 300 mount -vvv 127.0.0.1://export /test10975' (Expected 0, got 32)

Expected results:
The version in the output log should not be '3459259728' and '187650580421968'

Additional info:
  bkr job: https://beaker.engineering.redhat.com/jobs/1679011

Comment 6 JianHong Yin 2017-01-22 06:10:39 UTC
Created attachment 1243287 [details]
patch

attach the patch

Comment 7 Steve Dickson 2017-02-01 18:21:50 UTC
(In reply to Yin.JianHong from comment #6)
> Created attachment 1243287 [details]
> patch
> 
> attach the patch

Did this patch go upstream?? Am I missing something

Comment 8 Eryu Guan 2017-02-02 07:38:54 UTC
AFAIK, the patch was posted to upstream nfs list, no review/comments yet.

https://patchwork.kernel.org/patch/9530783/

Comment 9 Steve Dickson 2017-02-02 11:23:52 UTC
(In reply to Eryu Guan from comment #8)
> AFAIK, the patch was posted to upstream nfs list, no review/comments yet.
> 
> https://patchwork.kernel.org/patch/9530783/
I see it... thanks!

commit 0712b5507866d6b3c900623eb1f81fffaec80ae2
Author: Jianhong Yin <yin-jianhong@163.com>
Date:   Thu Feb 2 06:21:15 2017 -0500

    mount: fix mount fail that caused by uninitialized struct

Comment 10 JianHong Yin 2017-02-10 10:08:31 UTC
*** Bug 1413828 has been marked as a duplicate of this bug. ***

Comment 12 JianHong Yin 2017-06-02 08:55:48 UTC
Verified:

[root@ibm-p8-kvm-01-guest-09 ~]# mkdir -p /test10975 /export
[root@ibm-p8-kvm-01-guest-09 ~]# echo "/export *(rw,no_root_squash)" >/etc/exports
[root@ibm-p8-kvm-01-guest-09 ~]# echo "RPCNFSDARGS=\"-N 4 --no-tcp\"" >/etc/sysconfig/nfs
[root@ibm-p8-kvm-01-guest-09 ~]# echo "RPCMOUNTDOPTS=\"--no-tcp\"" >>/etc/sysconfig/nfs
[root@ibm-p8-kvm-01-guest-09 ~]# service nfs restart
Redirecting to /bin/systemctl restart nfs.service
[root@ibm-p8-kvm-01-guest-09 ~]# cat /proc/fs/nfsd/versions 
-2 +3 -4 -4.1 -4.2
[root@ibm-p8-kvm-01-guest-09 ~]# mount -vvv 127.0.0.1://export /test10975
mount.nfs: timeout set for Fri Jun  2 10:56:18 2017
mount.nfs: trying text-based options 'vers=4.1,addr=127.0.0.1,clientaddr=127.0.0.1'
mount.nfs: mount(2): Connection refused
mount.nfs: trying text-based options 'addr=127.0.0.1'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query retrying: RPC: Program not registered
mount.nfs: prog 100003, trying vers=3, prot=17
mount.nfs: trying 127.0.0.1 prog 100003 vers 3 prot UDP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 127.0.0.1 prog 100005 vers 3 prot UDP port 20048
[root@ibm-p8-kvm-01-guest-09 ~]# uname -r
3.10.0-675.el7.ppc64le
[root@ibm-p8-kvm-01-guest-09 ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.43.el7.ppc64le
[root@ibm-p8-kvm-01-guest-09 ~]#

Comment 13 errata-xmlrpc 2017-08-01 19:48:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2233


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