Run ActivateSharedLibsPackage sequentially
During boot apexd activates all APEX packages (including APEXes
providing shared libs) concurrently, and because we always activate both
versions (pre-installed and latest) we sometimes hit a rare race
condition when both versions of the sharedlibs APEX attempt to symlink
to the same path under /apex/sharedlibs.
This change fixes this race condition by moving the calls to the
ActivateSharedLibsPackage function outside of the regular concurrent
APEX activation flow. Instead now the last step of activating sharedlibs
APEXes (implemented in ActivateSharedLibsPackage function) happens
sequentially after all the APEXes have been mounted.
Test: atest ApexTestCases
Test: atest sharedlibs_host_tests
Bug: 240291921
Change-Id: I543f888484baa9ab622ee4cd17dc4ab65ebf1600
2 files changed