[Pcsclite-muscle] pcscd jams when using '--auto-exit'
Ludovic Rousseau
ludovic.rousseau
Fri Apr 22 11:33:08 PDT 2016
2016-04-09 8:06 GMT+02:00 Andre Florath <andre at florath.net>:
> Hello!
>
Hello,
>
> Since some time I have problems with pcscd. I'm using pcscd in
> conjunction with online banking and after a short period of working it
> stops and jams the banking application.
>
> A 'strace' to the pcscd showed that it is still running somewhere
> deep in the USB stack.
>
> The problem is, when manually running the the pcscd, there is no
> problem at all - only when running from systemd.
> Therefore I searched for the differences and found one: the
> '--auto-exit'. Downloaded the source and had a closer look.
>
> What I understand from the source code is, that when '--auto-exit' is
> given, a SIGALRM is generated which (should) terminate the process.
>
> I have noticed that the signal handler 'signal_trap()' uses some
> function calls that are not allowed in signal handlers; like:
> * syslog()
> * gettimeofday()
> * remove()
>
> Using this creates undefined behavior.
> (Please see 'man 7 signal' for a complete list of system calls that
> are not allowed in signal handlers.)
>
>
> I found a workaround for the issue.
> Changed the service file to:
>
> ===
> [Unit]
> Description=PC/SC Smart Card Daemon
> #Requires=pcscd.socket
>
> [Service]
> #ExecStart=/usr/sbin/pcscd --foreground --auto-exit
> ExecStart=/usr/sbin/pcscd --foreground --debug -a
> ExecReload=/usr/sbin/pcscd --hotplug
>
> [Install]
> Also=pcscd.socket
> ===
>
> and disabling the pcscd.socket gives me a stable system.
> (Yes - pcscd is now started at boot time and runs the whole time
> - which is fine for me.)
>
> If you need more information, please drop me a note.
>
>
Thanks for the bug report.
Can you test with the proposed version available at
http://ludovic.rousseau.free.fr/softwares/pcsc-lite/pcsc-lite-1.8.16.tar.bz2
It should work but since I was not able to reproduce the problem myself I
would like you to confirm the problem is fixed in this version before I
commit the modification.
Thanks
--
Dr. Ludovic Rousseau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/attachments/20160422/992fe3d9/attachment.html>
More information about the pcsclite-muscle
mailing list