Closed Massimo-B closed 1 year ago
But if my autostart script has run, I try to kill the running keepassxc which doesn't work. kill -9 works and removes the process.
It does not seem like keepassxc is dieing during the startup sequence in this case. The gui could be attached to another window or something crazy, we've seen this before. That's why you place the sleep before you start keepassxc.
If you close the database (ie, you see the welcome screen, press Ctrl+W) then exit, then allow it to autostart on next login, does the gui still fail to show up?
Roughly 2.5 minutes to mount the webdav is nuts, you may also be hitting some systemd timeouts for hung processes at startup.
I'm not using systemd, but OpenRC. The keepassxc process has died because it doesn't exist anymore. Why davfs2 is taking so long is some question to discuss there: https://savannah.nongnu.org/support/?110645 I'm going to try autostarting keepassxc without opening any database...
Yes, autostarting Keepassxc with disabled
Tools->Settings->General->Basic Settings->[ ] "Load previously open databases on startup"
works and makes it possible to open the Webdav file manually.
Anyway, when waiting for a mount or having any IO issues on opening a file, the gui should still appear and eventually cancelling the open file after some timeout. Then we can discuss the timeout. But it's not starting any gui and the process is crashing sometimes.
Can you reproduce with a local file that is opened on startup? I just checked the code, we do not do anything with files on startup. Literally just use the file name. The file is only touched when it is unlocked.
I can't reproduce with a local file, and I can't reproduce with the WebDAV file if the davfs2 mount is already established. I also can't reproduce when starting KeepassXC manually because then it waits for the davfs2 mount to finish, even when being locked for more than 3 minutes. This is all working as expected.
Only the autostarting Keepassxc does not wait for the mount to finish. It triggers the autofs, but is not alive anymore when davfs2 comes back with the established mount.
I don't think this is a keepassxc bug then
Overview
If using a DB file located on a WebDAV server mounting via davfs2 and autofs and starting keepassxc in Autostart of Xfce, the process dies before getting access to the mount.
Expected Behavior
Keepassxc should start and open the gui, ask for the password and wait for the mount to finish.
Actual Behavior
It dies before getting access
Context
I try to start keepassxc in Autostart of Xfce, but it fails. I created a wrapper script logging it's start and also doing /usr/bin/keepassxc & > keepassxc.log Right after Xfce Login, the script got called, the keepassxc.log is created but empty, no keepassxc process is running. My DB is located on a davfs2 fuse mount, mounted by autofs. So in the syslog I also see this:
I also tried adding a sleep 6 in my script but doesn't solve it. The mounting of davfs2 always takes a while, but the keepassxc dies before getting access to the mount. Usually, starting keepassxc manually without any autostart action at login, the delayed mounting is no issue and keepassxc waits for the DB file. But if my autostart script has run, I try to kill the running keepassxc which doesn't work. kill -9 works and removes the process. Starting another keepassxc does not open any gui or systray icon like usually when waiting for the mount, it's just frozen and can only be killed by -9.
KeePassXC - Version 2.7.1
Qt 5.15.3 Debugging mode is disabled.
Operating system: Gentoo/Linux CPU architecture: x86_64 Kernel: linux 5.17.8-gentoo-dist
Enabled extensions:
Cryptographic libraries:
Notes
I know using unreliable network mounts is always an issue, especially using fuse and webserver mounts like WebDAV. But centrally synchronizing my Keepass DB is essentially important. My earlier approach was to use a local file and synchronize via unison to the davfs2 mount like I'm doing with all other cloud documents. That works but is always tricky at conflicts as unison and no editor is capable to merge encrypted .kdbx files. I'm using the central DB from different Linux workstations and from Android using Keepass2Android. I noticed when using the WebDav instance of the file directly from all clients this works apparently well and also merges changes made in the background by detecting file modifications. It's just the initial start when waiting for the mount to finish that has issues with KeepassXC on Linux.