summaryrefslogtreecommitdiff
path: root/services/incremental/IncrementalService.cpp
diff options
context:
space:
mode:
authorAlex Buynytskyy <alexbuy@google.com>2020-04-25 15:56:52 -0700
committerAlex Buynytskyy <alexbuy@google.com>2020-04-27 11:06:29 -0700
commit64067b25b1160117aca1def5889e57d78011df3e (patch)
tree8d7b762ac7e9c1e1a1813652bb3b9dfd82403be8 /services/incremental/IncrementalService.cpp
parent03a2c3833d4b872061bf83956191470abe55b241 (diff)
Fix for Binder one-way deadlock.
Dispatch session destroy to be executed later. We can't do anything blocking during one-way transaction processing. This blocks all one-way transactions to this Binder, including other status updates. Bug: b/153874006 Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest Test: atest IncrementalInstallerTest#testIncrementalInstallFails_onPrepareImageReturnsFalse Change-Id: Ie4385d603fca8b5205775e849e92846cff672f56
Diffstat (limited to 'services/incremental/IncrementalService.cpp')
-rw-r--r--services/incremental/IncrementalService.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/services/incremental/IncrementalService.cpp b/services/incremental/IncrementalService.cpp
index cae5027250e1..10368586999c 100644
--- a/services/incremental/IncrementalService.cpp
+++ b/services/incremental/IncrementalService.cpp
@@ -761,10 +761,7 @@ int IncrementalService::unbind(StorageId storage, std::string_view target) {
std::unique_lock l2(ifs->lock);
if (ifs->bindPoints.size() <= 1) {
ifs->bindPoints.clear();
- std::thread([this, ifs, l2 = std::move(l2)]() mutable {
- mJni->initializeForCurrentThread();
- deleteStorageLocked(*ifs, std::move(l2));
- }).detach();
+ deleteStorageLocked(*ifs, std::move(l2));
} else {
const std::string savedFile = std::move(bindIt->second.savedFilename);
ifs->bindPoints.erase(bindIt);