Hangup is detected in another thread

Previously, early exit of a VM was not detected immediately by
virtualizationservice because it was waiting for the payload_state to
become Ready until timeout (10 secs) expires.

This change fixes the problem by doing the hangup detection in another
thread. When hangup is detected, the thread updates the payload_state to
Hangup and kills crosvm. That unblocks the main thread which is waiting
for the exit of crosvm.

Bug: 238321974
Test: atest MicrodroidTestApp
Change-Id: I32054f2684edccf22be1433eb003ebb9e0af7598
3 files changed
tree: 3893cdca0ab2b86b7f1c602dba47ecf380eeca16
  1. .prebuilt_info/
  2. apex/
  3. apkdmverity/
  4. authfs/
  5. compos/
  6. demo/
  7. docs/
  8. javalib/
  9. launcher/
  10. libs/
  11. microdroid/
  12. microdroid_manager/
  13. pvmfw/
  14. rialto/
  15. tests/
  16. virtualizationservice/
  17. vm/
  18. vmbase/
  19. vmclient/
  20. zipfuse/
  21. .clang-format
  22. .gitignore
  23. Android.bp
  24. OWNERS
  25. PREUPLOAD.cfg
  26. README.md
  27. TEST_MAPPING
README.md

Virtualization

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.