Re: [Kernel Bug] INFO: task hung in cgroup_drain_dying

From: Longxing Li

Date: Mon Jun 22 2026 - 09:58:31 EST


Hi Michal,
Thank you for the reply.
We will check this problem on the latest kernel to see if it's been
fixed, and will report back if we find any more valuable things to
discuss.

Best regards,
Longxing Li

Michal Koutný <mkoutny@xxxxxxxx> 于2026年6月10日周三 21:28写道:
>
> On Wed, Jun 10, 2026 at 03:11:41PM +0800, Longxing Li <coregee2000@xxxxxxxxx> wrote:
> > sorry for not containing full information in last email. the config[1]
> > and report[2] are as follows. CONFIG_PROVE_LOCKING is not enabled in
> > our config.
>
> Thanks.
>
> > INFO: task systemd:1 blocked for more than 143 seconds.
> > Not tainted 7.0.6 #1
> > "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
> > task:systemd state:D stack:20616 pid:1 tgid:1 ppid:0
> > task_flags:0x400100 flags:0x00080001
> > Call Trace:
> > <TASK>
> > context_switch kernel/sched/core.c:5298 [inline]
> > __schedule+0x1006/0x5f00 kernel/sched/core.c:6911
> > __schedule_loop kernel/sched/core.c:6993 [inline]
> > schedule+0xe7/0x3a0 kernel/sched/core.c:7008
> > cgroup_drain_dying+0x1ed/0x360 kernel/cgroup/cgroup.c:6294
> > cgroup_rmdir+0x38/0x300 kernel/cgroup/cgroup.c:6309
> > kernfs_iop_rmdir+0x10a/0x180 fs/kernfs/dir.c:1311
> > vfs_rmdir fs/namei.c:5344 [inline]
> > vfs_rmdir+0x340/0x860 fs/namei.c:5317
> > filename_rmdir+0x3be/0x510 fs/namei.c:5399
> > __do_sys_rmdir fs/namei.c:5422 [inline]
> > __se_sys_rmdir fs/namei.c:5419 [inline]
> > __x64_sys_rmdir+0x47/0x90 fs/namei.c:5419
> > do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
> > do_syscall_64+0x11b/0xf80 arch/x86/entry/syscall_64.c:94
> > entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
> Hm, hm, this kinds fits 93618edf75383 ("cgroup: Defer css percpu_ref
> kill on rmdir until cgroup is depopulated")
> which got into stable 7.0.9.
> Can you reproduce even with that (or newer) kernel?
>
> Michal