am 418af932: am 05db19bc: Merge "trigger kernel blocked stack trace on system server watchdog" into jb-mr1.1-dev
* commit '418af9323fcb2363636bf4072c230a8adebfcc86': trigger kernel blocked stack trace on system server watchdog
This commit is contained in:
@@ -39,6 +39,8 @@ import android.util.Log;
|
|||||||
import android.util.Slog;
|
import android.util.Slog;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.FileWriter;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
|
||||||
@@ -439,6 +441,16 @@ public class Watchdog extends Thread {
|
|||||||
dumpKernelStackTraces();
|
dumpKernelStackTraces();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Trigger the kernel to dump all blocked threads to the kernel log
|
||||||
|
try {
|
||||||
|
FileWriter sysrq_trigger = new FileWriter("/proc/sysrq-trigger");
|
||||||
|
sysrq_trigger.write("w");
|
||||||
|
sysrq_trigger.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
Slog.e(TAG, "Failed to write to /proc/sysrq-trigger");
|
||||||
|
Slog.e(TAG, e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
// Try to add the error to the dropbox, but assuming that the ActivityManager
|
// Try to add the error to the dropbox, but assuming that the ActivityManager
|
||||||
// itself may be deadlocked. (which has happened, causing this statement to
|
// itself may be deadlocked. (which has happened, causing this statement to
|
||||||
// deadlock and the watchdog as a whole to be ineffective)
|
// deadlock and the watchdog as a whole to be ineffective)
|
||||||
|
|||||||
Reference in New Issue
Block a user