Bug 412832 - "Unable to perform the operation (error code 9)" when there is not enough memory
Summary: "Unable to perform the operation (error code 9)" when there is not enough memory
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Vaults widget (show other bugs)
Version: 6.0.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Ivan Čukić
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2019-10-10 23:18 UTC by Prem Kumar
Modified: 2024-12-17 22:14 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Prem Kumar 2019-10-10 23:18:42 UTC
SUMMARY
Vault creation fails on Arch Linux with message "Unable to perform the operation (error code 9).". I cannot find anywhere what error code 9 means.

STEPS TO REPRODUCE
1. Create new vault using CryFS as backend

OBSERVED RESULT
Vault creation failed with error code 9

EXPECTED RESULT
Vault should be created successfully

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.62.0
Qt Version: 5.13.1
CryFS Version: 0.10.2

ADDITIONAL INFORMATION

respecitve folders in ~/Vaults and ~/.local/share/plasma-vault/ are created but are empty
Comment 1 Ivan Čukić 2020-03-17 13:26:22 UTC
Sadly, that error code is not covered by https://github.com/cryfs/cryfs/blob/develop/src/cryfs/impl/ErrorCodes.h

I'l mark this as upstream as there is not much I can do here.

Can you try to mount the vault manually with

cryfs ~/.local/share/plasma-vault/VaultDir ~/Vaults/VaultDir

and post the output?
Comment 2 kde 2021-01-30 18:35:47 UTC
I had this same set of symptoms (error 9, directories created) and noticed that the CryFS process was getting OOM Killed — so this error suggests you don't have much free memory on your system, and CryFS was running out of memory part way through.

For me, I was roughly a gig below the system limit and it still happened.

Plasma Vault maybe could benefit by showing a clearer error message in this case?
Comment 3 kde 2021-01-30 18:38:48 UTC
I should also note that subsequent resolution of the problem (by closing down memory hogs and trying again) led to error code 20 until I changed the name of the vault, so it appears that the vault is partially created and this blocks recreation (believe I read somewhere that errcode 20 corresponds to it already being in use, but not sure).
Comment 4 Riccardo Robecchi 2022-02-21 18:55:57 UTC
(In reply to kde from comment #2)
> I had this same set of symptoms (error 9, directories created) and noticed
> that the CryFS process was getting OOM Killed — so this error suggests you
> don't have much free memory on your system, and CryFS was running out of
> memory part way through.
> 
> For me, I was roughly a gig below the system limit and it still happened.
> 
> Plasma Vault maybe could benefit by showing a clearer error message in this
> case?

I ran into the same message while trying to open a vault. I had ~3 GiB of free RAM and I was only able to open the vault after I had ~4.5 GiB free our of 16 GiB, which is way too much for such a feature.
The message should be clearer and I think it would be good to reduce the memory impact as it is way too large at the moment. I'm marking this bug as "confirmed" and changing the title.