gnupg 2.x spawns dirmngd daemon whenever using gpg

Bug #1626646 reported by Ryan Harper
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnupg2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

1. lsb_release -rd
Description: Ubuntu Yakkety Yak (development branch)
Release: 16.10

2. apt-cache policy gnupg
gnupg:
  Installed: 2.1.15-1ubuntu2
  Candidate: 2.1.15-1ubuntu2
  Version table:
 *** 2.1.15-1ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu yakkety/main amd64 Packages
        100 /var/lib/dpkg/status

3. after gpg exits, there are no new daemons running

4. gpg-agent and dirmngr are running as daemons with open filehandles

# cat pstree_after_gpgv2.out
systemd(1)-+-accounts-daemon(109)-+-{gdbus}(114)
           | `-{gmain}(111)
           |-agetty(449)
           |-atd(115)
           |-cron(117)
           |-dbus-daemon(110)
           |-dhclient(285)
           |-dirmngr(559)---{ldap-reaper}(560)
           |-gpg-agent(564)
           |-polkitd(120)-+-{gdbus}(123)
           | `-{gmain}(121)
           |-rsyslogd(113)-+-{in:imuxsock}(124)
           | `-{rs:main Q:Reg}(125)
           |-snapd(119)-+-{snapd}(126)
           | |-{snapd}(127)
           | |-{snapd}(128)
           | |-{snapd}(129)
           | |-{snapd}(130)
           | `-{snapd}(131)
           |-sshd(427)
           |-systemd-journal(47)
           |-systemd-logind(116)
           |-systemd-resolve(377)
           `-systemd-udevd(43)
root@gpgv2:~# cat lsof_gpg_agent_tmpdir.out
dirmngr 559 root 3u unix 0x0000000000000000 0t0 35823861 /tmp/tmpv9bs89hz/S.dirmngr type=STREAM
ldap-reap 559 560 root 3u unix 0x0000000000000000 0t0 35823861 /tmp/tmpv9bs89hz/S.dirmngr type=STREAM

This also breaks things that set a 'no damon policy' in invoke-rc.d as gpg spawns these daemons rather than creating dirmngr or gpg-agent as service units that could be socket activated.

One such error path is when using cloud-utils mount-image-callback to mount up an image, and install new packages and then umounting. The unmount hangs as dirmngr process has an open filehandle against the mounted filesystem.

The easiest recreate is to:

sudo add-apt-repository -y ppa:<some ppa>

on a yakkety system.

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: gnupg 2.1.15-1ubuntu2
ProcVersionSignature: Ubuntu 4.4.0-36.55-generic 4.4.16
Uname: Linux 4.4.0-36-generic x86_64
ApportVersion: 2.20.3-0ubuntu7
Architecture: amd64
Date: Thu Sep 22 16:27:38 2016
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
SourcePackage: gnupg2
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Ryan Harper (raharper) wrote :
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.