Bug 1017431 - pcscd turns mad producing high load
Summary: pcscd turns mad producing high load
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: pcsc-lite
Version: 21
Hardware: i686
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Bob Relyea
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-09 21:02 UTC by Peter Bieringer
Modified: 2015-12-02 16:06 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-02 02:59:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Peter Bieringer 2013-10-09 21:02:11 UTC
Description of problem:
pcscd turns mad producting high load

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


How reproducible:
always

Steps to Reproduce:
1. insert USB smartcard
2. add smartcard key to a new started SSH agent
3. use this key in an ssh session

Actual results:

   Tasks: 152 total,   2 running, 150 sleeping,   0 stopped,   0 zombie
libnuma: Warning: /sys not mounted or invalid. Assuming one node: Datei oder Verzeichnis nicht gefunden
%Cpu(s): 30,4 us, 15,9 sy, 12,9 ni, 40,2 id,  0,4 wa,  0,0 hi,  0,2 si,  0,0 st
KiB Mem:   1018128 total,   833976 used,   184152 free,     8660 buffers

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                               
 2265 root      20   0   55368   1620   1136 S  85,1  0,2   6:37.08 pcscd                                                                          


Expected results:
no such high load


Additional info:

strace -f shows a lot of:

[pid  2266] recvmsg(12, 0xb7566298, 0)  = -1 EAGAIN (Resource temporarily unavailable)
[pid  2266] poll([{fd=5, events=POLLIN}, {fd=4, events=POLLIN}], 2, -1^C) = 1 ([{fd=4, revents=POLLIN}])


# pstree -p 2265
pcscd(2265)─┬─{pcscd}(2266)
            ├─{pcscd}(2267)
            ├─{pcscd}(2268)
            ├─{pcscd}(2269)
            ├─{pcscd}(2270)
            └─{pcscd}(2278)

Any debug hints?

Comment 1 Ludovic Rousseau 2013-10-10 08:20:29 UTC
Please follow http://pcsclite.alioth.debian.org/pcsclite.html#support to provide mode details.

Comment 2 Peter Bieringer 2013-11-04 21:03:58 UTC
Collected now some debug output, but I don't like to attach it here because of potential privacy issues. Whom should I send the package, perhaps gpg encrypted.

Comment 3 Ludovic Rousseau 2013-11-06 10:03:31 UTC
You can send it to me at ludovic.rousseau
My PGP key is available at http://ludovic.rousseau.free.fr/gpg_key.txt

Comment 4 Ludovic Rousseau 2013-11-11 19:59:46 UTC
I do not see anything strange in the pcscd logs.

Only strace log shows a log of:
28954 poll([{fd=5, events=POLLIN}, {fd=4, events=POLLIN}], 2, -1) = 1 ([{fd=4, revents=POLLIN}])
28954 recvmsg(12, 0xb74b5298, 0)        = -1 EAGAIN (Resource temporarily unavailable)
28954 poll([{fd=5, events=POLLIN}, {fd=4, events=POLLIN}], 2, -1) = 1 ([{fd=4, revents=POLLIN}])
28954 recvmsg(12, 0xb74b5298, 0)        = -1 EAGAIN (Resource temporarily unavailable)

Do you see the high load all the time or only when you initiate a ssh connection?

The load of pcscd also includes the load of the smart card reader driver which includes the load of libusb.

What version of libusb is used by /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so?
Use ldd -r /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so to find the filename.

Comment 5 Peter Bieringer 2013-11-11 20:12:14 UTC
Regarding the load it is very strange. In the beginning of usage of the smartcard everything works like expected, even if I hibernate the PC for some time. Then after one of the next wakeups pcscd suddenly turns mad and is under load, never returning from the state until the daemon is killed.

Will try to track when it starts turning mad.


$  ldd -r /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
	linux-gate.so.1 =>  (0xb7716000)
	libusb-1.0.so.0 => /lib/libusb-1.0.so.0 (0xb76cb000)
undefined symbol: log_xxd	(/usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so)
undefined symbol: log_msg	(/usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so)
	libpthread.so.0 => /lib/libpthread.so.0 (0xb76b1000)
	libc.so.6 => /lib/libc.so.6 (0xb74f2000)
	libudev.so.1 => /lib/libudev.so.1 (0xb74df000)
	/lib/ld-linux.so.2 (0xb7717000)
	libdl.so.2 => /lib/libdl.so.2 (0xb74d9000)
	librt.so.1 => /lib/librt.so.1 (0xb74d0000)
	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb74b3000)

$ rpm -qf /lib/libusb-1.0.so.0
libusbx-1.0.16-3.fc19.i686

Comment 6 Ludovic Rousseau 2013-11-11 21:04:17 UTC
It might also be a libudev (or kernel) issue.

Have a look at this other bug "pcscd: 100% CPU usage in hotplug_libudev.c after suspend/resume" http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718473

Comment 7 Fedora End Of Life 2015-01-09 20:11:12 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Fedora End Of Life 2015-02-17 17:36:00 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 9 Peter Bieringer 2015-02-17 19:46:57 UTC
Problem still occurs from time to time on fc21, mostly after wakeup from hibernate.

Comment 10 Fedora End Of Life 2015-11-04 13:34:02 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 11 Fedora End Of Life 2015-12-02 02:59:53 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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