Re: pcscd jams when using '--auto-exit'

Ludovic Rousseau <[email protected]>
Newsgroups gmane.comp.lib.muscle
Message-ID <CAGstE8CW0+AUJxPiZFZUUnjpLLD01wvnVT4TMKRjdPktcfKsFg@mail.gmail.com>
2016-04-09 8:06 GMT+02:00 Andre Florath <[email protected]>:

> 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

_______________________________________________
Pcsclite-muscle mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.