Open cccapon opened 5 years ago
The cause is within the underlying file system implementation:
java.io.IOException: Incorrect function
at java.base/sun.nio.ch.FileDispatcherImpl.pread0(Native Method)
at java.base/sun.nio.ch.FileDispatcherImpl.pread(Unknown Source)
at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at java.base/sun.nio.ch.IOUtil.read(Unknown Source)
at java.base/sun.nio.ch.FileChannelImpl.readInternal(Unknown Source)
at java.base/sun.nio.ch.FileChannelImpl.read(Unknown Source)
I.e. Google File Stream doesn't seem to behave as defined. Seems to be an upstream bug, as there is no Cryptomator code involved here.
When you google for "incorrect function" in conjuction with IO errors, you find plenty of reports such as this post in the evernote forum or this comment in another GitHub project.
Since the root cause is within the basic I/O operations (FileChannel.read), this issue is not related to Dokany in any way. You should get the same issue with WebDAV-based drives.
At the moment we can only wait for a fix from either Google (if it is indeed an I/O bug in file stream) or the JDK (if it can be solved by a more resilient implementation on unreliable file systems).
Thank you, @overheadhunter . But, I wonder if Cryptomator's handling of a read error situation on Dokany could be improved.
Right now, the entire vault is placed in a failed state and no further file access is successful. The only solution currently known is to close then reopen the vault. But Cryptomator was designed specifically for use with these types of cloud access interfaces, and perhaps should handle failures more gracefully.
Though I have experienced occasional read errors with WebDAV, they do not seem to shut down the vault altogether as they do with Dokany. Thanks, Chris.
Good point, I'll migrate this issue to the dokany-nio-adapter then.
Cryptomator 1.4.2 OS: Windows 10 64-bit build 17134.623 Vault access: Dokany Vault location: Google Drive File Stream v29.1.78.2103
When running Cryptomator using Dokany and when decrypting a large number of files, cryptomator fails then closes the Dokany session. All further access fails until the vault is manually closed and reopened. This failure occurs on different files at different offsets seemingly at random. It occurs more frequently when more than one vault is open. The vaults are being accessed through Google Drive File Stream and the problem seems to correlate with the load on the internet connection.