Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 229263 - Process pcscd is running amok (Class 0805: Texas Instruments PCI6411/6421/6611/6621/7411/7421/7611/7621 Secure Digital Controller)
Summary: Process pcscd is running amok (Class 0805: Texas Instruments PCI6411/6421/661...
Alias: None
Product: Fedora
Classification: Fedora
Component: pcsc-lite
Version: rawhide
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Bob Relyea
QA Contact:
Whiteboard: bzcl34nup
: 247433 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2007-02-19 20:16 UTC by Miles Lane
Modified: 2008-05-07 01:12 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-05-07 01:12:28 UTC

Attachments (Terms of Use)
strace output (deleted)
2007-02-20 08:36 UTC, Miles Lane
no flags Details
reader.conf (deleted)
2007-02-22 00:13 UTC, Miles Lane
no flags Details
output of "strace -f -F pcscd --foreground --debug" (deleted)
2007-02-22 00:20 UTC, Miles Lane
no flags Details

Description Miles Lane 2007-02-19 20:16:25 UTC
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):


How reproducible:

In my case, just boot the machine.
Additional info:


On 2/19/07, Ray Strode <> 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/ No such file or directory
Feb 19 10:19:41 hogwarts pcscd: pcscdaemon.c:415:main() file
/var/run/ 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/
Feb 19 10:19:41 hogwarts pcscd: pcscdaemon.c:423:main() Remove
/var/run/ 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.

Comment 1 Ludovic Rousseau 2007-02-20 07:31:29 UTC
- kill all processes called pcscd (if any)
- remove /var/run/
- start pcscd as: pcscd --foreground --debug
- copy&paste the generated logs in this bug report


Comment 2 Miles Lane 2007-02-20 07:43:38 UTC
#> 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

Comment 3 Ludovic Rousseau 2007-02-20 07:54:30 UTC
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

Comment 4 Miles Lane 2007-02-20 08:36:55 UTC
Created attachment 148403 [details]
strace output

Comment 5 Miles Lane 2007-02-20 08:37:40 UTC
Yes, the cpu cycles are still getting chewed.

Comment 6 Bob Relyea 2007-02-20 17:00:40 UTC

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/
    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.



Comment 7 Miles Lane 2007-02-20 19:44:32 UTC
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.

Comment 8 Ludovic Rousseau 2007-02-20 20:44:15 UTC
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"



Maybe Bob can provide a RPM with the needed change.

Then start: pcscd --foreground --debug

Comment 9 Miles Lane 2007-02-20 21:07:36 UTC
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!

Comment 11 Miles Lane 2007-02-20 23:46:18 UTC
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
hotplug_libusb.c:234:HPReadBundleValues() Found drivers for 93 readers
hotplug_libusb.c:394:HPEstablishUSBNotifications() Driver openct-ifd.bundle does

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       

Comment 12 Ludovic Rousseau 2007-02-21 07:40:58 UTC
- 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.

Comment 13 Miles Lane 2007-02-22 00:13:40 UTC
Created attachment 148551 [details]

Comment 14 Miles Lane 2007-02-22 00:20:34 UTC
Created attachment 148553 [details]
output of "strace -f -F pcscd --foreground --debug"

Comment 15 Miles Lane 2007-02-22 00:26:22 UTC
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:
hotplug_libusb.c:110:HPReadBundleValues() Disabling USB support for pcscd.

Comment 16 Ludovic Rousseau 2007-02-22 10:31:52 UTC
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

Comment 17 Miles Lane 2007-02-22 18:02:28 UTC
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

Comment 18 Ludovic Rousseau 2007-02-22 19:51:10 UTC
Ok. So the bug(s) should be in these two drivers.

Bob, can you try to reproduce the problem?

Comment 19 Bob Relyea 2007-02-22 22:11:49 UTC
Miles, where did ifd-cyberjack.bundle and openct-ifd.bundle come from? 


Comment 20 Miles Lane 2007-02-23 05:12:27 UTC

Comment 21 Bob Relyea 2007-06-11 22:29:41 UTC
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

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.

Comment 22 Giuseppe Paterno 2007-10-10 15:22:45 UTC
*** Bug 247433 has been marked as a duplicate of this bug. ***

Comment 23 Bug Zapper 2008-04-03 19:11:48 UTC
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:

We will be following the process here: to ensure this
doesn't happen again.

Comment 24 Bug Zapper 2008-05-07 01:12:26 UTC
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:

Note You need to log in before you can comment on or make changes to this bug.