Re: [PATCH 2/2] cgroup-v2/freezer: Print information about unfreezable process

From: Tejun Heo
Date: Mon Dec 29 2025 - 12:39:27 EST


Hello,

On Mon, Dec 29, 2025 at 01:32:11PM +0800, Pavel Tikhomirov wrote:
> > This is only suitable for debugging, and, for that, this can be done from
> > userspace by walking the tasks and check /proc/PID/wchan. Should be
> > do_freezer_trap for everything frozen. If something is not, read and dump
> > its /proc/PID/stack. Wouldn't that work?
>
> Yes, I think that will do, Thanks.
>
> Though the trace printing in /proc/PID/stack is a bit less informative
> than show_stack(), e.g. for my test module
> (https://github.com/Snorch/proc-hang-module) the stack in /proc/PID/stack
> will be just empty. (I guess it has to do with the fact that you need less
> privileges to read /proc/PID/stack than dmesg, so you can do a more
> informative thing in dmesg).

You can use drgn, bpftrace or any other bpf tools to read way more detailed
backtraces.

Thanks.

--
tejun