From c59b822d1f6705aad7c00b9a9a98d4f60d979fdc Mon Sep 17 00:00:00 2001 From: Keun-young Park Date: Tue, 18 Jul 2017 18:52:25 -0700 Subject: [PATCH] dump stack before kill all - If problematic process is from user, kill all kills it and dump does not show problematic process. bug: 37737296 Test: reboot and check log Change-Id: Iaa4f7d12f5a40fa7528c6672567c36e30b140372 --- init/reboot.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init/reboot.cpp b/init/reboot.cpp index 8196d58ed..30a845cea 100644 --- a/init/reboot.cpp +++ b/init/reboot.cpp @@ -323,11 +323,11 @@ static UmountStat TryUmountAndFsck(bool runFsck, std::chrono::milliseconds timeo UmountStat stat = UmountPartitions(timeout - t.duration()); if (stat != UMOUNT_STAT_SUCCESS) { LOG(INFO) << "umount timeout, last resort, kill all and try"; - if (DUMP_ON_UMOUNT_FAILURE) DumpUmountDebuggingInfo(false); + if (DUMP_ON_UMOUNT_FAILURE) DumpUmountDebuggingInfo(true); KillAllProcesses(); // even if it succeeds, still it is timeout and do not run fsck with all processes killed - UmountPartitions(0ms); - if (DUMP_ON_UMOUNT_FAILURE) DumpUmountDebuggingInfo(true); + UmountStat st = UmountPartitions(0ms); + if ((st != UMOUNT_STAT_SUCCESS) && DUMP_ON_UMOUNT_FAILURE) DumpUmountDebuggingInfo(false); } if (stat == UMOUNT_STAT_SUCCESS && runFsck) {