Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ms-nfs41-client errors #1

Open
Speeddymon opened this issue May 28, 2013 · 5 comments
Open

ms-nfs41-client errors #1

Speeddymon opened this issue May 28, 2013 · 5 comments

Comments

@Speeddymon
Copy link

I'm having some troubles with using the ms-nfs41 client for x86_64.

I'm running Windows 7 Ultimate x86_64, and prior to setting up the ms-nfs41 client, I was running the officially provided NFS client which doesn't support NFS4. I wanted to switch because I noticed on my linux server from running nfsstat that the official client only runs NFSv2 in my setup, not NFSv3 or NFSv4.

I've removed the Windows client for NFS already, and followed the instructions in the README.html file to install this one.

I'm not running a domain or user mapping services or even LDAP; I don't have a need for that, as I'm a home user with an in-house media/file server, and security of the file server isn't really important at the moment.

The fileserver itself is running CentOS 6.4 with NFSv4 properly setup (as tested by mounting it from another linux machine and then checking the mount options on that client): vers=4

I'd like to get this setup working on Windows for the performance benefits, so without further ado, here is the debug output from running nfsd_debug.exe and trying to mount the share with nfs_mount.exe:

(see attachment momentarily)

@Speeddymon
Copy link
Author

nfsd_debug output -- See the very bottom also for explanation

C:\Users\Tom\Desktop\ms-nfs41-client-x64>nfsd_debug.exe
parse_cmdlineargs: debug_level 1 ldap is 1
1b6c: getaddrinfo response flags: 0x0
1b6c: Family: AF_INET IPv4 address 192.168.0.2
1b6c: Canonical name: (null)
1b6c: getdomainname: hostname speeddy.localdomain 19
1b6c: getdomainname: domainname localdomain 11
1b6c: NFS41 Daemon starting: version 26782423
1b6c: starting nfs41 mini redirector
1b6c: Parent waiting for children threads
115c: parsing NFS14_MOUNT: srv_name=fileserver root=\storage0 sec_flavor=AUTH_SYS rsize=1048576 wsize=1048576
115c: map_user_to_ids: mapping user Tom
115c: ldap search for '(&(objectClass=user)(cn=Tom))' failed with 81: Server Down
115c: servername is fileserver.localdomain
115c: callback function 000000013F2247E0 args 00000000003B7640
115c: started the callback thread 05bc
0c40: Creating callback thread
115c: COMPOUND failed with status 10021.
115c: nfs41_exchange_id() failed NFS4ERR_MINOR_VERS_MISMATCH
115c: sending shutdown to callback thread 05bc
0c40: callback received shutdown signal
115c: terminated callback thread
115c: nfs41_root_mount_addrs() failed with 58
115c: writing downcall: xid=7 opcode=NFS41_MOUNT status=58 get_last_error=0
1afc: parsing NFS14_MOUNT: srv_name=fileserver root=\storage0 sec_flavor=AUTH_SYS rsize=1048576 wsize=1048576
1afc: map_user_to_ids: mapping user Tom
1afc: ldap search for '(&(objectClass=user)(cn=Tom))' failed with 52: Unavailable
1afc: servername is fileserver.localdomain
1afc: callback function 000000013F2247E0 args 00000000003B7640
1afc: started the callback thread 05cc
0770: Creating callback thread
1afc: COMPOUND failed with status 10021.
1afc: nfs41_exchange_id() failed NFS4ERR_MINOR_VERS_MISMATCH
1afc: sending shutdown to callback thread 05cc
0770: callback received shutdown signal
1afc: terminated callback thread
1afc: nfs41_root_mount_addrs() failed with 58
1afc: writing downcall: xid=8 opcode=NFS41_MOUNT status=58 get_last_error=0
^C
C:\Users\Tom\Desktop\ms-nfs41-client-x64>

Here I tried two connection attempts both using the same command line: nfs_mount.exe N: fileserver:\storage0

The first appears to fail because the server is down. It's not down as I have an active SSH connection to it, but I would venture a guess here that there is some timeout being hit before the server can respond, although the timeout must be less than 1 sec, because the nfs_mount command returns its error immediately.

The second attempt appears to error due to lack of being able to map my Windows user (Tom) with my linux user's uid (reminder that there is no LDAP in play so I expect that to fail). After that, though, it further errors with NFS4ERR_MINOR_VERS_MISMATCH. Not certain whether that is an issue with the CentOS build of NFSv4, or with this client, or both, but I am positive that the server is running NFS v4.1 rather than NFS v4.0:

[speeddy@fileserver ~]$ dmesg |grep -i nfs
RPC: Registered tcp NFSv4.1 backchannel transport module.

~

@Speeddymon
Copy link
Author

nfs_mount.exe output:

C:\Users\Tom\Desktop\ms-nfs41-client-x64>nfs_mount.exe N: fileserver:\storage0
WNetUseConnection(N:, \fileserver\storage0) failed with error code 59.
An unexpected network error occurred.

C:\Users\Tom\Desktop\ms-nfs41-client-x64>

@kofemann
Copy link
Owner

There are command line option to disable ldap and use specified uid and gid. To verify NFSv4.1 setup, try to mount from the server itself with -o vers=4.1 option and check what you see in /proc/mounts

@Speeddymon
Copy link
Author

I see the problem then. It definitely is lacking v4.1 support, sadly. I suspect v4.1 won't appear in RHEL6 or CentOS6 since it hasn't had enough test time according to RedHat. I guess that means no support until RHEL7. :-(

@kofemann
Copy link
Owner

You can try with kernels from http://elrepo.org/linux/kernel/el6/. They are built with v4.1 support.

kofemann pushed a commit that referenced this issue Jul 29, 2024
Fix DrMemory hits in |attr_cache_update()|, which were triggered by
using the request |bitmap4| instead of the response |bitmap4|

DrMemory hits look like this:
---- snip ----
Error #1: UNINITIALIZED READ: reading 8 byte(s)
attr_cache_update                     [ms-nfs41-client\daemon\name_cache.c:323]
nfs41_attr_cache_update               [ms-nfs41-client\daemon\name_cache.c:957]
nfs41_setattr                         [ms-nfs41-client\daemon\nfs41_ops.c:1495]
handle_setexattr                      [ms-nfs41-client\daemon\ea.c:186]
upcall_handle                         [ms-nfs41-client\daemon\upcall.c:220]
nfsd_worker_thread_main               [ms-nfs41-client\daemon\nfs41_daemon.c:188]
nfsd_thread_main                      [ms-nfs41-client\daemon\nfs41_daemon.c:226]
KERNEL32.dll!BaseThreadInitThunk     +0x13     (0x00007ffe78f47374 <KERNEL32.dll+0x17374>)

Error #2: UNINITIALIZED READ: reading 4 byte(s)
attr_cache_update                     [ms-nfs41-client\daemon\name_cache.c:324]
nfs41_attr_cache_update               [ms-nfs41-client\daemon\name_cache.c:957]
nfs41_setattr                         [ms-nfs41-client\daemon\nfs41_ops.c:1495]
handle_setexattr                      [ms-nfs41-client\daemon\ea.c:186]
upcall_handle                         [ms-nfs41-client\daemon\upcall.c:220]
nfsd_worker_thread_main               [ms-nfs41-client\daemon\nfs41_daemon.c:188]
nfsd_thread_main                      [ms-nfs41-client\daemon\nfs41_daemon.c:226]
KERNEL32.dll!BaseThreadInitThunk     +0x13     (0x00007ffe78f47374 <KERNEL32.dll+0x17374>)
---- snip ----

Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
kofemann pushed a commit that referenced this issue Oct 23, 2024
Fix two drmemory hits when processing NFSv4 referrals:
---- snip ----
Error #1: UNINITIALIZED READ: reading 8 byte(s)
 0 path_fh_copy               [ms-nfs41-client\daemon\util.c:468]
 1 server_lookup              [ms-nfs41-client\daemon\lookup.c:259]
 2 server_lookup_loop         [ms-nfs41-client\daemon\lookup.c:360]
 3 nfs41_lookup               [ms-nfs41-client\daemon\lookup.c:512]
 4 lookup_entry               [ms-nfs41-client\daemon\readdir.c:468]
 5 readdir_copy_entry         [ms-nfs41-client\daemon\readdir.c:534]
 6 handle_readdir             [ms-nfs41-client\daemon\readdir.c:800]
 7 upcall_handle              [ms-nfs41-client\daemon\upcall.c:220]
 8 nfsd_worker_thread_main    [ms-nfs41-client\daemon\nfs41_daemon.c:201]
 9 nfsd_thread_main           [ms-nfs41-client\daemon\nfs41_daemon.c:239]
10 KERNEL32.dll!BaseThreadInitThunk +0x13 (0x00007ffadccb7374 <KERNEL32.dll+0x17374>)

Error #2: UNINITIALIZED READ: reading 8 byte(s)
 0 path_fh_copy               [ms-nfs41-client\daemon\util.c:470]
 1 server_lookup              [ms-nfs41-client\daemon\lookup.c:259]
 2 server_lookup_loop         [ms-nfs41-client\daemon\lookup.c:360]
 3 nfs41_lookup               [ms-nfs41-client\daemon\lookup.c:512]
 8 readdir_copy_entry         [ms-nfs41-client\daemon\readdir.c:534]
 9 handle_readdir             [ms-nfs41-client\daemon\readdir.c:800]
10 upcall_handle              [ms-nfs41-client\daemon\upcall.c:220]
11 nfsd_worker_thread_main    [ms-nfs41-client\daemon\nfs41_daemon.c:201]
12 nfsd_thread_main           [ms-nfs41-client\daemon\nfs41_daemon.c:239]
---- snip ----

Reported-by: Cedric Blancher <cedric.blancher@gmail.com>
Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
kofemann pushed a commit that referenced this issue Nov 7, 2024
Fix DrMemory hit in |bitmap_intersect()|, which happened
because arr mask data were accessed beyond the maximum
index specified by |bitmap4.count|.

Example:
---- snip ----
Error #1: UNINITIALIZED READ: reading 4 byte(s)
0 bitmap_intersect                   [ms-nfs41-client\daemon\util.h:123]
1 nfs41_superblock_supported_attrs   [ms-nfs41-client\daemon\nfs41.h:491]
2 nfs41_open                         [ms-nfs41-client\daemon\nfs41_ops.c:535]
3 do_open                            [ms-nfs41-client\daemon\open.c:311]
4 open_or_delegate                   [ms-nfs41-client\daemon\open.c:352]
5 handle_open                        [ms-nfs41-client\daemon\open.c:972]
6 upcall_handle                      [ms-nfs41-client\daemon\upcall.c:220]
7 nfsd_worker_thread_main            [ms-nfs41-client\daemon\nfs41_daemon.c:201]
8 nfsd_thread_main                   [ms-nfs41-client\daemon\nfs41_daemon.c:239]
9 KERNEL32.dll!BaseThreadInitThunk  +0x13     (0x00007ffbfeca7374 <KERNEL32.dll+0x17374>)
---- snip ----

Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants