-
Notifications
You must be signed in to change notification settings - Fork 269
CIFS throws EINTR and ENOENT errors #483
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
Comments
Interesting. I can reproduce this. smb server ------ network --------> cifs mount -> gocryptfs reverse mount
|
Looks like Go bug golang/go#38836 |
Do you think the bug fix would soon make it to Gocryptfs ? I so would like to try this method personally. |
Yes I merged the fix yesterday as 25f1727 . You can test by following the (short) instructions at https://github.com/rfjakob/gocryptfs#compile |
Hi Thanks for the fix, that seems to fix one issue but here I am having another problem around this. Please take notice of how file listing numbers are random for the given folder. There is a hit and miss there. If you think you want to try it maybe try it with a folder with large number of files The folder originally has 1197 files, and I can get that steady number on the Samba server itself, and also on the mounting side if I query the actual share but not the reverse mode version
Not sure if this is the same bug. I can open another one if you want. |
Well, that's no good. |
But I cannot reproduce this here
|
Got one:
|
Small tool to try to debug unix.Getdents problems on CIFS mounts #483
Wow, looks like a kernel bug. Related: golang/go#24015 |
On CIFS mounts, unix.Getdents can return sudden ENOENT in the middle of data. This will not be reported as an error by user space tools, so return EIO instead. Also log it as a warning. #483
Thanks for investigating, sounds really messed up. |
Another way to repro the problem in #483
This was an attempt to make the C code more similar to Go (which also reads from multiple threads). However, I still could not repro the ENOENT problems. #483
This was an attempt to make the C code more similar to Go (which also reads from multiple threads). However, I still could not repro the ENOENT problems. #483
I might be getting similar errors :-( CIFS, Getting "Interrupted system call" on trying to rsync or copy things onto the gocryptfs mounted on a cifs share:
I also get errors on rm: Sometimes get errors in journalctl, but not always:
doing it repeatedly sometimes fails at the same files but then suceeds. Copying/rsync from cifs -> cifs without gocryptfs works without any errors. |
Can confirm with latest gocryptfs / Go version:
|
As a workaround, I just use it on sshfs, which works perfectly fine. |
SSHfs has been my solution as well. |
For future reference:
|
Retry operations that have been shown to throw EINTR errors on CIFS. Todo: Solution for this pain in the back: warning: unix.Getdents returned errno 2 in the middle of data rm: cannot remove 'linux-3.0.old3/Documentation/ABI/removed': Input/output error Progress towards fixing #483 .
@NerdyProjects I just merged a fix into the gofuse_v2api branch (the current development branch). if you can try it, you'd just need to run
in the git repo. |
So the fix seems to work, I still see a lot of cifs errors in the kernel log which I don't see without gocryptfs...
|
Yes I also see those, I'm not completely sure what is going on, but it seems like the kernel cifs driver and the Go multithreading don't like each other. But,
and those errors are retried. |
One more thing I noticed when testing: When the mountpoint is on cifs, gocryptfs sometimes gets unmounted suddenly. For gocryptfs it looks like a regular unmount request. I'm not sure what is going on here, but I made an audit rule for the Anyway, the workaround is to mount on /tmp or /run/user , which stops the sudden unmounts. |
Hi, is this still related to |
Maybe, in the sense that the Go runtime sends
|
Give a user receiving the Getdents warning some background info.
The mentioned gofuse_v2api branch including the fix has been released as gocryptfs v2.0 in 2021 - https://github.com/rfjakob/gocryptfs#v20-2021-06-05 |
Uh oh!
There was an error while loading. Please reload this page.
Hi
Maybe I am pushing the limits here but this is what I am doing. Basically I am using symlinks in a Samba folder where Samba allows following symlinks, so the mounting side thinks those are regular file system files and folders
I am doing this method because I can rsync the reversed mode folder over Ssh with much faster speeds compared to mounting remote folders.
Create a folder (/media/SharePlain) on PC-A
Add some symlinks to thios folder
Enable symlinks following in the Samba share settings
On another networked pc PC-B , mount this share (/mnt/SharePlain).
On PC-B use reverse mode to get the ecrypted version of the Samba share using
gocryptfs -reverse /mnt/SharePlain /mnt/ShareCipher
This seems to work but I get the error below, and not sure if this is a serious unstable situation or not. I definetely would want to use this is it will cause file corruption.
I also get another error
another rsync complaint
The text was updated successfully, but these errors were encountered: