Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1046685

Summary: pcsc-lite-1.8.8-2 emits gratuitous noise into /var/log/messages when installed but not enabled
Product: Red Hat Enterprise Linux 7 Reporter: R P Herrold <herrold>
Component: pcsc-liteAssignee: Bob Relyea <rrelyea>
Status: CLOSED WORKSFORME QA Contact: Asha Akkiangady <aakkiang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: arubin, flapper, herrold, jgalipea, pvrabec, rrelyea
Target Milestone: rc   
Target Release: 7.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-05 21:52:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description R P Herrold 2013-12-26 14:21:44 UTC
Description of problem:

pcsc-lite-1.8.8-2 emits gratuitous noise into /var/log/messages when installed but not enabled

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

pcsc-lite-1.8.8-2

How reproducible:

install the package to satisfy dependencies, but do not enable it as no relevant hardware is present

Steps to Reproduce:

run system

Actual results:

noise of this type appears

Dec 26 09:14:57 localhost pcscd: 00000000 utils.c:53:GetDaemonPid() Can't open /var/run/pcscd/pcscd.pid: No such file or directory
Dec 26 09:16:46 localhost pcscd: 00000000 utils.c:53:GetDaemonPid() Can't open /var/run/pcscd/pcscd.pid: No such file or directory



Expected results:

no noise


Additional info:

this may be occurring during package installs and un-installs, as this is occurring on a system which is shuttling packages in and out

Comment 1 R P Herrold 2013-12-26 14:23:07 UTC
I suggest this as I see this:

Dec 26 09:16:46 localhost systemd: Starting PC/SC Smart Card Daemon...                                                          
Dec 26 09:16:46 localhost systemd: Started PC/SC Smart Card Daemon.                                                             
Dec 26 09:16:46 localhost pcscd: 00000000 utils.c:53:GetDaemonPid() Can't open /var/run/pcscd/pcscd.pid: No such file or directory                                          

and no relevant devices are present

Comment 3 Bob Relyea 2014-02-24 22:09:28 UTC
I'm not quite sure this raised to the level of exception. It would probably better for 7.1.

Comment 5 Bob Relyea 2014-02-26 22:50:22 UTC
dev ack for 7.1

Comment 7 Bob Relyea 2014-09-11 16:54:59 UTC
Hmm, there's a question why pcscd can't open the file. It should be able to.

Comment 8 Bob Relyea 2014-09-24 22:25:23 UTC
so what do you mean by 'not enabled'. Do you mean 'no readers are active' or do you mean 'turned off in systemd'? In any case you shouldn't be getting those errors in a correctly configured system. You could get them if you've removed /var/run/pcscd. Anwya I can't seem to reproduce the issue on a system with no readers installed.

bob

Comment 9 R P Herrold 2014-09-24 22:58:34 UTC
the former -- disabled via systemd's support of the older command approach: with 
  chkconfig pcscd off

as mentioned in the initial filing, there are not such devices present, and so no 'readers'.  I would remove it altogether if I could, but there are dependency problems hard-coded into the sped files

It would seem if there is no process running, it should not be looking -- for some reason the psccd  is asked by systemd to look (perhaps: status inquiry which fires it up solely for the purpose of inventorying running processes ? ... guessing here)

easy enough to wrap utils.c:53:GetDaemonPid() with a stat and conditional to not try to open a non-present file, in any case

Comment 10 Bob Relyea 2014-09-25 17:29:29 UTC
ah, the spew is from the library, not the daemon. Thanks.

(it's probably because you have coolkey installed).

Comment 11 Bob Relyea 2014-09-25 18:25:11 UTC
OK, there is something funky going on between pcsc-lite and systemd. You should be able to get rid of your spew if you rm /var/run/pcscd/pcscd.comm.

I can't just silence the warnings because they are an error indication in a real system.

Comment 12 R P Herrold 2014-09-25 19:11:03 UTC
I did not suggest silencing the message in all cases by any stretch of the imagination  If there is an error condition, check for it and emit a proper message (i.e. ; 

IF (pcscd is enabled, and 
   service pcscd status returns FAIL) 
THEN log an error about being unable to see the expected running instance

... rather, here, simple stderr noise is ending up in the syslog, resulting from trying to access a file which would be detectable as absence via 'stat', from the log cited is ... gratuitous noise   

'gratuitous' is perhaps a polite way to say spewage.  I would, as noted, remove the offending package if I could, but that breaks system dependency integrity.  As such, my only choice is to disable the daemon, which I have done


As the comment in the last part of comment 11, perhaps you missed the fact that the directory which you propose I remove 

IS NOT THERE

because '/var/run/pcscd/' is created by systemd when the daemon is enabled as a place to put the matching PID file .  The daemon has never been enabled; it has never been created ... it COULD have been created as a 'ghost' directory in the .spec file, but it is not ...

[root@precision490-64-kvm ~]# ls -al  /var/run/pcscd
ls: cannot access /var/run/pcscd: No such file or directory

Comment 13 R P Herrold 2014-09-25 19:26:53 UTC
I have removed cookkey and am seeing if the noise persists .. also filed Bug 1146696 as I poke in this space

Comment 16 R P Herrold 2015-01-27 21:45:49 UTC
I see a later pcsc-lite in RawHide, but no new code since:

* Tue Jun 03 2014 Nikos Mavrogiannopoulos <nmav> - 1.8.11-1
- New upstream release
- Safer usage of libudev functions

The fix seems non-invasive and trivial -- see Comment #9

Comment 17 Bob Relyea 2015-08-04 18:17:18 UTC
This is an interaction between pcsc-lite and systemd. The fix is not to remove the error message, which is a symptom of some other underlying problem.

Comment 19 Bob Relyea 2016-07-05 21:52:04 UTC
when I looked into this last year, I was able to reproduce this by using chkconfig pcscd off .

It looks like chkconfig has changed. Now doing chkconfig pcscd off disables pcscd, but pcscd will restart automatically. If you reboot pcscd will be off. You can shut pcscd off for good with:

systemctl mask pcscd

It seems before systemd tools was removing or grabbing the socket so that it would restart pcscd on activation.

In any case it now works now even though it didn't before and pcscd itself wasn't changes. I'm closing this 'WORKSFORME'. If the problem can be reproduced on RHEL 7.3 or later please reopen with instructions for reproducing.

As a work around you can use systemctl mask pcscd to force pcscd to never start.

bob