File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
services/java/com/android/server Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 3939import android .util .Slog ;
4040
4141import java .io .File ;
42+ import java .io .FileWriter ;
43+ import java .io .IOException ;
4244import java .util .ArrayList ;
4345import java .util .Calendar ;
4446
@@ -439,6 +441,16 @@ public void run() {
439441 dumpKernelStackTraces ();
440442 }
441443
444+ // Trigger the kernel to dump all blocked threads to the kernel log
445+ try {
446+ FileWriter sysrq_trigger = new FileWriter ("/proc/sysrq-trigger" );
447+ sysrq_trigger .write ("w" );
448+ sysrq_trigger .close ();
449+ } catch (IOException e ) {
450+ Slog .e (TAG , "Failed to write to /proc/sysrq-trigger" );
451+ Slog .e (TAG , e .getMessage ());
452+ }
453+
442454 // Try to add the error to the dropbox, but assuming that the ActivityManager
443455 // itself may be deadlocked. (which has happened, causing this statement to
444456 // deadlock and the watchdog as a whole to be ineffective)
You can’t perform that action at this time.
0 commit comments