Bug 414956 - cryfs vault unresponsive for a long time after mount
Summary: cryfs vault unresponsive for a long time after mount
Status: ASSIGNED
Alias: None
Product: Plasma Vault
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Ivan Čukić
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-08 16:41 UTC by Zvi Baratz
Modified: 2022-06-30 04:17 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zvi Baratz 2019-12-08 16:41:18 UTC
SUMMARY
After mounting the vault I get the following notification:
"Filesystem is not responding: filesystem mounted at '<path>' is not responding."
Trying to access it through dolphin causes dolphin to become completely stuck (terminating doesn't work, not even with `kill -9`). This could be a similar problem to the unresolved bug #409494.  
After a long time the directory becomes accessible but very slow. On one occasion it even caused a complete system freeze that required a hard reboot (very long time with no response, even REISUB failed). 
Trying to unmount the vault during the long period of time (circa 20-30 minutes) that it is unresponsive gives an error in the vaults applet ("device is being used by another application" or something of the sort) and the mount/unmount icon toggles at a very high frequency until it is resolved. 

STEPS TO REPRODUCE
1. Create a vault with the base directory and mount point located in a custom location outside the OS's HD.
2. Copy a large number of files weighing a couple of hundreds of GBs into the vault.
3. Mount vault and try to access. 

OBSERVED RESULT
Dolphin freezes, vault is inaccessible, it is impossible to unmount vault. 

EXPECTED RESULT
Vault is promptly mounted and contained data is accessible. Unmounting is possible on command.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 19.10
(available in About System)
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.62.0
Qt Version: 5.12.4

ADDITIONAL INFORMATION
cryfs encoding scheme. Large number of files (altogether ~400GB, if that could be relevant). Also, the base directory as well as the mount point are not on the main SSD hard-drive on which the OS is installed, but on a separate HDD. 
Using cryfs to access the directory in the terminal works fine.
Comment 1 Ken 2020-05-23 19:40:56 UTC
Exact same issue.  Kubuntu 20.04.  Large cryfs (100GB+) become unresponsive for several minutes after mounting.  Causes dolphin to freeze for long periods.
Comment 2 Ivan Čukić 2020-05-23 21:18:46 UTC
Hi all,

This is something that needs to be reported upstream. It would be great if you have the time to do so and provide the cryfs authors with feedback / more information they might need.
Comment 3 Ken 2020-05-23 22:07:22 UTC
Cryfs is not the issue.  The issue is dolphin and any large ecrypted filesystem.  I get similar behavior with veracrypt volumes mounted using zulucrypt.  Dolphin has consistently takes a dive anytime a new filesystem device is suddenly mounted with hundreds of thousands of files.
Comment 4 Ivan Čukić 2020-05-23 22:14:12 UTC
@Ken

You can open a separate bug report on Dolphin.

Dolphin is not to blame for "Filesystem is not responding" reported by Zvi. There have been reports here of cryfs being blocked even in terminal. So, nothing to  do with Dolphin.
Comment 5 Zvi Baratz 2020-05-24 10:05:54 UTC
@Ivan

I can confirm after switching to Veracrypt I had no problem using Dolphin, so the problem indeed does not seem to be related to it. 
Just to make sure I understood correctly - I should open an issue in cryfs (https://github.com/cryfs/cryfs)?
Comment 6 Ivan Čukić 2020-05-24 12:15:24 UTC
@Zvi

Yes, please :)
Comment 7 Ken 2020-05-24 15:19:06 UTC
(In reply to Ivan Čukić from comment #4)
> @Ken
> 
> You can open a separate bug report on Dolphin.
> 
> Dolphin is not to blame for "Filesystem is not responding" reported by Zvi.
> There have been reports here of cryfs being blocked even in terminal. So,
> nothing to  do with Dolphin.

Looks like you're correct about it not being Dolphin.  Hang issue is still present using Krusader as well. Thank you.
Comment 8 Ivan Čukić 2020-05-24 15:47:49 UTC
@Ken

You should try from the terminal - when dolphin/krusader get blocked, test whether you can open some file in vim or another console editor. If that works, then you might be experiencing an issue that *is* somewhere in KDE (I assume krusader uses the same underlying libraries as dolpgin, though I might be mistaken)
Comment 9 Zvi Baratz 2020-05-24 16:39:28 UTC
Reported in cryfs.

Link for future reference:
https://github.com/cryfs/cryfs/issues/346
Comment 10 Ken 2020-05-26 14:53:59 UTC
(In reply to Ivan Čukić from comment #8)
> @Ken
> 
> You should try from the terminal - when dolphin/krusader get blocked, test
> whether you can open some file in vim or another console editor. If that
> works, then you might be experiencing an issue that *is* somewhere in KDE (I
> assume krusader uses the same underlying libraries as dolpgin, though I
> might be mistaken)

@Ivan - will do.  Thanks for the suggestion.

@Zvi - apologies for muddying the waters on your ticket.
Comment 11 Bharadwaj Raju 2022-06-29 16:06:06 UTC
As the cryfs report notes, this problem can be mitigated by choosing a larger block size by default. Assuming it works, it sounds like a good solution we can implement in KDE. Reopening.