Re: [PATCH] hung_task: Skip hung task detection during core dump operations
From: Google
Date: Thu Aug 14 2025 - 02:59:30 EST
On Wed, 13 Aug 2025 15:01:55 -0700
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, 13 Aug 2025 11:30:36 -0700 "Nanji Parmar (he/him)" <nparmar@xxxxxxxxxxxxxxx> wrote:
>
> > Tasks involved in core dump operations can legitimately block for
> > extended periods, especially for large memory processes. The hung
> > task detector should skip tasks with PF_DUMPCORE (main dumping
> > thread) or PF_POSTCOREDUMP (other threads in the group) flags to
> > avoid false positive warnings.
> >
> > This prevents incorrect hung task reports during legitimate core
> > dump generation that can take xx minutes for large processes.
>
> It isn't pleasing to be putting coredump special cases into the core of
> the hung-task detector. Perhaps the hung task detector should get an
> equivalent to touch_softlockup_watchdog(). I'm surprised it doesn't
> already have such a thing. Maybe it does and I've forgotten where it is.
Hmm, maybe we can increase nvcsw/nivcsw to reset the hung task checker.
But usually this means the task does context switch while core-dump.
>
> Please provide a full description of the problem, mainly the relevant
> dmesg output. Please always provide this full description when
> addressing kernel issues, thanks.
+1, dmesg will show where (in kernel) we hit the hung_task during core dump.
Thanks,
--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>