Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56a6c661 authored by Michael Wright's avatar Michael Wright
Browse files

Dump system server stack trace on watchdog failure

Change-Id: Ia70b116b789a51c4fbdd31348f127685f20f7500
parent fcafc325
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -477,6 +477,12 @@ public class Watchdog extends Thread {
            // Only kill the process if the debugger is not attached.
            if (!Debug.isDebuggerConnected()) {
                Slog.w(TAG, "*** WATCHDOG KILLING SYSTEM PROCESS: " + name);
                Slog.w(TAG, "Main thread stack trace:");
                StackTraceElement[] stackTrace = mHandler.getLooper().getThread().getStackTrace();
                for (StackTraceElement element: stackTrace) {
                    Slog.w(TAG, "\tat " + element);
                }
                Slog.w(TAG, "<End of main thread stack trace>");
                Process.killProcess(Process.myPid());
                System.exit(10);
            } else {