Page MenuHome GnuPG

Should lockfiles of 'probably dead' processes be removed?
Closed, ResolvedPublic

Description

In the Debian BTS there are several reports from users being "annoyed" that
gnupg leaves lockfiles when it is interrupted which leads to gnupg being
"stalled" with "waiting for lock (hold by 15237 - probably dead) ...":

Now it was asked/requested, if gnupg could remove those lockfiles automatically
or at least tell the user how to do so. Would be nice if you could comment this
question/request so I know, if I can close those reports.

http://bugs.debian.org/58260
http://bugs.debian.org/59617
http://bugs.debian.org/310328
http://bugs.debian.org/315677
http://bugs.debian.org/317654

(the 2 latter further point to another issue I did not yet examine)

Details

Version
1.4.x

Event Timeline

As it happend, I updated the locking code this week which now matches the one
used by GnuPG-2. The lock file now records the nodename of the box and if the
lock is held by the same node (machine) and the process does not exist anymore,
the lock file will be removed. Without taking the nodename in account we were
not been able to remove a lock file because the directory might be on a shared
file system.

If you want to produce a patch, the changes are in util/dotlock.c and a new
function in util/miscutils.c.

werner claimed this task.
werner removed a project: Restricted Project.