Description of problem: On my updated rawhide installation, pcscd constantly consumes around 35% of the cpu cycles. Version-Release number of selected component (if applicable): pcsc-lite-1.3.3-1.fc7 How reproducible: In my case, just boot the machine. Additional info: From fedora-test-list: On 2/19/07, Ray Strode <rstrode> wrote: > Miles Lane wrote: > > Hi, > > > > On my updated rawhide installation, pcscd constantly consumes around > > 35% of the cpu cycles. I have taken to shutting of the service. Any > > idea how I can troubleshoot this? Is this a bug, or just an issue > > with my configuration? > pcscd is a smart card daemon. If you don't use smart cards for > authentication, you can just turn it off with /sbin/chkconfig pcscd off > > It sounds like a bug, can you file it? Running strace -s512 -f -p > $(/sbin/pidof pcscd) might give some indication what it's doing (or > getting a backtrace from gdb) Very strange. When I attached strace, the cpu cycles used dropped down to nothing. Then, when I stopped pcscd and tried to restart it, the process won't start up again. I wonder whether strace somehow caused pcscd to not stop cleanly? I'll file a bug and post with the bug ID. Should I CC you inside the bug report? strace -s512 -f -p $(/sbin/pidof pcscd) Process 2081 attached with 2 threads - interrupt to quit [pid 2063] select(6, [5], NULL, NULL, NULL <unfinished ...> Process 2063 detached Process 2081 detached Process 2063 detached [root@hogwarts ~]# /etc/init.d/pcscd stop Stopping PC/SC smart card daemon (pcscd): [ OK ] [root@hogwarts ~]# /etc/init.d/pcscd start Starting PC/SC smart card daemon (pcscd): [FAILED] /var/log/messages contains: Feb 19 10:19:41 hogwarts pcscd: pcscdaemon.c:93:GetDaemonPid() Can't open /var/run/pcscd.pid: No such file or directory Feb 19 10:19:41 hogwarts pcscd: pcscdaemon.c:415:main() file /var/run/pcscd.pub already exists. Feb 19 10:19:41 hogwarts pcscd: pcscdaemon.c:417:main() Maybe another pcscd is running? Feb 19 10:19:41 hogwarts pcscd: pcscdaemon.c:420:main() I can't read process pid from /var/run/pcscd.pid Feb 19 10:19:41 hogwarts pcscd: pcscdaemon.c:423:main() Remove /var/run/pcscd.pub and /var/run/pcscd.comm Feb 19 10:19:41 hogwarts pcscd: pcscdaemon.c:425:main() if pcscd is not running to clear this message.
- kill all processes called pcscd (if any) - remove /var/run/pcscd.pub - start pcscd as: pcscd --foreground --debug - copy&paste the generated logs in this bug report thanks
#> pcscd --foreground --debug pcscdaemon.c:319:main() pcscd set to foreground with debug send to stderr debuglog.c:211:DebugLogSetLevel() debug level=debug pcscdaemon.c:533:main() pcsc-lite 1.3.3 daemon ready. hotplug_libusb.c:394:HPEstablishUSBNotifications() Driver ifd-cyberjack.bundle does not support IFD_GENERATE_HOTPLUG
Not enough debug info. Do you still have a pcscd consuming 35% of CPU? Use Ctrl-C to kill pcscd. Now try: strace -f -F pcscd --foreground --debug
Created attachment 148403 [details] strace output
Yes, the cpu cycles are still getting chewed.
Miles: 2 Questions: 1) is this new for 1.3.3? 2) does it go away under any of the following conditions: a. Temporarily rename /usr/lib/pkcs11/libcoolkeypk11.so b. Temporarily move /usr/lib/pcsc/drivers/ifd-egate.bundle our of the drivers directory. You should restart pcscd and gdm after trying each of these. If the 35% CPU goes away we can start looking at these components instead. Thanks. bob
I am not sure how long ago this problem started. Can you point me to earlier packages for pcscd that I can test? It has nothing to do with coolkeys, because I didn't have it installed. I just tried installing it to see whether that would help, but it didn't. I tried renaming /usr/lib/pcsc/drivers/ifd-egate.bundle and /usr/lib/pcsc/drivers/ifd-cyberjack.bundle, but that also did not help.
It looks like pcscd is continuously scanning the USB bus. I would need some debug from pcscd but you need to recompile pcscd after patching the file src/hotplug_libusb.c like: Index: src/hotplug_libusb.c =================================================================== --- src/hotplug_libusb.c (révision 2408) +++ src/hotplug_libusb.c (copie de travail) @@ -39,7 +39,7 @@ #include "sys_generic.h" #include "hotplug.h" -#undef DEBUG_HOTPLUG +#define DEBUG_HOTPLUG #define ADD_SERIAL_NUMBER #define BUS_DEVICE_STRSIZE 256 Maybe Bob can provide a RPM with the needed change. Then start: pcscd --foreground --debug
Setting up the entire Gnome build environment would be difficult for me, since I am low on disk space. So, it would be very helpful if you could provide the debug package. Thanks!
done: http://directory/fedora/redhat.com/built/rpm_review/rrelyea/pcsc-lite/pcsc-lite-1.3.3-1.rawhide_bob.i386.rpm http://directory/fedora/redhat.com/built/rpm_review/rrelyea/pcsc-lite/pcsc-lite-1.3.3-1.rawhide_bob.i386.rpm
hotplug_libusb.c:196:HPReadBundleValues() Increase driverTracker to 96 entries hotplug_libusb.c:182:HPReadBundleValues() Found driver for: Pertosmart Card Reader hotplug_libusb.c:182:HPReadBundleValues() Found driver for: Pertosmart Card Reader hotplug_libusb.c:182:HPReadBundleValues() Found driver for: WB Electronics Inifinty USB Ulimited hotplug_libusb.c:182:HPReadBundleValues() Found driver for: REINER SCT CyberJack hotplug_libusb.c:182:HPReadBundleValues() Found driver for: REINER SCT CyberJack pp_a hotplug_libusb.c:234:HPReadBundleValues() Found drivers for 93 readers hotplug_libusb.c:394:HPEstablishUSBNotifications() Driver openct-ifd.bundle does not support IFD_GENERATE_HOTPLUG ifd-egate.i386 0.05-16 installed openct.i386 0.6.11-2.fc7 installed pcsc-lite-openct.i386 0.6.11-2.fc7 installed ccid.i386 1.2.1-1.fc7 installed ifd-egate.i386 0.05-16 installed pcsc-tools.i386 1.4.8-1.fc7 installed pcsc-lite.i386 1.3.3-1.rawhide_bob installed ctapi-cyberjack-pcsc.i386 2.0.13beta5-2.fc7 installed pcsc-lite-libs.i386 1.3.3-1.fc7 installed pcsc-perl.i386 1.4.4-3.fc7 installed
- send the output of: "cat /etc/reader.conf" - rename /usr/lib/pcsc/drivers to /usr/lib/pcsc/drivers.old and start again: send the _complete_ pcscd logs and check the CPU utilisation.
Created attachment 148551 [details] reader.conf
Created attachment 148553 [details] output of "strace -f -F pcscd --foreground --debug"
Moving the /usr/lib/pcsc/drivers to /usr/lib/pcsc/drivers.bak causes pcscd to no longer chew cpu cycles. This doesn't seem too surprising, given that: hotplug_libusb.c:109:HPReadBundleValues() Cannot open PC/SC drivers directory: /usr/lib/pcsc/drivers hotplug_libusb.c:110:HPReadBundleValues() Disabling USB support for pcscd.
Now create an empty directory /usr/lib/pcsc/drivers and move the drivers from /usr/lib/pcsc/drivers.bak one after the other in the new directory. After each move restart pcscd to check if you have the problem or not. I suggest to start with ccid.i386 as I know it well. The idea is to know if the problem is in pcscd itself of in a driver loaded by pcscd.
Having these three directories present causes no trouble: ifd-ccid.bundle, ifd-egate.bundle, serial Having either of these two directories present causes the CPU usage to jump: ifd-cyberjack.bundle and openct-ifd.bundle
Ok. So the bug(s) should be in these two drivers. Bob, can you try to reproduce the problem?
Miles, where did ifd-cyberjack.bundle and openct-ifd.bundle come from? bob
ctapi-cyberjack-pcsc-2.0.13beta5-2.fc7 pcsc-lite-openct-0.6.11-2.fc7
I've gone to long with out responding to this bug. OK, I have 2 theories here both revolve around the fact that ifd-cyberjack.bundle and openct-ifd.bundle are using the old 'wakeup and poll method'. Theory 1 (most likely:). Jack found a bug in ifd-egate-0.05-16 where is you weren't using the new polling method, you would wind up in a busy loop (bug 232983). He fixed that in ifd-egate-0.05-17. If ifd-cyberjack.bundle or openct-ifd.bundle is loaded, pcsc-lite will switch back to the old polling method rather than the wake up with udev method. We can test theory 1 either by removing ifd-egate or using the latest version of ifd-egate and seeing if the problem goes away. Theory 2 (less likely). There is a missing sleep in pcsc-lite when we fall back to the old poll method. If loading ifd-cyberjack.bundle by itself triggers the CPU jump, then it's likely that theory 2 is the problem.
*** Bug 247433 has been marked as a duplicate of this bug. ***
Based on the date this bug was created, it appears to have been reported against rawhide during the development of a Fedora release that is no longer maintained. In order to refocus our efforts as a project we are flagging all of the open bugs for releases which are no longer maintained. If this bug remains in NEEDINFO thirty (30) days from now, we will automatically close it. If you can reproduce this bug in a maintained Fedora version (7, 8, or rawhide), please change this bug to the respective version and change the status to ASSIGNED. (If you're unable to change the bug's version or status, add a comment to the bug and someone will change it for you.) Thanks for your help, and we apologize again that we haven't handled these issues to this point. The process we're following is outlined here: http://fedoraproject.org/wiki/BugZappers/F9CleanUp We will be following the process here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this doesn't happen again.
This bug has been in NEEDINFO for more than 30 days since feedback was first requested. As a result we are closing it. If you can reproduce this bug in the future against a maintained Fedora version please feel free to reopen it against that version. The process we're following is outlined here: http://fedoraproject.org/wiki/BugZappers/F9CleanUp