Bug 1430268 - high CPU load when usb PIV cards such as Yubikey NEO is removed.
Summary: high CPU load when usb PIV cards such as Yubikey NEO is removed.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: coolkey
Version: 25
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-08 09:10 UTC by Min Tun
Modified: 2017-04-01 16:53 UTC (History)
4 users (show)

Fixed In Version: coolkey-1.1.0-31.fc25 coolkey-1.1.0-33.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-21 03:19:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Handle loop if the full reader is removed (700 bytes, patch)
2017-03-09 01:09 UTC, Bob Relyea
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1286320 0 unspecified CLOSED pcscd generates massive CPU load 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1364917 0 unspecified CLOSED gnome-shell and gnome-settings-daemon use 100% CPU time 2021-02-22 00:41:40 UTC

Description Min Tun 2017-03-08 09:10:46 UTC
Description of problem:
gnome-session-worker and pcscd services spike up in CPU usage close to 100% combined when a USB based PIV card is removed. Tested with Yubikey Neo.

It would appear that coolkey package is the one causing the issue. Once the package is removed the behaviour is no longer there.

Version-Release number of selected component (if applicable):
coolkey 1.1.0-30-fc24

How reproducible:
repeatable very easily.

Steps to Reproduce:
1. sudo sudo -u gdm org.gnome.login-screen enable-smartcard-authentication true 
2. run top | grep pcscd or run top | grep gnome-session-worker
3. insert yubikey then remove
4. see CPU usage spike.

Expected results:
no change in CPU usage.


Additional info:
The same bug was reported in red hat (https://bugzilla.redhat.com/show_bug.cgi?id=1286320) and have been patched. It seems coolkey-1.1.0-36-el7_3 version contains the pacth (https://rhn.redhat.com/errata/RHBA-2017-0094.html) but not available in Fedora repos.

Comment 1 Min Tun 2017-03-08 09:17:33 UTC
(In reply to Min Tun from comment #0)
> Description of problem:
> gnome-session-worker and pcscd services spike up in CPU usage close to 100%
> combined when a USB based PIV card is removed. Tested with Yubikey Neo.
> 
> It would appear that coolkey package is the one causing the issue. Once the
> package is removed the behaviour is no longer there.
> 
> Version-Release number of selected component (if applicable):
> coolkey 1.1.0-30-fc24
> 
> How reproducible:
> repeatable very easily.
> 
> Steps to Reproduce:
> 1. sudo sudo -u gdm org.gnome.login-screen enable-smartcard-authentication
> true 
> 2. run top | grep pcscd or run top | grep gnome-session-worker
> 3. insert yubikey then remove
> 4. see CPU usage spike.
> 
> Expected results:
> no change in CPU usage.
> 
> 
> Additional info:
> The same bug was reported in red hat
> (https://bugzilla.redhat.com/show_bug.cgi?id=1286320) and have been patched.
> It seems coolkey-1.1.0-36-el7_3 version contains the pacth
> (https://rhn.redhat.com/errata/RHBA-2017-0094.html) but not available in
> Fedora repos.

Its gnome-settings-daemon not gnome-session-worker

Comment 2 Jakub Jelen 2017-03-08 09:37:45 UTC
I was able to reproduce similar bug #1364917 with normal reader and normal PIV cards some time ago.

According to the Debian and the patch [1], it looks like it is fixed in the pcsc-lite-ccid-1.4.23 (in all Fedora releases today) [2].

The coolkey patch trying to address this issue is this patch [3], which is (most) probably the missing bit to make it working. I will try to build it together. Thanks for report.

[1] https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=pcsclite/CCID.git;a=commitdiff_plain;h=3c21f452543983f3625a1965ce234074cbda6865
[2] https://anonscm.debian.org/cgit/pcsclite/CCID.git/commit/?id=3c21f452543983f3625a1965ce234074cbda6865
[3] https://git.centos.org/blob/rpms!coolkey/41c12790f3b9915ef3a1ebe2d610722180031c67/SOURCES!coolkey-1.1.0-max-cpu-bug.patch

Comment 3 Jakub Jelen 2017-03-08 10:09:39 UTC
Here is testing build with the patch discussed in the previous comment:

https://koji.fedoraproject.org/koji/taskinfo?taskID=18262935

Can you verify that it solves the problem for you? If so, I will send the updates soon.

Comment 4 Min Tun 2017-03-08 23:02:41 UTC
Hi Jakub,

I have just tested the rpm. It has fixed the issue and no longer reproducible. How long does it normally take before this fix will be available in the repos? Thanks for your help.

Comment 5 Bob Relyea 2017-03-09 01:08:11 UTC
jakub. there's a RHEL patch that fixes this issue I'll attach it.

Comment 6 Bob Relyea 2017-03-09 01:09:24 UTC
Created attachment 1261412 [details]
Handle loop if the full reader is removed

Comment 7 Bob Relyea 2017-03-09 01:10:57 UTC
ah, never mind you found the equivalent.

Comment 8 Jakub Jelen 2017-03-09 08:16:01 UTC
Thank you for verification. I will submit builds today so you should be able to update today from testing or from stable a bit later.

Comment 9 Fedora Update System 2017-03-09 08:27:35 UTC
coolkey-1.1.0-33.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-34623e007d

Comment 10 Fedora Update System 2017-03-09 08:40:35 UTC
coolkey-1.1.0-31.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c680a6ecea

Comment 11 Fedora Update System 2017-03-10 23:23:24 UTC
coolkey-1.1.0-33.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-34623e007d

Comment 12 Fedora Update System 2017-03-11 14:24:51 UTC
coolkey-1.1.0-31.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-c680a6ecea

Comment 13 Fedora Update System 2017-03-21 03:19:48 UTC
coolkey-1.1.0-31.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2017-04-01 16:53:23 UTC
coolkey-1.1.0-33.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.


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