Hi Andrey > Hello *, > creating a file in the directory exported by the NFS server > sometimes returns an error - "resource temporarily unavailable", > when a client on importing computer is keeping reading that file. > > serv:~# cat /etc/exports > /home/me/data-t cli(ro,sync,no_subtree_check) > > serv:~# systemctl restart nfs-kernel-server > > cli:~# cat /etc/fstab > ... > mhfpklytsserv:/home/me/data-t /home/me/dt nfs noauto,ro,noac,user 0 0 > > me@cli:~$ mount dt > me@cli:~$ mount > ... > serv:/home/me/data-t on /home/me/dt type nfs4 > (ro,nosuid,nodev,noexec,relatime,sync,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0,hard,noac,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.209.174,local_lock=none,addr=192.168.238.113,user=me) > > It could be provoked in a few minutes by running on the server serv:~$ while > : ; do date > data-t/now.txt; sleep 1; done > > > while on the client computer > me@cli:~$ while : ; do cat dt/now.txt; sleep 1; done > > After a while (it's unpredictable might take up 10 minutes or a few seconds, > but in average about 2 minutes) > on the server I get: > data-t/now.txt: Resource temporarily unavailable > > Lesser 'sleep', of 0.2 for ex., doesn't necessarily make the error appear > quicker. > Also it doesn't depend whether a directory is exported read-only or > read-write. > But without reading client the error never appears. > > To narrow down the case a bit I made a test on 'C' for the server > which does the same thing as the script above - just writing down a date in > the same file > - but checking an error on creating a file and writing to it. > > Sometimes error appears just in a few seconds: > serv:~$ date;./tnfs-open data-t/now.txt ;date > Mon Aug 1 18:58:23 CEST 2016 > open fd=-1 errno=11 -> Resource temporarily unavailable > Mon Aug 1 18:58:25 CEST 2016 > > serv:~$ errno 11 > EAGAIN 11 Resource temporarily unavailable > > I am at a loss :( > > my system on the server and the client computes is the same Debian 8.5
Were you ever able to narrow down the issue? I'm able to reproduce the issue easily as well just on localhost doing the following on a Debian 8, running 3.16.43-2+deb8u5 or 3.16.48-1, but the issue seems disapeared (or at least harder to reproduce in 4.9, when installed from jessie-backports): Sort of "minimal" reproducing steps: # apt-get install nfs-kernel-server # mkdir -p /srv/test # echo '/srv/test *' >> /etc/exports # systemctl restart nfs-kernel-server.service # mount localhost:/srv/test /mnt 1. terminal # while : ; do date >/srv/test/foo ; sleep 1 ; done 2. terminal # while : ; do cat /mnt/foo ; sleep 1 ; done I'm currently trying to bisect the issue. But since in the good cases it's not clear if it's always fixed I can only guess at the moment that the 4.9 claim is true. Were you sucessful on isolating the issue? Regards, Salvatore