From 9174a9bff826efd42f3e69cc193fc84b74c5c3fc Mon Sep 17 00:00:00 2001 From: Tom Cherry Date: Tue, 31 Mar 2020 14:36:03 -0700 Subject: [PATCH] init: only print backtraces on subsequent reboots with a value Userspace reboot resets sys.powerctl to an empty string once it starts, which was inadvertently triggering the backtrace of the main init thread. Test: no more unexpected backtraces Change-Id: I35d6f1b37aa31a46ae9266647f41a709f28b6099 --- init/property_service.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init/property_service.cpp b/init/property_service.cpp index 1e4e127f9..655b8deef 100644 --- a/init/property_service.cpp +++ b/init/property_service.cpp @@ -489,7 +489,9 @@ uint32_t HandlePropertySet(const std::string& name, const std::string& value, } LOG(INFO) << "Received sys.powerctl='" << value << "' from pid: " << cr.pid << process_log_string; - DebugRebootLogging(); + if (!value.empty()) { + DebugRebootLogging(); + } } // If a process other than init is writing a non-empty value, it means that process is