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 1748053

Summary: Rules in 40-redhat.rules file for SUBSYSTEM==memory are suboptimal and may lead to timing issues
Product: Red Hat Enterprise Linux 8 Reporter: Renaud Métrich <rmetrich>
Component: systemdAssignee: Jan Synacek <jsynacek>
Status: CLOSED DUPLICATE QA Contact: Frantisek Sumsal <fsumsal>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.1CC: aklimov, msekleta, systemd-maint-list
Target Milestone: rcFlags: msekleta: mirror+
Target Release: 8.0   
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: 2019-12-03 08:57:11 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 2019-09-02 14:51:28 UTC
This bug was initially created as a copy of Bug #1748051

I am copying this bug because: it may affect RHEL8 as well



Description of problem:

The /lib/udev/rules.d/40-redhat.rules file defines the following rules for "memory" subsystem:

-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
# Memory hotadd request
SUBSYSTEM!="memory", GOTO="memory_hotplug_end"
ACTION!="add", GOTO="memory_hotplug_end"
PROGRAM="/bin/uname -p", RESULT=="s390*", GOTO="memory_hotplug_end"
PROGRAM="/bin/uname -p", RESULT=="ppc64*", GOTO="memory_hotplug_end"

ENV{.state}="online"
PROGRAM="/bin/systemd-detect-virt", RESULT=="none", ENV{.state}="online_movable"
ATTR{state}=="offline", ATTR{state}="$env{.state}"

LABEL="memory_hotplug_end"

-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

On system that have many Memory devices (in some cases, I can see up to 1000 or 12000 memory devices!!!), these rules will spawn tons of "uname -p" / "systemd-detect-virt" processes which will kill the system.

This issue affects multiple packages as well, for example trace-cmd ("/lib/udev/rules.d/98-trace-cmd.rules") and kexec-tools ("/lib/udev/rules.d/98-kexec.rules").


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

systemd-udev-239-17.el8


How reproducible:

Always


Steps to Reproduce:
1. Enable debugging in udev: "udev.log-priority=debug" while booting

2. Check the number of times a command executed

  # journalctl -b | egrep '(PROGRAM|RUN)' | cut -f2- -d"'" | sort | uniq -c | sort -nr


Actual results:

    127 kmod load $env{MODALIAS}' /usr/lib/udev/rules.d/80-drivers.rules:5
     32 /bin/uname -p' /usr/lib/udev/rules.d/40-redhat.rules:9
     32 /bin/uname -p' /usr/lib/udev/rules.d/40-redhat.rules:10
     32 /bin/systemd-detect-virt' /usr/lib/udev/rules.d/40-redhat.rules:13
    ...

Expected results:

  1 call to "systemd-detect-virt"
  1 call to "uname -p", not 64 calls

Additional info:

This was observed on a system with 16 memory devices (2GB VM with 1 CPU).
Additionally, for some reason, rules execute twice as much as on RHEL7 for same number of memory devices.
On large physical systems, it can be just crazy.

Comment 1 Jan Synacek 2019-12-03 08:57:11 UTC
It seems that we went a little bit overboard with duplicating bugs.

*** This bug has been marked as a duplicate of bug 1762679 ***