Bug 2003712

Summary: Tons of messages "Failed to stat() device node /dev/asm/XXX: Permission denied" generated frequently
Product: Red Hat Enterprise Linux 8 Reporter: Renaud Métrich <rmetrich>
Component: systemdAssignee: David Tardon <dtardon>
Status: CLOSED MIGRATED QA Contact: Frantisek Sumsal <fsumsal>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.4CC: dtardon, msekleta, systemd-maint-list
Target Milestone: rcKeywords: Improvement, MigratedToJIRA, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-21 11:14:06 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 Renaud Métrich 2021-09-13 13:57:25 UTC
Description of problem:

A customer running Oracle ASM sees tons of the following messages:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
systemd[SOMEPID]: Failed to stat() device node file /dev/asm/XXX: Permission denied
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

These messages are due to "systemd --user" instances not being able to stat the device node, because /dev/asm directory has not the read/exec permissions for "others":
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
# ls -ld /dev/asm
drwxrwx---   2   0 oraadmin      980 Sep  3 14:46 asm
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

When such device (e.g. /dev/asm/XXX) is a mount point, the "systemd --user" instances complain in the following piece of code:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
 994 static int validate_node(Manager *m, const char *node, struct udev_device **ret) {
 :
1010         if (stat(node, &st) < 0) {
1011                 if (errno != ENOENT)
1012                         return log_error_errno(errno, "Failed to stat() device node file %s: %m", node);
 :
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

The message is printed every time a mount changes in /proc/self/mountinfo, which is not rare at all.


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

systemd-239 and Upstream


How reproducible:

Always


Steps to Reproduce:
1. Change permissions on /dev/mapper

  # chmod 750 /dev/mapper

2. Login as a user

Actual results:

systemd[26327]: Failed to stat() device node file /dev/mapper/rhel-root: Permission denied


Expected results:

No error if issue is "cosmetic" for the "systemd --user" instance.

Comment 1 RHEL Program Management 2023-09-21 11:08:28 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 2 RHEL Program Management 2023-09-21 11:14:06 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.