After relogin keepass2 does not start immediately

Bug #1011349 reported by Martin Wildam
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
keepass2 (Ubuntu)
Fix Released
Undecided
David Lechner

Bug Description

Ubuntu 12.04 32-bit with Unity: I have configured keepass2 to autostart at login which works when doing a cold or warm reboot.

Instead, when I logout and relogin keepass2 does not immediately start. Simply nothing happens either when I try to start it manually.

Only after a while (one or two minutes or so) magically I am able to run keepass2.

I tried to find some logs where some message appears but I could not find anything.

I tried installing tomboy notes (also a Mono application) to find out if it is a mono issue, but Tomboy starts immediately after relogin, so it must be a keepass2 issue.

Best regards, Martin.

Tags: patch

Related branches

Revision history for this message
Martin Wildam (mwildam) wrote :

No, it takes even longer - more than 3 minutes at my last attempt where I definitely did nothing else but waiting until I tried restarting using dash.

I also tried starting keepass2 on the commandline - same effect.

Revision history for this message
Julian Taylor (jtaylor) wrote :

keepass2 uses a file in /tmp to ensure only one instance start ( if that is configured)
if does not close properly the file remains in /tmp and only expires after a few minutes.

rm -f /tmp/KeePassIPC*
works around this

Revision history for this message
Martin Wildam (mwildam) wrote :

Thanks, that at least makes it clear why that happens.
Remains the question, why keepass2 does not close normally at logout...

And why are you not simply checking for an existing keepass2 process instead of checking for a temporary lock-file?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in keepass2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Aurel-Dragos Hofnar (wendor) wrote :

So ?

Revision history for this message
Julian Taylor (jtaylor) wrote :

I did not find time to fix this yet, patches welcome

Revision history for this message
David Lechner (dlech) wrote :

This is also an issue when KeePass crashes. You have to wait 3+ minutes (190 sec) before KeePass will restart. The 190 seconds is hard coded in KeePass, so it can't be changed without a patch.

Another workaround that I have found is to enable the option to allow multiple instances of KeePass. Tool > Options... > Advanced (tab) > Start and Exit (section) > Limit to a single instance (uncheck). This makes KeePass skip the check for the lock file.

Revision history for this message
David Lechner (dlech) wrote :

Here is a patch. It saves the PID in the temporary file mentioned above in addition to the timestamp that is already there. If we are within the 190 second window, then we also check that a process with that PID is running. If it is not running, then we get rid of the orphaned temporary file and continue starting KeePass.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "make-global-mutext-check-pid.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Julian Taylor (jtaylor) wrote :

the patch looks good, has it been forwarded upstream?

Revision history for this message
David Lechner (dlech) wrote :

> has it been forwarded upstream?

Not until just now.

Revision history for this message
David Lechner (dlech) wrote :

Patch was accepted upstream, so look for it to be fixed in KeePass 2.23.

Changed in keepass2 (Ubuntu):
status: Confirmed → Fix Committed
assignee: nobody → David Lechner (dlech)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package keepass2 - 2.23+dfsg-1ubuntu1

---------------
keepass2 (2.23+dfsg-1ubuntu1) saucy; urgency=low

  * build using LC_ALL=C.UTF-8, fixes build failure.
 -- Julian Taylor <email address hidden> Sat, 21 Sep 2013 21:51:01 +0200

Changed in keepass2 (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.