Skip to content
Commit f3925cbf authored by Li Li's avatar Li Li
Browse files

Freezer: fix binder race

As there isn't an atomic operation to freeze the main thread and binder
threads altogether, it's possible the main thread initiates a new binder
transaction while the binder threads are already frozen. This race issue
will result in failed binder transaction and unexpectedly kill the app.

Fix it by rescheduling the ongoing freezing opeartion if there's already
an outstanding binder trasaction or new pending binder transactions. At
the same time, treat the REPLY transactions of those pending ones the
same way as an oneway transaction so that it can successfully reach the
frozen process, preventing it from being killed.

Bug: 198493121
Test: app launch/foreground/background stress test
Change-Id: I1009fa33edbd2b1db14cf51b598f5869d41ee6b6
parent 24ccad0b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment