gpg-agent "forgetting" keys when getting many parallel requests

Bence Ferdinandy bence at ferdinandy.com
Fri Mar 15 20:16:45 CET 2024


Hi,

I've been poking at this issue now for some time, and haven't been able to find
any info regarding this in the man pages or online. 

I'm running Regolith (basically Ubuntu with i3), and normally my gpg key is
unlocked by me logging into the graphical session, i.e. using the key to
decrypt something does not ask for a key. What I noticed though, is that if
I want to decrypt multiple things in parallel, first the decryption process
seems to slow down faster than linear, and then some (not all) decrypt tasks
start prompting me for a password to the key. I've done a couple of
experiments, and my feeling is that even though the decrypt task are run in
parallel, something is done serially, but I'm not sure what and where exactly
and that there is a timeout on waiting for this. My best bet, is that the
password for the key needs to be fetched from the gnome keyring (? if it's
called that) and that gpg-agent times out waiting for this and just requests it
from the user.

I made a short script in python (attached) demonstrating this. On my machine,
setting WORKERNUM=7 is enough to trigger the issue.

Could somebody point me to a resources explaining what is happening here? And
more importantly, is there some setting I can change to avoid the occasional
password prompts?

Thanks,
Bence
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gpgtest.py
Type: text/x-python
Size: 545 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20240315/9a79ab64/attachment.py>


More information about the Gnupg-users mailing list