OSDN Git Service

Don't call into pkg mgr svc w/ lock held
authorTodd Kennedy <toddke@google.com>
Mon, 8 Aug 2016 22:17:43 +0000 (15:17 -0700)
committerTodd Kennedy <toddke@google.com>
Tue, 9 Aug 2016 19:36:44 +0000 (12:36 -0700)
commitf29d07a62a78f73a21d649f6737992c267d6f170
treefc3e9c85ec8990f2590de19cd52dfdbc0db567b3
parent67abc837af97e887477a60fff58821df99f84c72
Don't call into pkg mgr svc w/ lock held

In general, there's no reason to hold the lock when calling into external
components. However, in practice, this can deadlock. When dumping its
state, Package Manager Service holds a lock while it calls into other
packages to dump their state. These other packages (such as Package
Installer Session) typically take their own lock to dump coherent state.
And, thus, a deadlock.

Bug: 30419998
Change-Id: I0807b8742316d084e381be8721d1b3d41143b82c
services/core/java/com/android/server/pm/PackageInstallerSession.java