Package: pcscd
Version: 1.8.20-1
Severity: grave

Since I upgraded from 1.8.19-1 to 1.8.20-1 (or maybe it is because of
scdaemon 2.1.18, unclear), I cannot reliably use pcscd for multiple
days.

After a while, the pcscd daemon just disappears, and then scdaemon
cannot talk to it anymore:

fév 09 11:37:57 curie gpg-agent[23116]: scdaemon[32496] pcsc_establish_context 
failed: no service (0x8010001d) 

This was partly documented in #854005 (GnuPG bug) and #854616
(scdaemon bug) which both have workarounds, and I was able to finally
use my yubikey *without* pcscd. But I believe there is a
pcscd-specific bug here that makes it basically unusable (hence the
grave severity).

$ systemctl --system status pcscd
● pcscd.service - PC/SC Smart Card Daemon
   Loaded: loaded (/etc/systemd/system/pcscd.service; indirect; vendor preset: 
enabled)
   Active: inactive (dead) since Wed 2017-02-08 21:37:16 EST; 14h ago
  Process: 15485 ExecStart=/usr/sbin/pcscd --foreground --auto-exit --debug 
(code=exited, status=0/SUCCESS)
 Main PID: 15485 (code=exited, status=0/SUCCESS)

As you may have noticed, I have modified the .service file to enable
debugging:

[Unit]
Description=PC/SC Smart Card Daemon
Requires=pcscd.socket

[Service]
ExecStart=/usr/sbin/pcscd --foreground --auto-exit --debug
ExecReload=/usr/sbin/pcscd --hotplug

[Install]
Also=pcscd.socket

After that, I  have noticed that pcscd gladly commits suicide:

fév 08 21:37:15 curie pcscd[15485]: 00000023 pcscdaemon.c:225:signal_thread() 
Preparing for suicide

That time is about the time I stopped working last night. I unplugged
my Yubikey and went to bed.

The workaround is, obviously, to restart pcscd:

sudo systemctl restart pcscd

It is unclear to me why this regression happened. The systemd files
haven't changed since 2011, so presumably the use of --auto-exit is
normal. Maybe something changed in the --auto-exit algorithm? Looking
upstream, I can't find anything specific.

Maybe scdaemon doesn't talk to the right socket anymore, or that
socket activation is failing somehow?

Am I the only one seeing this behavior?

Thanks to scdaemon changes, I can now use my Yubikey *without* pcscd,
but that makes the package basically unusable for me... So I figured
this should be fixed for stretch.

Thanks for your attention.

-- System Information:
Debian Release: 9.0
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages pcscd depends on:
ii  init-system-helpers         1.47
ii  libc6                       2.24-9
ii  libccid [pcsc-ifd-handler]  1.4.26-1
ii  libpcsclite1                1.8.20-1
ii  libudev1                    232-15
ii  lsb-base                    9.20161125

pcscd recommends no packages.

Versions of packages pcscd suggests:
ii  systemd  232-15

-- no debconf information

Reply via email to