aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorPaul E. McKenney <[email protected]>2024-07-24 16:51:52 -0700
committerPaul E. McKenney <[email protected]>2024-08-02 10:55:04 -0700
commitb8e753128ed074fcb48e9ceded940752f6b1c19f (patch)
tree765af0cb8e48088f8ea1ed2c0d8a5137dd34741d /tools/perf/util/scripting-engines/trace-event-python.c
parent8400291e289ee6b2bf9779ff1c83a291501f017b (diff)
exit: Sleep at TASK_IDLE when waiting for application core dump
Currently, the coredump_task_exit() function sets the task state to TASK_UNINTERRUPTIBLE|TASK_FREEZABLE, which usually works well. But a combination of large memory and slow (and/or highly contended) mass storage can cause application core dumps to take more than two minutes, which can cause check_hung_task(), which is invoked by check_hung_uninterruptible_tasks(), to produce task-blocked splats. There does not seem to be any reasonable benefit to getting these splats. Furthermore, as Oleg Nesterov points out, TASK_UNINTERRUPTIBLE could be misleading because the task sleeping in coredump_task_exit() really is killable, albeit indirectly. See the check of signal->core_state in prepare_signal() and the check of fatal_signal_pending() in dump_interrupted(), which bypass the normal unkillability of TASK_UNINTERRUPTIBLE, resulting in coredump_finish() invoking wake_up_process() on any threads sleeping in coredump_task_exit(). Therefore, change that TASK_UNINTERRUPTIBLE to TASK_IDLE. Reported-by: Anhad Jai Singh <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Acked-by: Oleg Nesterov <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Christian Brauner <[email protected]> Cc: Andrew Morton <[email protected]> Cc: "Matthew Wilcox (Oracle)" <[email protected]> Cc: Chris Mason <[email protected]> Cc: Rik van Riel <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions