Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ae58f439 authored by Steven Moreland's avatar Steven Moreland
Browse files

libbinder: RPC fix 'Die' race

Before this change, what would normally happen is this:

1. we connect to a server and make some calls
2. we make the Die call which returns DEAD_OBJECT
3. we send decStrong on the root binder
4. decStrong on the root binder returns a failure
5. rpcSend calls shutdownAndWait, to terminate the session

However, we actually know we should terminate the session at (2) (any
failure here indicates a serious problem). This was causing a flake
because sometimes (being a send only w/ no read), (4) would return a
success. So, we wouldn't shutdown the session.

Fixes: 200167417
Test: binderRpcTest --gtest_filter="*Die*" (on Pixel 3, repeatedly)
Test: binderRpcTest (on Pixel 3, w/ and w/o this change several times
    - this does not introduce additional failures, and failures
    are tracked by b/200173589)
Change-Id: I4894c2dd710b8cda59883c91e002b52ad67b1e26
parent c591b475
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment