diff options
| author | 2024-09-16 18:08:09 +0800 | |
|---|---|---|
| committer | 2024-09-18 17:10:06 +0800 | |
| commit | fc811dce48fad47086cdef64c251e3de9f463b9e (patch) | |
| tree | a7b912660fb4fdeafc9f33d7a1ba6cad5d91eafb /api/coverage/tools | |
| parent | 5268d622137059a6c0daca8a54a6481a5394a69a (diff) | |
Cancel pending launch only if its removed process wasn't attached
There could be a corner race:
Low-memory-killer kills a process which is the target process of
a launching activity. Assume binder thread T1, T2:
T1 receives binder died.
T1 sets thread null.
From AMS: handleAppDiedLocked > handleAppDiedLocked
> onCleanupApplicationRecordLSP > makeInactive
> WindowProcessController#setThread)
T2 previous activity paused triggers to resume next top activity,
then requests to start process because thread is null.
From ActivityTaskSupervisor#startSpecificActivity
T1 removes died process record.
From AMS: handleAppDiedLocked > cleanUpApplicationRecordLocked
> removeProcessNameLocked
> ATMI:onProcessRemoved
> remove launching activities
The activity removal in onProcessRemoved only focuses on handling
process which hasn't completed attach (i.e. no binder died).
Bug: 360797479
Flag: EXEMPT bugfix
Test: atest RootWindowContainerTests#testAttachApplication
Change-Id: I36484c634fa3e97194d3e60a9d33d0490051570f
Diffstat (limited to 'api/coverage/tools')
0 files changed, 0 insertions, 0 deletions