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

Commit 475fe218 authored by Michael Wright's avatar Michael Wright Committed by Android (Google) Code Review
Browse files

Merge "Dump system server stack trace on watchdog failure"

parents 7abc275e 56a6c661
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 {