# NFS hangs deadlock



## ThePanaceya (Jul 21, 2016)

Hello guys!

Need your help with strange situation with FreeBSD + ZFS + NFS stack.
Sometimes nfs daemon hangs with deadlock ('D' state) and there is no ways to back it to life, except of server restart:

`ps aux | grep nfs`


```
root  723  0.0  0.0  12752  0  -  IWs  -  0:00.00 nfsuserd: master (nfsuserd)
root  724  0.0  0.0  12752  1852  -  I  9:58PM  4:25.32 nfsuserd: slave (nfsuserd)
root  725  0.0  0.0  12752  1852  -  I  9:58PM  4:21.40 nfsuserd: slave (nfsuserd)
root  726  0.0  0.0  12752  1880  -  I  9:58PM  4:26.52 nfsuserd: slave (nfsuserd)
root  727  0.0  0.0  12752  1852  -  I  9:58PM  4:26.04 nfsuserd: slave (nfsuserd)
root  764  0.0  0.0  16464  1640  -  Ss  9:58PM  0:00.03 nfsd: master (nfsd)
root  772  0.0  0.0  12368  2544  -  D  9:58PM  283:50.43 nfsd: server (nfsd)
root  25133  0.0  0.0  18832  2336  0  S+  12:41PM  0:00.00 grep nfs
```

My rc.conf:

```
nfs_server_enable="YES"
nfsv4_server_enable="YES"
nfs_server_flags="-u -t -n 64 -e "
nfsuserd_enable="YES"
nfsuserd_flags="-domain domain.com"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"
```


There is no way to predict, at what point the server hangs again. No relationship with the load on the disk subsystem is not revealed. Also we doesn't see any problems at any NFS clients.
Hardware is HP DL380 Gen9 with HP Smart Array P440ar with latest installed available driver.

FreeBSD with FreeBSD 10.3-RELEASE-p4 generic kernel. NFS clients is various versions of CentOS.

Maybe you can help us to find problem reason?


----------

