On Mon, 28 Mar 2016 17:22:31 +0200 Philippe Teuwen <p...@teuwen.org> wrote:
Some more tests:

To recap previous debug info, I'm using currently:

--- libusb-1.0-1.0.20.orig/libusb/os/linux_udev.c
+++ libusb-1.0-1.0.20/libusb/os/linux_udev.c
@@ -173,6 +173,7 @@ static void *linux_udev_event_thread_mai
        usbi_dbg("udev event thread entering.");

        while (poll(fds, 2, -1) >= 0) {
+               usbi_warn(NULL, "poll fds[0].revents=0x%X fds[1].revents=0x%X ",
fds[0].revents, fds[1].revents);
                if (fds[0].revents & POLLIN) {
                        /* activity on control pipe, read the byte and exit */
                        r = usbi_read(udev_control_pipe[0], &dummy, 
sizeof(dummy));
@@ -184,8 +185,11 @@ static void *linux_udev_event_thread_mai
                if (fds[1].revents & POLLIN) {
                        usbi_mutex_static_lock(&linux_hotplug_lock);
                        udev_dev = udev_monitor_receive_device(udev_monitor);
+                       usbi_warn(NULL, "udev_dev=0x%X", udev_dev);
                        if (udev_dev)
                                udev_hotplug_event(udev_dev);
+                       else
+                               usbi_err(NULL, "udev_monitor_receive_device 
failed");
                        usbi_mutex_static_unlock(&linux_hotplug_lock);
                }
        }




log_pcscd_yubikey_then_scl3711_then_100cpu.txt:
the initial 100% CPU case.
I've a Yubikey Neo-n plugged-in before launching pcscd.
When I plug a SCL3711 (or anything else or when unplugging sth on usb),
then one thread goes to 100% CPU, while pcscd is still operating as normal.

log_hotplugtest_yubikey_then_scl3711:
Same scenario but monitoring libusb/examples/hotplugtest:
no CPU problem here.

Interesting.
Do you give arguments to libusb/examples/hotplugtest or just execute the 
command with no argument?

log_pcscd_nothing_then_scl3711:
If the yubikey is not present, no problem, libusb seems not being used
at all.

The scl3711 is not supported by my CCID driver (at least I can't find the 
device VID: 0x04E6, PID: 0x5591 in my list)
I guess you use the SCM driver with this device.

log_pcscd_ACR38_then_scl3711:
To be closer to yubikey scenario, trying to replace yubikey by another
USB reader: an ACR38.
No CPU problem.

log_pcscd_ACR38withcard_then_scl3711:
To be closer to yubikey scenario, trying to replace yubikey by another
USB reader with a card inserted.
No CPU problem.

log_pcscd_nothing_then_yubikey_then_nothing_then_segfault:
If I (insert, then) remove the yubikey, pcscd segfaults and, before
that, we see the busy loop problem too in the logs.

So everything seems to be linked to usage of that yubikey.

I asked my contact at Yubico to get a "Yubico Yubikey NEO U2F+CCID" device so I 
can work on the problem myself.
If I can't get a device I will continue to bother you Philippe :-(

Thanks for your tests and logs.

Bye

--
Dr. Ludovic Rousseau

Reply via email to