sahlberg / fuse-nfs

A FUSE module for NFSv3/4
GNU General Public License v3.0
172 stars 41 forks source link

data write issue with v4 mounts in latest fuse-nfs #29

Open julian-hj opened 6 years ago

julian-hj commented 6 years ago

I can consistently reproduce this issue manually and in our test automation. Seems like there is some problem in the v4 code path, particularly having to do with data writes:

root@8cb85777-ed10-4e6a-5e5f-651c612dade9:/tmp/build/5bbc57d5# fuse-nfs -a -n "nfs://testnfsserver.gorgophone.cf-app.com/export2/certs?gid=2000&uid=2000&version=4" -m /tmp/volumes/nfs-volume-name --multithread=1
root@8cb85777-ed10-4e6a-5e5f-651c612dade9:/tmp/build/5bbc57d5# 
root@8cb85777-ed10-4e6a-5e5f-651c612dade9:/tmp/build/5bbc57d5# touch /tmp/volumes/nfs-volume-name/grak
root@8cb85777-ed10-4e6a-5e5f-651c612dade9:/tmp/build/5bbc57d5# echo "food" > !$
echo "food" > /tmp/volumes/nfs-volume-name/grak
bash: echo: write error: Numerical result out of range
julian-hj commented 6 years ago

FWIW, id mapping and multithread don't appear to change the behavior. I also get the same behavior without those parameters:

root@8cb85777-ed10-4e6a-5e5f-651c612dade9:/tmp/build/5bbc57d5# fuse-nfs -a -n "nfs://testnfsserver.gorgophone.cf-app.com/export2/certs?version=4" -m /tmp/volumes/nfs-volume-name
root@8cb85777-ed10-4e6a-5e5f-651c612dade9:/tmp/build/5bbc57d5# touch /tmp/volumes/nfs-volume-name/grak3
root@8cb85777-ed10-4e6a-5e5f-651c612dade9:/tmp/build/5bbc57d5# echo "food" > /tmp/volumes/nfs-volume-name/grak3
bash: echo: write error: Numerical result out of range
julian-hj commented 6 years ago

the nfs3 version still works fine:

root@8cb85777-ed10-4e6a-5e5f-651c612dade9:/tmp/build/5bbc57d5# fuse-nfs -a -n "nfs://testnfsserver.gorgophone.cf-app.com/export2/certs" -m /tmp/volumes/nfs-volume-name
root@8cb85777-ed10-4e6a-5e5f-651c612dade9:/tmp/build/5bbc57d5# touch /tmp/volumes/nfs-volume-name/grak4
root@8cb85777-ed10-4e6a-5e5f-651c612dade9:/tmp/build/5bbc57d5# echo "food" > /tmp/volumes/nfs-volume-name/grak4
root@8cb85777-ed10-4e6a-5e5f-651c612dade9:/tmp/build/5bbc57d5# echo "food" >> /tmp/volumes/nfs-volume-name/grak4
root@8cb85777-ed10-4e6a-5e5f-651c612dade9:/tmp/build/5bbc57d5# echo "food" >> /tmp/volumes/nfs-volume-name/grak4
root@8cb85777-ed10-4e6a-5e5f-651c612dade9:/tmp/build/5bbc57d5# cat !$
cat /tmp/volumes/nfs-volume-name/grak4
food
food
food