Allow AppExitInfoTracker to have multiple ExitInfos per pid.
Currently the AppExitInfoTracker only allows a single
ApplicationExitInfo entry per pid. This caused some problems with
Recoverable GWP-ASan, where we'd report a native crash from Recoverable
GWP-ASan, that would end up in the AppExitInfoTracker, then the process
would die of other causes (or natural causes) for the same pid, and the
GWP-ASan data would get lost. This was fixed in aosp/2520518 by having a
separate tracking database specifically for Recoverable GWP-ASan
crashes.
Unfortunately that didn't fix the whole problem. For regular GWP-ASan,
where the process actually does crash, there's still an outstanding
issue where an app will encounter a native crash in a test, and there's
a race condition where the AppExitInfoTracker will receive the
"instrumentation finished" from the test, and overwrite the regular
GWP-ASan crash.
To support recoverable GWP-ASan, and to avoid this race with regular
GWP-ASan, I've modified the container to allow multiple AppExitInfos per
pid.
Bug: 286667521
Test: Boot the device, atest CtsGwpAsanTestCases --iterations=10,
atest ApplicationExitInfoTest.
Change-Id: Ifd73d0b5e4bde8bf87caed0aee51291cc6be8d32
3 files changed