Thanks Viktor, your explanation matches what we observed very well.

Unfortunately I had already rebooted the VM before seeing your latest
comment, so I could no longer run the generator loop in the failed
state.

I have now run the generator test on the healthy system as a baseline.
All generators completed within 5 seconds, including the two main
suspects:

```
rpc-pipefs-generator... ok
systemd-fstab-generator... ok
```

So there is no permanent generator failure on the freshly rebooted
system. If the problem occurs again, I will run the same loop
immediately while the root SSH session is still available and compare
the result with this baseline.

I also enabled systemd debug logging and ran a controlled:

```
systemctl daemon-reload
```

The reload completed normally on the healthy system. I then restored the
log level to `info`.

One potentially relevant detail regarding remote filesystems: the only
network filesystem mounted on this VM is an NFSv4.1 export provided by a
Windows server. We use the same Windows NFSv4.1 server/export mechanism
on several Ubuntu 22.04 servers without seeing this issue there.

The VM itself was not rebooted during the Hyper-V cluster maintenance.
It was only live-migrated between cluster nodes the previous evening. At
the time of the failure, the guest had been up for almost 15 days.

I have also added:

```
$nrconf{systemctl_reexec} = 0;
```

to `/etc/needrestart/needrestart.conf` to avoid additional reexecs
initiated by needrestart. As you pointed out, this would not have
prevented the libc6 case because libc6.postinst invokes `systemctl
daemon-reexec` directly.

One additional observation: after PID 1 had entered the frozen state,
Hyper-V also had difficulties restarting/shutting down the guest
cleanly. I do not know yet whether this was simply a consequence of the
frozen systemd or whether Hyper-V contributed independently, so I
mention it only as an observation.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2165295

Title:
  systemd freezes after daemon-reexec triggered by unattended-upgrades /
  needrestart on Ubuntu 24.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2165295/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to