Bug 26990 - systemd-udevd : rtc0: Process '/sbin/hwclock --systz --rtc=/dev/rtc0' failed with exit code 1.
Summary: systemd-udevd : rtc0: Process '/sbin/hwclock --systz --rtc=/dev/rtc0' failed ...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL: http://gitweb.mageia.org/software/for...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-23 10:28 CEST by Aurelien Oudelet
Modified: 2020-07-24 23:37 CEST (History)
1 user (show)

See Also:
Source RPM: systemd-245.6-3.mga8.src.rpm, initscripts-9.78-16.mga8
CVE:
Status comment:


Attachments

Description Aurelien Oudelet 2020-07-23 10:28:30 CEST
Description of problem:
Each system boot, I can see this warning level message:
systemd-udevd[584]: rtc0: Process '/sbin/hwclock --systz --rtc=/dev/rtc0' failed with exit code 1.

How reproducible: Always

Steps to Reproduce:
1. Install Mageia (Cauldron), Classical ISO
2. Boot
3. See message in "journalctl -b -p warning"

Therefore, RTC clock is UTC, as recommended upstream. No Windows dual-boot installation.
Clock in UEFI Bios is correct and also in panel after boot.

Don't know why this complain.
My 2 systems are affected.
Comment 1 Olav Vitters 2020-07-23 11:42:56 CEST
For me the command actually works if I run it myself as root. Is that the same for you?

CC: (none) => olav

Comment 2 Aurelien Oudelet 2020-07-23 12:08:06 CEST
Yes it runs fine if I do this command as root, in a console after boot.

This only happens when system is booting and you can see this warning reported with journalctl -b -p warning
Comment 3 Olav Vitters 2020-07-23 14:03:01 CEST
Likely culprit is /usr/lib/udev/rules.d/88-clock.rules, from initscripts-9.78-16.mga8

TEST=="/sys/fs/cgroup/systemd", GOTO="clock_end"
ACTION=="add", SUBSYSTEM=="rtc", ATTR{hctosys}=="1", RUN+="/sbin/hwclock --systz --rtc=/dev/%k"
ACTION=="add", SUBSYSTEM=="rtc", ATTR{hctosys}=="0", RUN+="/sbin/hwclock --hctosys --rtc=/dev/%k"
ACTION=="add", ENV{MAJOR}=="10", ENV{MINOR}=="135", RUN+="/sbin/hwclock --hctosys --rtc=/dev/%k"
LABEL="clock_end"

Source RPM: systemd-245.6-3.mga8.src.rpm => systemd-245.6-3.mga8.src.rpm, initscripts-9.78-16.mga8

Comment 4 Olav Vitters 2020-07-23 14:16:29 CEST
Seems this is there when booting without systemd. See:
http://gitweb.mageia.org/software/forks/initscripts/commit/udev/rules.d/88-clock.rules?h=distro/mga&id=3534f83a02a72392adfa2343e5b858d0af0febe7
https://bugs.mageia.org/show_bug.cgi?id=3512

Mageia added it back. There's a check if systemd is running, but it broke. I guess we're running cgroups2 now. Simplest solution is to just drop the patch.

I do wonder if there are other checks such as /sys/fs/cgroup/systemd that broke.

URL: (none) => http://gitweb.mageia.org/software/forks/initscripts/commit/udev/rules.d/88-clock.rules?h=distro/mga&id=3534f83a02a72392adfa2343e5b858d0af0febe7
See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=3512

Comment 5 Olav Vitters 2020-07-23 15:17:01 CEST
Instead of checking for /sys/fs/cgroup/systemd, usually the check is for /run/systemd/system. If that directory exists, distro has booted with systemd. Currently figuring out how to just takeout the commit from our fork.
Comment 6 Olav Vitters 2020-07-24 23:37:11 CEST
I've pushed initscripts-9.78-17.mga8 with a quick fix. For now it just removes the file in the spec. I've also updated the Mageia initscripts fork.
Comment 7 Olav Vitters 2020-07-24 23:37:26 CEST
forgot to mark it fixed

Status: NEW => RESOLVED
Resolution: (none) => FIXED


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