Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pcscd quits; browsers hang; lots of messages in syslog #111

Closed
ken-bell opened this issue Nov 12, 2021 · 8 comments
Closed

pcscd quits; browsers hang; lots of messages in syslog #111

ken-bell opened this issue Nov 12, 2021 · 8 comments

Comments

@ken-bell
Copy link

Versions

  • smart card reader driver name and version: pcsc-lite-ccid-1.4.29-5.1.el8_4.x86_64
  • pcsc-lite version: pcsc-lite-1.8.23-4.1.el8_4.x86_64
  • the output of the command /usr/sbin/pcscd --version

pcsc-lite version 1.8.23.
Copyright (C) 1999-2002 by David Corcoran [email protected].
Copyright (C) 2001-2015 by Ludovic Rousseau [email protected].
Copyright (C) 2003-2004 by Damien Sauveron [email protected].
Report bugs to [email protected].
Enabled features: Linux x86_64-redhat-linux-gnu libsystemd serial usb libudev usbdropdir=/usr/lib64/pcsc/drivers ipcdir=/var/run/pcscd configdir=/etc/reader.conf.d

Platform

  • Operating system or GNU/Linux distribution name and version : Oracle Linux Server release 8.4
  • Smart card middleware name and version : opensc-0.20.0-4.el8.x86_64
  • Smart card reader manufacturer name and reader model name : SCR33xx v2.0 USB SC Reader / SCR331-LC1 / SCR3310 SmartCard Reader
  • Smart card name : PIV_II

Log

pcscd[46653]: 00000000 ccid_usb.c:1256:ControlUSB() control failed (1/9): -7 LIBUSB_ERROR_TIMEOUT

pcscd[3863]: 87346456 commands.c:1564:CCID_Receive Protocol not supported
pcscd[3863]: 00000120 ifdwrapper.c:543:IFDTransmit() Card not transacted: 612
pcscd[3863]: 00000008 winscard.c:1620:SCardTransmit() Card not transacted: 0x80100016
pcscd[3863]: 00016149 commands.c:1564:CCID_Receive Protocol not supported
pcscd[3863]: 00000016 ifdwrapper.c:543:IFDTransmit() Card not transacted: 612
pcscd[3863]: 00000008 winscard.c:1620:SCardTransmit() Card not transacted: 0x80100016
pcscd[3863]: 00796440 commands.c:1564:CCID_Receive Card absent or mute
pcscd[3863]: 00000017 ifdwrapper.c:543:IFDTransmit() Card not transacted: 612
pcscd[3863]: 00000005 winscard.c:1620:SCardTransmit() Card not transacted: 0x80100016
pcscd[3863]: 00794196 commands.c:1564:CCID_Receive Card absent or mute
pcscd[3863]: 00000018 ifdwrapper.c:543:IFDTransmit() Card not transacted: 612
pcscd[3863]: 00000005 winscard.c:1620:SCardTransmit() Card not transacted: 0x80100016
pcscd[3863]: 00791550 commands.c:1564:CCID_Receive Card absent or mute
pcscd[3863]: 00000019 ifdwrapper.c:543:IFDTransmit() Card not transacted: 612
pcscd[3863]: 00000004 winscard.c:1620:SCardTransmit() Card not transacted: 0x80100016
pcscd[3863]: 00794613 commands.c:1564:CCID_Receive Card absent or mute
pcscd[3863]: 00000019 ifdwrapper.c:543:IFDTransmit() Card not transacted: 612
pcscd[3863]: 00000005 winscard.c:1620:SCardTransmit() Card not transacted: 0x80100016
pcscd[3863]: 00787702 commands.c:1564:CCID_Receive Card absent or mute
pcscd[3863]: 00000020 ifdwrapper.c:543:IFDTransmit() Card not transacted: 612
pcscd[3863]: 00000004 winscard.c:1620:SCardTransmit() Card not transacted: 0x80100016
pcscd[3863]: 00787661 commands.c:1564:CCID_Receive Card absent or mute
pcscd[3863]: 00000020 ifdwrapper.c:543:IFDTransmit() Card not transacted: 612
pcscd[3863]: 00000005 winscard.c:1620:SCardTransmit() Card not transacted: 0x80100016
pcscd[3863]: 00793479 commands.c:1564:CCID_Receive Card absent or mute
pcscd[3863]: 00000021 ifdwrapper.c:543:IFDTransmit() Card not transacted: 612
pcscd[3863]: 00000005 winscard.c:1620:SCardTransmit() Card not transacted: 0x80100016
pcscd[3863]: 00793230 commands.c:1564:CCID_Receive Card absent or mute
pcscd[3863]: 00000020 ifdwrapper.c:543:IFDTransmit() Card not transacted: 612
pcscd[3863]: 00000004 winscard.c:1620:SCardTransmit() Card not transacted: 0x80100016
pcscd[3863]: 00797365 commands.c:1564:CCID_Receive Card absent or mute
pcscd[3863]: 00000018 ifdwrapper.c:543:IFDTransmit() Card not transacted: 612
pcscd[3863]: 00000004 winscard.c:1620:SCardTransmit() Card not transacted: 0x80100016
pcscd[3863]: 00791239 commands.c:1564:CCID_Receive Card absent or mute
... and more ...

