Hello Philipp,

Le 19/10/2021 à 08:03, Philipp Marek a écrit :

Do I read you correctly that the default Debian package doesn't
restart pcscd upon installing a new version?

Exact.
My idea was to NOT break already running applications. But it looks
like it is more problematic.

pcscd should also be restarted after a driver is installed so pcscd
rescan the driver directory.

Yeah, right!

I wanted to work on the issue but I am not able to reproduce it any more :-(

Initial status:
$ systemctl status pcscd
● pcscd.service - PC/SC Smart Card Daemon
     Loaded: loaded (/lib/systemd/system/pcscd.service; indirect; vendor preset>
     Active: active (running) since Fri 2021-11-12 17:35:28 CET; 3min 16s ago
TriggeredBy: ● pcscd.socket
       Docs: man:pcscd(8)
   Main PID: 2246 (pcscd)
      Tasks: 4 (limit: 4650)
     Memory: 712.0K
        CPU: 3ms
     CGroup: /system.slice/pcscd.service
             └─2246 /usr/sbin/pcscd --foreground --auto-exit

nov. 12 17:35:28 debian systemd[1]: Started PC/SC Smart Card Daemon.

$ ls -l /var/run/pcscd/
total 4
srw-rw-rw- 1 root root 0 12 nov.  17:32 pcscd.comm
-rw-r--r-- 1 root root 6 12 nov.  17:35 pcscd.pid


pcscd if running with pid=2246
The socket pcscd.comm is present in /var/run/pcscd/

I restart pcscd:

$ sudo systemctl restart pcscd
$ systemctl status pcscd
● pcscd.service - PC/SC Smart Card Daemon
     Loaded: loaded (/lib/systemd/system/pcscd.service; indirect; vendor preset>
     Active: active (running) since Fri 2021-11-12 17:39:15 CET; 2s ago
TriggeredBy: ● pcscd.socket
       Docs: man:pcscd(8)
   Main PID: 2644 (pcscd)
      Tasks: 3 (limit: 4650)
     Memory: 672.0K
        CPU: 4ms
     CGroup: /system.slice/pcscd.service
             └─2644 /usr/sbin/pcscd --foreground --auto-exit

nov. 12 17:39:15 debian systemd[1]: Started PC/SC Smart Card Daemon.

pcscd is now running with pid=2644
So the process HAS BEEN restarted.

$ ls -l /var/run/pcscd/
total 4
srw-rw-rw- 1 root root 0 12 nov.  17:32 pcscd.comm
-rw-r--r-- 1 root root 6 12 nov.  17:39 pcscd.pid

The socket pcscd.comm is still present and has NOT been removed during the 
restart. The date of creation of the socket file is still the same. So the 
socket file has NOT been removed and recreated.

The socket /var/run/pcscd/pcscd.comm is removed only if pcscd is NOT started by 
systemd.

I also tried with "sudo service pcscd restart" but again a new pcscd process is 
started and the socket is NOT removed.


From the systemd changelog I see that since your initial bug report "Wed, 06 Oct 
2021" systemd has been updated in testing.
https://metadata.ftp-master.debian.org/changelogs//main/s/systemd/systemd_249.5-2_changelog
The current version in testing is now 249.5-2.
I guess the previous version was 247.9-4, uploaded in unstable on Fri, 01 Oct 
2021.

Can you check if you can reproduce the issue on your system?

That would explain why I needed the last month to debug a problem...
my pcscd was updated on 2021-08-31, but seems to have been running
the old binary until I rebooted -
at which point my VPN didn't work anymore, and the recently (2 weeks)
installed packages didn't offer any clue about the offending package...

Sorry.

Never mind... I learned a thing or two ;)

I still plan to restart pcscd on upgrade or when a new version of libccid is 
installed.

Thanks

--
Dr. Ludovic Rousseau

Reply via email to