Browse files

hung task debugging: Inject NMI when hung and going to panic

Send an NMI to all CPUs when a hung task is detected and the hung
task code is configured to panic. This gives us a fairly uptodate
snapshot of all CPUs in the system.

This lets us get stack trace of all CPUs which makes life easier
trying to debug a deadlock, and the NMI doesn't change anything
since the next step is a kernel panic.

Signed-off-by: Sasha Levin <>
Cc: Linus Torvalds <>
Cc: Andrew Morton <>
[ extended the changelog a bit ]
Signed-off-by: Ingo Molnar <>
  • Loading branch information...
1 parent af3a3ab commit 625056b65ee9a8b4caf42136e0c844c15e6ec54f @sashalevin sashalevin committed with Ingo Molnar Mar 15, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 kernel/hung_task.c
4 kernel/hung_task.c
@@ -108,8 +108,10 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout)
- if (sysctl_hung_task_panic)
+ if (sysctl_hung_task_panic) {
+ trigger_all_cpu_backtrace();
panic("hung_task: blocked tasks");
+ }

0 comments on commit 625056b

Please sign in to comment.