FreeBSD 6.0 TCP NFS client stuck

From: TOMITA Yoshinori <yoshint_at_flab.fujitsu.co.jp>
Date: Tue, 08 Nov 2005 09:55:01 +0900
I saw a NFS client of FreeBSD 6.0-RC1 gets NFS stuck using TCP NFS and
amd -w LARGE_NUMBER, where -w specifies dismount interval such as
3600.

6.0-STABLE cvsuped 2005-11-7 has same problem.
It has always been OK on FreeBSD 4.X to 5.4-STABLE.

FreeBSD 6.0 NFS client seems keep trying NFS access forever after NFS
TCP connection is (half?) closed.

I am not sure amd and -w argument are the key of this problem, but they
raise probability from my experience.



NFS Server:
	Solaris 2.6

NFS Client:
	FreeBSD 6.0-RC1 (cvsuped 2005-11-02)

Starting amd at FreeBSD:
	/usr/sbin/amd -p -w 3600 -a /.amd_mnt -l syslog /host /etc/amd.map /net /etc/amd.map

/etc/amd.map:
        # changed proto=udp to proto=tcp
------
/defaults       type:=host;fs:=${autodir}/${rhost}/host;rhost:=${key}
*               opts:=rw,grpid,resvport,vers=3,proto=tcp,nosuid,nodev
------



tcpdump log:
--------------------------------------------------

[several minutes passed after NFS auto-mounted]

11:09:38.852928 IP CLIENT.3254779904 > SERVER.nfs: 40 null
11:09:38.853261 IP SERVER.nfs > CLIENT.3254779904: reply ok 24 null
11:10:08.851290 IP CLIENT.3523215360 > SERVER.nfs: 40 null
11:10:08.851529 IP SERVER.nfs > CLIENT.3523215360: reply ok 24 null

[FIN from NFS server, FreeBSD NFS client sends ACK]

11:10:08.854469 IP SERVER.nfsd > CLIENT.820: F 341:341(0) ack 200 win 10136 <nop,nop,timestamp 787046144 183809>
11:10:08.854555 IP CLIENT.820 > SERVER.nfsd: . ack 342 win 65535 <nop,nop,timestamp 543746 787046144>
11:10:08.864321 IP SERVER.nfsd > CLIENT.679: F 341:341(0) ack 200 win 10136 <nop,nop,timestamp 787046145 183817>
11:10:08.864383 IP CLIENT.679 > SERVER.nfsd: . ack 342 win 65535 <nop,nop,timestamp 543756 787046145>
11:10:08.895133 IP SERVER.nfsd > CLIENT.735: F 40141:40141(0) ack 1900 win 10136 <nop,nop,timestamp 787046148 183839>
11:10:08.895203 IP CLIENT.735 > SERVER.nfsd: . ack 40142 win 65535 <nop,nop,timestamp 543787 787046148>

[still NFS NULL continues from FreeBSD NFS client]

11:10:38.849614 IP CLIENT.3791650816 > SERVER.nfs: 40 null
11:10:38.849906 IP SERVER.nfs > CLIENT.3791650816: reply ok 24 null
11:11:08.847947 IP CLIENT.4060086272 > SERVER.nfs: 40 null
11:11:08.848289 IP SERVER.nfs > CLIENT.4060086272: reply ok 24 null
11:11:38.846275 IP CLIENT.33619968 > SERVER.nfs: 40 null
11:11:38.846555 IP SERVER.nfs > CLIENT.33619968: reply ok 24 null

[do some NFS access, such as /bin/ls /host/SERVER/SOMEWHERE on FreeBSD]

11:12:08.413414 IP CLIENT.302055424 > SERVER.nfs: 40 null
11:12:08.413797 IP SERVER.nfs > CLIENT.302055424: reply ok 24 null
11:12:08.414096 IP CLIENT.1563723127 > SERVER.nfs: 132 access [|nfs]
11:12:08.507632 IP SERVER.nfsd > CLIENT.735: . ack 2032 win 10136 <nop,nop,timestamp 787058109 663316>
11:12:10.083443 IP CLIENT.1563723127 > SERVER.nfs: 132 access [|nfs]
11:12:10.177666 IP SERVER.nfsd > CLIENT.735: . ack 2164 win 10136 <nop,nop,timestamp 787058276 664986>
11:12:11.743299 IP CLIENT.1563723127 > SERVER.nfs: 132 access [|nfs]
11:12:11.837696 IP SERVER.nfsd > CLIENT.735: . ack 2296 win 10136 <nop,nop,timestamp 787058442 666646>
11:12:15.063018 IP CLIENT.1563723127 > SERVER.nfs: 132 access [|nfs]
11:12:15.157790 IP SERVER.nfsd > CLIENT.735: . ack 2428 win 10136 <nop,nop,timestamp 787058774 669966>
11:12:21.702417 IP CLIENT.1563723127 > SERVER.nfs: 132 access [|nfs]
11:12:21.798028 IP SERVER.nfsd > CLIENT.735: . ack 2560 win 10136 <nop,nop,timestamp 787059438 676606>
11:12:34.981251 IP CLIENT.1563723127 > SERVER.nfs: 132 access [|nfs]
11:12:35.078429 IP SERVER.nfsd > CLIENT.735: . ack 2692 win 10136 <nop,nop,timestamp 787060766 689886>
11:12:38.411967 IP CLIENT.570490880 > SERVER.nfs: 40 null
11:12:38.412267 IP SERVER.nfs > CLIENT.570490880: reply ok 24 null
11:13:01.538891 IP CLIENT.1563723127 > SERVER.nfs: 132 access [|nfs]

[----> message repeats on FreeBSD NFS client]
     nfs server SERVER:/export/home: not responding

--------------------------------------------------

[netstat _at_ Solaris NFS server, when NFS is OK]

SERVER.nfsd        CLIENT.820          131070      0 10136      0 ESTABLISHED
SERVER.nfsd        CLIENT.735          131070      0 10136      0 ESTABLISHED
SERVER.nfsd        CLIENT.679          131070      0 10136      0 ESTABLISHED

[after NFS stuck]

SERVER.nfsd        CLIENT.820          131070      0 10136      0 FIN_WAIT_2
SERVER.nfsd        CLIENT.735          131070      0 10136      0 FIN_WAIT_2
SERVER.nfsd        CLIENT.679          131070      0 10136      0 FIN_WAIT_2

[netstat _at_ FreeBSD NFS client, after NFS stuck]

tcp4       0      0  CLIENT.679            SERVER.nfsd  CLOSE_WAIT
tcp4       0      0  CLIENT.735            SERVER.nfsd  CLOSE_WAIT
tcp4       0      0  CLIENT.820            SERVER.nfsd  CLOSE_WAIT


-- 
---
TOMITA Yoshinori
(Fujitsu Laboratories Ltd., Kawasaki, Japan)
Received on Mon Nov 07 2005 - 23:55:09 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:47 UTC