Bug 350441 - pcsc-lite uses 100% cpu
pcsc-lite uses 100% cpu
Product: Fedora
Classification: Fedora
Component: pcsc-lite (Show other bugs)
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Bob Relyea
Fedora Extras Quality Assurance
: 374291 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2007-10-24 09:11 EDT by Mads Kiilerich
Modified: 2008-05-19 06:49 EDT (History)
3 users (show)

See Also:
Fixed In Version: Fedora 9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-19 06:49:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mads Kiilerich 2007-10-24 09:11:44 EDT
Description of problem:
Starting pcscd after installing openct causes pcscd to use 100% cpu

Version-Release number of selected component (if applicable):

How reproducible:
100% - without any cardreader attached

Steps to Reproduce:
1. install pcsc-lite not openct: 0% cpu
2. install pcsc-lite and openct: 100% cpu
Additional info:
[root@localhost ~]# strace -o log /usr/sbin/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 openct-ifd.bundle does
pcscdaemon.c:614:signal_trap() Preparing for suicide
hotplug_libusb.c:368:HPRescanUsbBus() Hotplug stopped
readerfactory.c:1363:RFCleanupReaders() entering cleaning function
pcscdaemon.c:558:at_exit() cleaning /var/run

Strace output hangs after:
close(5)                                = 0
mprotect(0xb75af000, 4096, PROT_NONE)   = 0
parent_tidptr=0xb7fafbd8, {entry_number:6, base_addr:0xb7fafb90, limit:1048575,
seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0,
useable:1}, child_tidptr=0xb7fafbd8) = 3297
select(5, [4], NULL, NULL, NULL
Comment 1 Mads Kiilerich 2007-10-24 09:17:30 EDT
Correction: It is pcsc-lite-openct-0.6.14-1.fc7 that trigs the problem, not openct.

It doesn't matter if openct service has been started or not
Comment 2 Mads Kiilerich 2007-10-24 09:23:16 EDT
and ctapi-cyberjack-pcsc causes the same ...
Comment 3 Ville Skyttä 2007-10-24 13:06:16 EDT
In that case, sounds like it's a problem with pcsc-lite, not openct.

FWIW, I cannot reproduce, works fine for me with
pcsc-lite-openct-0.6.14-1.fc7.x86_64, pcsc-lite-1.3.3-1.fc7.x86_64, Aladdin
eToken PRO.
Comment 4 Mads Kiilerich 2007-10-25 11:12:02 EDT
Yes, it is probably a pcsc-lite problem then.

Can I provide anything to help identify why it happens on my system only?
strace? gdb? debug flags?
Comment 5 Mads Kiilerich 2007-11-05 10:28:25 EST
Same problem on "F8"
Comment 6 Joshua Lamorie 2007-11-11 01:23:23 EST
I have the same problem on Fedora 8, fresh install.  I have an Aladdin USB
eToken, but I haven't tried plugging it in yet.  The following shows up in

messages:Nov 10 00:28:05 localhost pcscd: winscard.c:219:SCardConnect() Reader
E-Gate 0 0 Not Found
messages:Nov 10 00:28:05 localhost pcscd:last message repeated 4 times
messages:Nov 10 08:54:58 localhost pcscd:
hotplug_libusb.c:394:HPEstablishUSBNotifications() Driver openct-ifd.bundle does

However, when I do the following 

/usr/sbin/lsof |grep pcscd 

I notice that the following lines keep showing up (each line from a separate
execution of the above command).

pcscd     8783      root    6r  unknown                               
/proc/bus/usb/006 (stat: No such file or directory)
pcscd     8783      root    6       REG       0,17       52        282
/proc/bus/usb/005 lstat: No such file or directory)
pcscd     8783      root    6u  unknown                               
/proc/8783/fd/6 (readlink: No such file or directory)
pcscd     8783      root    6       DIR       0,17        0        251
/proc/bus/usb/004 lstat: No such file or directory)

So, does this mean that pcscd is polling for a USB device to be attached?  Is it
looking for "Reader E-Gate"?

Comment 7 Blagovest Lazarov 2007-11-19 11:25:59 EST
I have exactly the same problem. pcscd works but uses 100% cpu.
Fresh instalation Fedora 8


Nov 19 18:19:08 home pcscd: pcscdaemon.c:533:main() pcsc-lite 1.3.3 daemon ready.
Nov 19 18:19:08 home pcscd: hotplug_libusb.c:394:HPEstablishUSBNotifications()
Driver ifd-cyberjack.bundle does not support IFD_GENERATE_HOTPLUG
Comment 8 Bob Relyea 2007-11-19 14:00:34 EST
Ah, We've added a new ifd which doesn't support IFD_GENERATE_HOTPLUG.

There is an already known bug the pcsc-lite goes to 100% cpu when old IFD's that
don't support hotplug are added.

We need a bug against ifd-cypberjack.bundle to get it to support
IFD_GENERATE_HOTPLUG if we are to make it install by default.

(the pcsc-lite issue also needs to be fixed as well).
Comment 9 Stijn Hoop 2008-02-12 04:44:50 EST
Just to confirm: I see this issue on Fedora 8 as well, removing the packages
mentioned in comment 1 and comment 2 "fixes" the problem:


Luckily we have no need for these two packages (yet).

Is bug 374291 related by the way?
Comment 10 Zachary Napora 2008-04-20 21:29:24 EDT
*** Bug 374291 has been marked as a duplicate of this bug. ***
Comment 11 Tom Horsley 2008-05-17 21:14:50 EDT
Just a note: I didn't see any smartcard related services eating my CPU
when I booted a freshly installed fedora 9, so it seems to be fixed
in F9.
Comment 12 Mads Kiilerich 2008-05-19 06:49:00 EDT
I can confirm that the reported problem seems to be fixed in Fedora 9. 

I however not tested if pcsc-lite actually works.

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