Public bug reported: systemd can block forever in sd_event_run() after a ratelimit expiry callback, even though an event source is already pending. PID 1 can hit this through its mount event source and hang in the initrd.
Upstream fix: https://github.com/systemd/systemd/commit/1a60b10de9e4a3fe59a2efa3c6a58fd72c305807 https://github.com/systemd/systemd/issues/44107 Reproduced with the upstream public-API reproducer: - Ubuntu 24.04: systemd 255.4-1ubuntu8.18 - Ubuntu 26.04: systemd 259.9-0ubuntu0.1 $ apt-get install gcc pkg-config libsystemd-dev $ gcc -O2 -o repro repro.c $(pkg-config --cflags --libs libsystemd) $ ./repro HANG: sd_event_run() blocks although a defer source is pending A fixed build prints "OK: defer source dispatched" and exits 0. Ubuntu 22.04 uses systemd 249 and is not affected. The v255-stable branch does not contain the fix, so 24.04 needs a backport of 1a60b10de9e4. The fix is already in upstream v259.10, so 26.04 can take that stable update. Workaround for PID 1: SYSTEMD_DEFAULT_MOUNT_RATE_LIMIT_BURST=0. ** Affects: systemd (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2174036 Title: sd-event blocks forever after ratelimit expiry To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2174036/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
