From e143c93c9c8fe582ea98febf18f0148ca0bfc6d9 Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Wed, 14 Feb 2024 11:32:53 -0600 Subject: mmc-init.sh: ensure only one udevd running Recently the following error started popping up in the journal: ``` Jan 04 07:53:25 p10bmc systemd-coredump[174]: Due to PID 1 having crashed coredump collection will now be turned off. Jan 04 07:53:25 p10bmc systemd-coredump[174]: Resource limits disable core dumping for process 76 (udevd). Jan 04 07:53:25 p10bmc systemd-coredump[174]: Process 76 (udevd) of user 0 dumped core. ``` This error during boot was disabling all coredump generation and collection on the system. After a lot of digging, it was found that we were actually running 2 instances of udevd on the system. One started by this script, and another by systemd-udevd.service. The one failing was the first one we started. It's safe to assume that running 2 instances of udevd has undefined behavior and something in more recent openbmc (or systemd) has caused this fail to start. Tested: - Confirmed BMC still boots fine and coredumps now work Change-Id: I3e4aaa82b18181f1bba62d76ff13af29437c9bb8 Signed-off-by: Andrew Geissler --- .../recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'meta-phosphor') diff --git a/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh b/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh index 295bcc1d2c..adc841304c 100644 --- a/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh +++ b/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh @@ -60,6 +60,10 @@ fi udevd --daemon udevadm trigger --type=devices --action=add udevadm settle --timeout=10 +# The real udevd will be started a bit later by systemd-udevd.service +# so kill the one we started above now that we have the needed +# devices loaded +udevadm control --exit mkdir -p $rodir if ! mount /dev/disk/by-partlabel/"$(kgetopt root=PARTLABEL)" $rodir -t ext4 -o ro; then -- cgit v1.2.3