[Bug 1876018] Re: 40-vm-hotadd.rules attempts to set non-existent sysfs parameters
Dan Streetman
1876018 at bugs.launchpad.net
Wed Jul 22 18:51:47 UTC 2020
focal:
with the reproducer hack from the description (comment out the 'goto'
line in the udev rule), and the system rebooted:
ubuntu at lp1876018-f:~$ dpkg -l systemd|grep systemd
ii systemd 245.4-4ubuntu3.1 amd64 system and service manager
ubuntu at lp1876018-f:~$ journalctl -g vm-hotadd
-- Logs begin at Wed 2020-07-22 18:11:53 UTC, end at Wed 2020-07-22 18:46:23 UTC. --
Jul 22 18:45:15 lp1876018-f sudo[12380]: ubuntu : TTY=ttyS0 ; PWD=/home/ubuntu ; USER=root ; COMMAND=/usr/bin/vi /lib/udev/rules.d/40-vm-hotadd.rules
-- Reboot --
Jul 22 18:45:48 lp1876018-f systemd-udevd[457]: memory0: /usr/lib/udev/rules.d/40-vm-hotadd.rules:9 Failed to write ATTR{/sys/devices/system/memory/memory0/state}, ignoring: Invalid argument
Jul 22 18:45:48 lp1876018-f systemd-udevd[457]: memory1: /usr/lib/udev/rules.d/40-vm-hotadd.rules:9 Failed to write ATTR{/sys/devices/system/memory/memory1/state}, ignoring: Invalid argument
Jul 22 18:45:48 lp1876018-f systemd-udevd[457]: memory10: /usr/lib/udev/rules.d/40-vm-hotadd.rules:9 Failed to write ATTR{/sys/devices/system/memory/memory10/state}, ignoring: Invalid argument
...(many more)...
and with the udev rule again edited after the systemd upgrade (since it
replaces the edited file), and the system rebooted:
ubuntu at lp1876018-f:~$ dpkg -l systemd|grep systemd
ii systemd 245.4-4ubuntu3.2 amd64 system and service manager
ubuntu at lp1876018-f:~$ journalctl -b -g vm-hotadd
-- Logs begin at Wed 2020-07-22 18:11:53 UTC, end at Wed 2020-07-22 18:50:00 UT>
-- No entries --
** Tags removed: verification-needed verification-needed-focal
** Tags added: verification-done verification-done-focal
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1876018
Title:
40-vm-hotadd.rules attempts to set non-existent sysfs parameters
Status in systemd package in Ubuntu:
Fix Released
Status in systemd source package in Xenial:
In Progress
Status in systemd source package in Bionic:
In Progress
Status in systemd source package in Focal:
Fix Committed
Bug description:
[impact]
40-vm-hotadd.rules unconditionally tries onlining memory, which
results in logged error messages if the memory is already online
[test case]
since this rules file restricts operation to only hyper-v or xen
guests, boot a hyper-v or xen vm guest, and check for logged error
msgs like:
Apr 29 22:36:46 focal01 systemd-udevd[266]: memory7:
/usr/lib/udev/rules.d/40-vm-hotadd.rules:9 Failed to write
ATTR{/sys/devices/system/memory/memory7/state}, ignoring: Invalid
argument
alternately, to test on a vm guest other than hyper-v or xen,
comment/remove the 'GOTO="vm_hotadd_end"' line from the rules file and
reboot.
[regression potential]
as this adds a check before attempting to online memory for hyper-v
and xen vm guests, any regression would likely involve failure to
correctly online all memory on those guest platforms.
[scope]
this rule has been around for a long time, so is needed for x/b/f/g.
[original description]
In focal, udev's 40-vm-hotadd.rules (from debian/extra/rules-ubuntu)
tries to write to invalid (as of 5.4.0-1010-azure) sysfs nodes
resulting in warnings such as:
Apr 29 22:36:46 focal01 systemd-udevd[266]: memory7:
/usr/lib/udev/rules.d/40-vm-hotadd.rules:9 Failed to write
ATTR{/sys/devices/system/memory/memory7/state}, ignoring: Invalid
argument
Perhaps 40-vm-hotadd.rules needs to be updated for 5.4 semantics,
removed, or something else. This behavior is present on systems
upgraded from 18.04 (via d-r-u) as well as new focal systems, upon
first reboot of the VM.
udev: 245.4-4ubuntu3
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1876018/+subscriptions
More information about the foundations-bugs
mailing list