summaryrefslogtreecommitdiff
path: root/cmds/installd/dexopt.cpp
diff options
context:
space:
mode:
author Martijn Coenen <maco@google.com> 2021-07-12 11:47:39 +0200
committer Martijn Coenen <maco@google.com> 2021-07-13 11:11:08 +0200
commitfd9ee2e131c5972b7dbd0c823d0f166c1af0936d (patch)
tree17511d2364a5642a316232e2b995d1cce8777457 /cmds/installd/dexopt.cpp
parent10d57c6cfa946d7c87fe4aa51a137865f01fdb0a (diff)
Don't use LOG() in code that runs post-fork.
To prevent deadlocks. Bug: 188393100 Test: N/A Change-Id: Icf7a04c8f9d244b7bdd94b2111f41ce489d39302 Merged-In: Icf7a04c8f9d244b7bdd94b2111f41ce489d39302
Diffstat (limited to 'cmds/installd/dexopt.cpp')
-rw-r--r--cmds/installd/dexopt.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmds/installd/dexopt.cpp b/cmds/installd/dexopt.cpp
index cd5c36f68d..5f2e3f91b5 100644
--- a/cmds/installd/dexopt.cpp
+++ b/cmds/installd/dexopt.cpp
@@ -1379,10 +1379,12 @@ static SecondaryDexAccess check_secondary_dex_access(const std::string& dex_path
return kSecondaryDexAccessReadOk;
} else {
if (errno == ENOENT) {
- LOG(INFO) << "Secondary dex does not exist: " << dex_path;
+ async_safe_format_log(ANDROID_LOG_INFO, LOG_TAG,
+ "Secondary dex does not exist: %s", dex_path.c_str());
return kSecondaryDexAccessDoesNotExist;
} else {
- PLOG(ERROR) << "Could not access secondary dex " << dex_path;
+ async_safe_format_log(ANDROID_LOG_ERROR, LOG_TAG,
+ "Could not access secondary dex: %s (%d)", dex_path.c_str(), errno);
return errno == EACCES
? kSecondaryDexAccessPermissionError
: kSecondaryDexAccessIOError;