On Thu, 3 Mar 2016 09:30:36 +0100 Philippe Teuwen <p...@teuwen.org> wrote:
Hi Ludovic,

Hello Philippe,

I'm getting the same problem with my Debian Testing.

I'll try to generate more logs related to libusb as explained in the bug
thread but here are some things I noticed:

I also suspect a bug in libudev, not just libusb.

Can you rebuild pcscd as explained in 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=812087#75 to enable libudev 
logs?

I've a Yubikey Neo-n plugged constantly.

When the 100% problem arises, nothing special in pcscd logs, even with
-f -a -d
cf attached log.
And pcscd and Yubikey remain fully functional despite the 100%.

Now the interesting bits:

Without the yubikey inserted the problem never occurs.

With the yubikey inserted there are two cases:

1) works as normal, the problem never arises

2) sometimes when yubikey gets inserted or when pcscd service is
restarted I get the following error in syslog:

pcscd[26168]: 00000000 ifdhandler.c:144:CreateChannelByNameOrChannel()
failed
pcscd[26168]: 00000012 readerfactory.c:1097:RFInitializeReader() Open
Port 0x200000 Failed (usb:1050/0115:libudev:0:/dev/bus/usb/001/025)
pcscd[26168]: 00000002 readerfactory.c:372:RFAddReader() Yubico Yubikey
NEO U2F+CCID init failed.

What version of libccid do you use?

What was the pcscd log line just before CreateChannelByNameOrChannel() failed?

At this point besides those lines in syslog, yubikey is functional and
CPU is ok *but* starting from this situation, whenever there will be a
change on another usb port, no matter what (inserting or removing
anything, even a simple USB hub) => CPU goes to 100%
Restarting pcscd brings CPU back to normal till another USB
insert/remove event.

That is really interesting.

You can reproduce the problem even after a complete restart of pcscd.
So the problem may not be in libusb or pcscd but in libudev or another "system" 
component used by pcscd.

Another idea is to attach a debugger to pcscd and get a backtrace of all the 
threads when the CPU goes 100%.
That could help identify the function or library causing the issue.

Thanks

--
Dr. Ludovic Rousseau

Reply via email to