🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #4233

Bug#1153800: systemd: sd-event can block forever after ratelimit expiry

#4233
From: Xinlong Chen
Date: Thu, 12 Nov 2026 07:10
31 lines
3761 bytes
Package: systemd
Version: 257.13-1~deb13u1
Severity: important
Tags: upstream

systemd's sd-event loop can ignore already-pending event sources after a
ratelimit expiry callback and then block forever in epoll_wait(). PID 1 can
hit this through its mount event source and hang in the initrd.

This is fixed upstream by 1a60b10de9e4 ("sd-event: fix hang after ratelimit
expiry"):
https://github.com/systemd/systemd/commit/1a60b10de9e4a3fe59a2efa3c6a58fd72c305807
https://github.com/systemd/systemd/issues/44107

The fix is not present on the v252-stable or v257-stable branches. Both
current Debian packages reproduce it deterministically:

- bookworm: systemd 252.39-1~deb12u2
- trixie: systemd 257.13-1~deb13u1

Reproducer from the upstream issue, using only the public libsystemd API:

$ 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.

Workaround for PID 1: set SYSTEMD_DEFAULT_MOUNT_RATE_LIMIT_BURST=0 on the
kernel command line or through ManagerEnvironment= in the initrd.
Technical Details
Message-ID: <NYx6x-bnPE-3@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Xinlong Chen <xinlongchen01@gmail.com>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1153800: systemd: sd-event can block forever after ratelimit expiry
Date: Thu, 12 Nov 2026 08:10:01 +0100
Message-ID: <NYx6x-bnPE-3@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Thu Nov 12 07:07:14 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -0.297
Reply-To: Xinlong Chen <xinlongchen01@gmail.com>, 1153800@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: pkg-systemd-maintainers@lists.alioth.debian.org
X-Debian-Pr-Message: report 1153800
X-Debian-Pr-Package: systemd
X-Debian-Pr-Keywords: upstream
X-Debian-Pr-Source: systemd
X-Gm-Message-State: APuU4Z95j72sLbRrJjRsE6AzOP5I8qUaN0Hcf0xK7bMimf4nRTIVal+g
	uywdz994czCggu7uTOwvTXRyDdt02pME8UrrvmY9BxKm0xliBmgJAid5BC09aaUbLkY=
X-Gm-Gg: AYBFou3TmAiZ7IAP6jxTXj8GjQIGPg7PeJ5zl76h5I6HM85A0em0mPUxJbA2/hPkLpU
	HHqDtPsMIk68GCUHiI7oGIBZeVcZRwsbL03sQjPUS+Ph2cncolQhdJTceSm4yfUDgspA4Jgch8C
	cXZAlwMFB+Ji4rpWTPRK3SjJbDTvvTxxiMOiJ9BsDqUjxS8382wvm7pKqru03KDNnjv2PJqRK2g
	vRAuHxlbPTxzwyAYcwhZr8zJN1oOPREPHm/jIAl2zS1r5TblPWXAK5+oB+fr0YCHn31FTlicZD3
	CGs7Za8jaS0nP75SVsXvYIrFOdPfxkP9RlDnhFm3MhXrd+U5Tnwq886kdJylNeFKCCTZklTv1vk
	wWzAWo94lwyeELhA3bVfAENw6Z4xY0hC4jXyZ8NuEK8f5hkpOERD0CsYoTyGLFzBLZ3Ux2qA6S6
	P+bYWFbve0NpgJAU1xh0i5R2+VwEaSKSIyOVyJJy8S9PduV2X91rwbgEHPgIbrsrle5Sgc4onmm
	X4vSRqr3yKX5O4tQoT+YQ7jt016r889eF5OQNA+v/Rn5SshtcbfvJi5U6khusa5ci5TysYdTMtH
	56lfBcFXj1UireIHRrpBs2pPDY6mxKp+QxlWNF4MhePfCAa8i1bTMQTvmT2zXyrlaSwDGp0ZSGR
	i/odq71HnWuk=
X-Received: by 2002:a05:6a00:2da1:b0:899:27b5:214e with SMTP id d2e1a72fcca58-8bc1c1b06f4mr4213177b3a.30.1794467049325;
        Wed, 11 Nov 2026 23:04:09 -0800 (PST)
X-Mailer: git-send-email 2.43.7
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2002174
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 31
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Cc: xinlongchen@tencent.com
X-Original-Date: Thu, 12 Nov 2026 15:04:05 +0800
X-Original-Message-ID: <20261112070405.1725162-1-xinlongchen01@gmail.com>