pcscd[44095]: 99999999 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000171 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000010 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000007 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000006 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000007 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000006 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000007 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000005 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000004 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000024 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000004 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000006 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000004 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000004 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000003 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000004 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000003 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000005 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000004 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000022 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000004 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000003 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000004 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000003 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000004 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000005 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
pcscd[44095]: 00000003 winscard_msg.c:429:MessageSend() select returns with failure: Bad file descriptor
... and more ...

Additional info:

pcsc-lite-ccid-1.4.29-5.1.el8_4.x86_64
pcsc-lite-libs-1.8.23-4.1.el8_4.x86_64
pcsc-lite-1.8.23-4.1.el8_4.x86_64

This is on Oracle Linux 8. Restarting pcscd (systemctl restart pcscd) sets everything back to normal for a short while. Same result with a different USB reader (SCR331).

Thanks!

@LudovicRousseau
Copy link
Owner

Please generate a log as documented at https://ccid.apdu.fr/#support

@ken-bell
Copy link
Author

Sorry, took me awhile to figure out how to do this in a systemd environment :-)

Here are two logs: one that runs up to the "hang", and the other when I tried to restart pcscd right after.

PCSCD-hangs_log.txt
After-killing-and-restarting_log.txt

@LudovicRousseau
Copy link
Owner

Strange errors.

Can you update pcsc-lite to the latest version: 1.9.1
https://pcsclite.apdu.fr/files/

Maybe Oracle Linux provides updated packages.

@ken-bell
Copy link
Author

Using 1.9.1 built from your download link: "Communication protocol mismatch!" (log attached)
Communication-Protocol-Mismatch_log.txt

@LudovicRousseau
Copy link
Owner

You get "Communication protocol mismatch!" because you use a new pcscd with an old libpcsclite.so.1.
The new libpcsclite.so.1 needs to replace the old one.
I don't know where the libpcsclite.so.1 file is in Oracle Linux 8.

pcscd may also have problem finding the smart card reader drivers:

00000429 [140438398815744] hotplug_libudev.c:122:HPReadBundleValues() Cannot open PC/SC drivers directory: /opt/pcsc-lite-1.9.1/lib/pcsc/drivers

It is a good idea to install the new pcsc-lite in /opt/pcsc-lite-1.9.1/ but that is not enough to make it work correctly.

@ken-bell
Copy link
Author

Ah, thank you :-) I was trying to avoid messing with the installed packages, but went ahead anyway now. The libraries are in /usr/lib64 and that's also where the opensc/drivers directory is located. The Oracle package has only the libpcsclite.so.1.0.0 file and the libpcsclite.so symlink to it, but I made the additional libpcsclite.so.1 symlink also just in case. And copied the opensc/drivers directory from /opt into /usr/lib64 as well. After a reboot, all is working. So far so good.

@ken-bell
Copy link
Author

Correction: not "opensc/drivers", but "pcsc/drivers".

@LudovicRousseau
Copy link
Owner

Reopen this bug (or create a new one) if you get the problem again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants