keepassxc icon indicating copy to clipboard operation
keepassxc copied to clipboard

App can freeze on lock if file is missing (SMB Share, etc)

Open speedlimiter opened this issue 11 months ago • 8 comments

Have you searched for an existing issue?

  • [x] Yes, I tried searching and reviewed the pinned issues

Brief Summary

Using Arch Linux with Hyprland as WM, Nautilus for file management. Having my KDBX on a SMB-share and mounting it through Nautilus it's accessible in /run/user/1000/gvfs/smb-share:server=host.local,share=share. When opening it with KeePassXC (database not locked or closed) and putting system in suspend, freezes the whole system with the screen staying active.

If i lock or close database before suspend, system goes to sleep normally. Also copying the database locally resolves the issue.

KeePassXC - Version 2.7.10 Revision: b342be4

Qt 5.15.16 Debugging mode is disabled.

Operating system: Arch Linux CPU architecture: x86_64 Kernel: linux 6.13.6-arch1-1

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • Passkeys
  • SSH Agent
  • KeeShare
  • YubiKey
  • Secret Service Integration

Cryptographic libraries:

  • Botan 3.7.1

Steps to Reproduce

  1. Open Nautilus window
  2. Choose "Network" and connect to a SMB-share (smb://host.local/share)
  3. Start KeePassXC
  4. Open database that resides on the SMB-share, mounted in /run/user/1000/gvfs/smb-share:server=host.local,share=share
  5. Suspend system through Hyprlands wlogout which uses systemctl suspend as command for the suspend action

Expected Versus Actual Behavior

system suspends normally

KeePassXC Debug Information


Operating System

Linux

Linux Desktop Environment

Other

Linux Windowing System

Wayland

speedlimiter avatar Mar 12 '25 19:03 speedlimiter

Do you have pending changes that need to be saved when this happens?

droidmonkey avatar Mar 14 '25 04:03 droidmonkey

Do you have pending changes that need to be saved when this happens?

No, just having a database open, triggers this behavior reproducible.

speedlimiter avatar Mar 14 '25 04:03 speedlimiter

Hm, that is very odd since we don't keep a hold on a file.

droidmonkey avatar Mar 14 '25 10:03 droidmonkey

I'm having a similar issue on a Windows 11, I'm also using version 2.7.10 In my case, whenever I suspend the system after unlocking the database (either locking it after or not) KeePass freezes. If I restart KeePass it works normally until I suspend the system again.

Maestrali avatar Mar 17 '25 13:03 Maestrali

Just noticed: If I force suspend through a key combination (SUPER + CTRL +Q and then U) system freezes like described above. If I just let the suspend kick in with a timeout, system goes to sleep normally. If I wake the computer, KeePassXC has correctly locked the database.

Maybe the sequence of locking the database and the system interrupting the connection to the SMB share plays a role here?

speedlimiter avatar Mar 17 '25 19:03 speedlimiter

Also just locking the computer (SUPER + CTRL + Q then L) doesn't lock the database (Settings > Security > Lock databases when session is locked or lid is closed = enabled). It's still unlocked after entering the password to continue the session.

speedlimiter avatar Mar 17 '25 19:03 speedlimiter

Ahhh I see where this can go wrong, we update the tab name when the database locks which polls the database file for information, if the OS (or Qt) is misbehaving and not returning immediately when the file is unavailable then there can be a hang:

Image

droidmonkey avatar Mar 18 '25 01:03 droidmonkey

Having exactly the same issue. Debian 13, Keepassxc 2.7.10. My database lies on a server, accessed through smb. Never had this issue on Debian 12 (version 2.7.4).

Lemmiwinks avatar Aug 17 '25 19:08 Lemmiwinks