Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1251622 > unrolled thread

Bug#1108636: gpg-agent slows shutdown by 90 seconds

Started byAntoine Beaupre <anarcat@debian.org>
First post2025-07-02 05:00 +0200
Last post2025-08-08 23:00 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.debian.bugs.dist


Contents

  Bug#1108636: gpg-agent slows shutdown by 90 seconds Antoine Beaupre <anarcat@debian.org> - 2025-07-02 05:00 +0200
    Bug#1108636: gpg-agent slows shutdown by 90 seconds Antoine Beaupré <anarcat@debian.org> - 2025-07-02 05:10 +0200
      Bug#1108636: gpg-agent slows shutdown by 90 seconds Jérôme Charaoui <jerome@riseup.net> - 2025-08-08 23:00 +0200

#1251622 — Bug#1108636: gpg-agent slows shutdown by 90 seconds

FromAntoine Beaupre <anarcat@debian.org>
Date2025-07-02 05:00 +0200
SubjectBug#1108636: gpg-agent slows shutdown by 90 seconds
Message-ID<L3VRv-eC5L-1@gated-at.bofh.it>
Package: gpg-agent
Version: 2.4.7-21+b1
Severity: important


I'm not sure what's going on with the gpg-agent.service, but when i
reboot my computer, systemd hangs on it for 90 seconds (it "says"
1m30s anyways).

I can reproduce this in a session with `systemctl stop gpg-agent`
which hangs for about the same time.

In journald, we see this:

Jul 01 22:46:15 angela gpg-agent[5828]: scdaemon[5828]: DBG: SIGCONT received - breaking select
Jul 01 22:46:15 angela gpg-agent[5828]: scdaemon[5828]: SIGTERM received - shutting down ...
Jul 01 22:46:15 angela systemd[3858]: Stopping gpg-agent.service - GnuPG cryptographic agent and passphrase cache...
Jul 01 22:47:45 angela systemd[3858]: gpg-agent.service: State 'stop-sigterm' timed out. Killing.
Jul 01 22:47:45 angela systemd[3858]: gpg-agent.service: Killing process 5825 (gpg-agent) with signal SIGKILL.
Jul 01 22:47:45 angela systemd[3858]: gpg-agent.service: Killing process 5828 (scdaemon) with signal SIGKILL.
Jul 01 22:47:45 angela systemd[3858]: gpg-agent.service: Killing process 5829 (pipe-connection) with signal SIGKILL.
Jul 01 22:47:45 angela systemd[3858]: gpg-agent.service: Killing process 5830 (gpg-agent) with signal SIGKILL.
Jul 01 22:47:45 angela systemd[3858]: gpg-agent.service: Killing process 5833 (gpg-agent) with signal SIGKILL.
Jul 01 22:47:45 angela systemd[3858]: gpg-agent.service: Main process exited, code=killed, status=9/KILL
Jul 01 22:47:45 angela systemd[3858]: gpg-agent.service: Failed with result 'timeout'.
Jul 01 22:47:45 angela systemd[3858]: Stopped gpg-agent.service - GnuPG cryptographic agent and passphrase cache.


So on of two things:

 1. gpg-agent should respect TERM signals better and/or;
 2. the systemd unit should be less patient with it

a.

-- System Information:
Debian Release: 13.0
  APT prefers testing-security
  APT policy: (500, 'testing-security'), (500, 'testing-debug'), (500, 'stable-security'), (500, 'testing'), (500, 'stable'), (1, 'experimental'), (1, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.33+deb13-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gpg-agent depends on:
ii  gpgconf                     2.4.7-21+b1
ii  init-system-helpers         1.68
ii  libassuan9                  3.0.2-2
ii  libc6                       2.41-9
ii  libgcrypt20                 1.11.0-7
ii  libgpg-error0               1.51-4
ii  libnpth0t64                 1.8-3
ii  pinentry-gnome3 [pinentry]  1.3.1-2
ii  pinentry-qt [pinentry]      1.3.1-2

Versions of packages gpg-agent recommends:
ii  gnupg  2.4.7-21

Versions of packages gpg-agent suggests:
ii  dbus-user-session  1.16.2-2
ii  libpam-systemd     257.6-1
ii  pinentry-gnome3    1.3.1-2
ii  scdaemon           2.4.7-21+b1
pn  tpm2daemon         <none>

-- no debconf information

[toc] | [next] | [standalone]


#1251623

FromAntoine Beaupré <anarcat@debian.org>
Date2025-07-02 05:10 +0200
Message-ID<L3W1b-eCpm-1@gated-at.bofh.it>
In reply to#1251622
A few more details...

This is triggered only after I connect to a remove server with
gpg-agent's "ssh agent" mode, backed by a hardware token (a yubikey)
which holds my Authentication key. Merely starting the gpg-agent.service
unit is not enough.

Using the following override reduces the delay, in
~/.config/systemd/user/gpg-agent.service.d/override.conf:

[Service]
TimeoutStopSec=10s

A.

-- 
The good news about computers is that they do what you tell them to
do. The bad news is that they do what you tell them to do.
                        - Ted Nelson

[toc] | [prev] | [next] | [standalone]


#1255352

FromJérôme Charaoui <jerome@riseup.net>
Date2025-08-08 23:00 +0200
Message-ID<LhClY-66II-1@gated-at.bofh.it>
In reply to#1251623
On Tue, 01 Jul 2025 22:56:35 -0400 =?utf-8?Q?Antoine_Beaupr=C3=A9?= 
<anarcat@debian.org> wrote:
> A few more details...
> 
> This is triggered only after I connect to a remove server with
> gpg-agent's "ssh agent" mode, backed by a hardware token (a yubikey)
> which holds my Authentication key. Merely starting the gpg-agent.service
> unit is not enough.
> 
> Using the following override reduces the delay, in
> ~/.config/systemd/user/gpg-agent.service.d/override.conf:
> 
> [Service]
> TimeoutStopSec=10s
I attempted this workaround but it didn't work, the shutdown was still 
just as slow.

However I discovered that after uninstalling the yubikey-touch-detector 
package, the problem went away completely.

-- Jérôme

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.dist


csiph-web