Log when hwservicemanager is trying to lazy start.
Adding log since it is a frequent question to me from other platform
engineers.
Bug: N/A
Test: N/A
Change-Id: Iec30b22469e78ff49504bab89ab76118374ff0be
diff --git a/ServiceManager.cpp b/ServiceManager.cpp
index c274d0e..4ef3315 100644
--- a/ServiceManager.cpp
+++ b/ServiceManager.cpp
@@ -246,6 +246,14 @@
static void tryStartService(const std::string& fqName, const std::string& name) {
using ::android::base::SetProperty;
+ // The "happy path" here is starting up a service that is configured as a
+ // lazy HAL, but we aren't sure that is the case. If the service doesn't
+ // have an 'interface' entry in its .rc file OR if the service is already
+ // running, then this will be a no-op. So, for instance, if a service is
+ // deadlocked during startup, you will see this message repeatedly.
+ LOG(INFO) << "Since " << fqName << "/" << name
+ << " is not registered, trying to start it as a lazy HAL.";
+
std::thread([=] {
bool success = SetProperty("ctl.interface_start", fqName + "/" + name);