From fd9ee2e131c5972b7dbd0c823d0f166c1af0936d Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Mon, 12 Jul 2021 11:47:39 +0200 Subject: Don't use LOG() in code that runs post-fork. To prevent deadlocks. Bug: 188393100 Test: N/A Change-Id: Icf7a04c8f9d244b7bdd94b2111f41ce489d39302 Merged-In: Icf7a04c8f9d244b7bdd94b2111f41ce489d39302 --- cmds/installd/dexopt.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cmds/installd/dexopt.cpp') 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; -- cgit v1.2.3-59-g8ed1b