commit | 57bc8d7d66b80088b1b93fc674109e38cd7007c4 | [log] [tgz] |
---|---|---|
author | Nikita Ioffe <ioffe@google.com> | Sun Nov 27 00:50:50 2022 +0000 |
committer | Nikita Ioffe <ioffe@google.com> | Mon Nov 28 15:26:33 2022 +0000 |
tree | 793d1132a1197666035d79b2b94b4a2f5f3264ba | |
parent | 03a8770262e22f9a333cc1b8349d08c260e33b08 [diff] |
Fix race condition between authfs_service and /data mounted Currently there is a race condition between authfs_service starting and /data/misc/authfs directory being created. If authfs_service is started before the /data/misc/authfs has been created then authfs_service will exit abnormally. One way this race condition is surface is android.compos.test.ComposTestCase#testOdrefreshSpeedProfile being flaky. This change attempts to fix the race condition by starting the authfs_service on post-fs-data trigger, which guarantees that /data/misc/authfs has been prepared. In more detail this change includes: * Introducing new setup_config_syspros function inside the microdroid_manager. This function is responsible for setting sysprops derived from the payload config, e.g. if config has enable_authfs, then microdroid.config.enable_authfs sysprop will be set. Once all the necessary sysprops were set, microdroid_manager will set the microdroid.config_done property. * Adding wait_for_prop microdroid.config_done before triggering post-fs-data action in the init.rc * Adding on post-fs-data && prop:microdroid.config.enable_authfs=1 trigger to start authfs_service * Moving setprop dev.bootcomplete to on boot action, and switching microdroid_manager to wait for the dev.bootcomplete property before running the payload. The first three points should get rid of the race condition with authfs_service startup, while the last one should guarantee that by the time payload runs the authfs_service is already running. Bug: 260361248 Bug: 260005615 Test: presubmit Test: atest --iterations 20 android.compos.test.ComposTestCase#testOdrefreshSpeedProfile Change-Id: Ib8d2dde5f340ffead9e681c18fa8dd18ba2dd859
This repository contains userspace services related to running virtual machines on Android, especially protected virtual machines. See the getting started documentation and Microdroid README for more information.