From aea8b250d69e064fc4f1393c004cff4ba9d9ee25 Mon Sep 17 00:00:00 2001 From: Remi NGUYEN VAN Date: Mon, 4 Oct 2021 02:37:57 +0000 Subject: [PATCH] Improve "Lost network stack" error message The "Lost network stack" message often gets reported as suspected root cause of a crash, but it is actually just a side-effect of a crash of the network_stack process, which often was just killed together with the rest of the system. Clarify the error message, so that it is clear that the root cause should be visible earlier in logs. Bug: 198681439 Change-Id: Ieb79ace34170f8bd9ea847175199590998278d57 Test: m --- .../net/java/android/net/ConnectivityModuleConnector.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/net/java/android/net/ConnectivityModuleConnector.java b/services/net/java/android/net/ConnectivityModuleConnector.java index 62f2c35f339b4..c6b15c17bd3ca 100644 --- a/services/net/java/android/net/ConnectivityModuleConnector.java +++ b/services/net/java/android/net/ConnectivityModuleConnector.java @@ -278,7 +278,10 @@ public class ConnectivityModuleConnector { // This code path is only run by the system server: only the system server binds // to the NetworkStack as a service. Other processes get the NetworkStack from // the ServiceManager. - maybeCrashWithTerribleFailure("Lost network stack", mPackageName); + maybeCrashWithTerribleFailure( + "Lost network stack. This is not the root cause of any issue, it is a side " + + "effect of a crash that happened earlier. Earlier logs should point to the " + + "actual issue.", mPackageName); } }