login: change implementation of asynchronous Upstart events

The way Upstart was being triggered could lead to two event emissions
called in a certain order being sent to Upstart via D-Bus in the
reversed order. This could occur if the first one is ASYNC and the
second is SYNC.  SYNC messages were being sent directly to D-Bus and
blocking the main thread until the response was received, whereas ASYNC
messages were posted to to the message loop queue where they would be
later sent to D-Bus.  This caused the order in which messages were
delivered to D-Bus to not match developer's expectations.

With this change, the D-Bus messages are always sent synchronously and
block until they are acknowledged by Upstart, but the ASYNC events now
set the Upstart's wait flag to false to return as soon as the event is
queued. This causes the events to be delivered in the right order.

BUG=b:77528877
TEST=Reproduce conditions causing bug and ensure error isn't seen

Change-Id: I32e9d62a8c7ee86ff781890189d0a14c3be291ee
Reviewed-on: https://chromium-review.googlesource.com/1017700
Reviewed-by: Christopher Morin <cmtm@google.com>
Commit-Queue: Christopher Morin <cmtm@google.com>
Tested-by: Christopher Morin <cmtm@google.com>
Trybot-Ready: Christopher Morin <cmtm@google.com>
1 file changed
tree: 704d05a8f75181f548d67e811d0e3993b2014334
  1. arc/
  2. attestation/
  3. authpolicy/
  4. avtest_label_detect/
  5. biod/
  6. bluetooth/
  7. bootstat/
  8. buffet/
  9. chaps/
  10. chromeos-config/
  11. chromeos-dbus-bindings/
  12. common-mk/
  13. container_utils/
  14. crash-reporter/
  15. cromo/
  16. cros-disks/
  17. cros_component/
  18. crosh/
  19. cryptohome/
  20. debugd/
  21. disk_updater/
  22. easy-unlock/
  23. feedback/
  24. fitpicker/
  25. gobi-cromo-plugin/
  26. goldfishd/
  27. hammerd/
  28. image-burner/
  29. imageloader/
  30. init/
  31. installer/
  32. ippusb_manager/
  33. libchromeos-ui/
  34. libcontainer/
  35. libpasswordprovider/
  36. libweave/
  37. login_manager/
  38. lorgnette/
  39. metrics/
  40. midis/
  41. mist/
  42. ml/
  43. modem-utilities/
  44. modemfwd/
  45. mtpd/
  46. p2p/
  47. peerd/
  48. permission_broker/
  49. power_manager/
  50. regions/
  51. run_oci/
  52. salsa/
  53. secure_erase_file/
  54. smbprovider/
  55. smogcheck/
  56. st_flash/
  57. thd/
  58. timberslide/
  59. touch_firmware_calibration/
  60. touch_keyboard/
  61. tpm2-simulator/
  62. tpm_manager/
  63. trim/
  64. trunks/
  65. u2fd/
  66. userfeedback/
  67. userspace_touchpad/
  68. virtual_file_provider/
  69. vm_tools/
  70. vpn-manager/
  71. webserver/
  72. wimax_manager/
  73. .clang-format
  74. .gitignore
  75. CPPLINT.cfg
  76. LICENSE
  77. PRESUBMIT.cfg
  78. README.md
README.md

The Chromium OS Platform

This repo holds (most) of the custom code that makes up the Chromium OS platform. That largely covers daemons, programs, and libraries that were written specifically for Chromium OS.

We moved from multiple separate repos in platform/ to a single repo in platform2/ for a number of reasons:

  • Make it easier to work across multiple projects simultaneously
  • Increase code re-use (via common libs) rather than duplicate utility functions multiple items over
  • Share the same build system

While most projects were merged, not all of them were. Some projects were standalone already (such as vboot), or never got around to being folded in (such as imageloader). Some day those extra projects might get merged in.

Similarly, some projects that were merged in, were then merged back out. This was due to the evolution of the Brillo project and collaboration with Android. That means the AOSP repos are the upstream and Chromium OS carries copies.

Local Project Directory

ProjectDescription
arcTools/deamons/init-scripts to run ARC
attestationDaemon and client for managing remote attestation
authpolicyDaemon for integrating with Microsoft Active Directory (AD) domains
avtest_label_detectTest tool for OCRing device labels
biodBiometrics daemon
bluetoothBluetooth Service and tools
bootstatTools for tracking points in the overall boot process (for metrics)
buffetDaemon for reacting to cloud messages
chapsPKCS #11 implementation for TPM 1 devices
chromeos-configCrOS unified build runtime config manager
chromeos-dbus-bindingsSimplifies the implementation of D-Bus daemons and proxies
common-mkCommon build & test logic for platform2 projects
container_utilsSupport tools for containers (e.g. device-jail)
crash-reporterThe system crash handler & reporter
cromomodemmanager compatible D-Bus interface to support closed source modem drivers
cros-disksDaemon for mounting removable media (e.g. USB sticks and SD cards)
cros_component
croshThe Chromium OS shell
cryptohomeDaemon and tools for managing encrypted /home and /var directories
debugdCentralized debug daemon for random tools
disk_updaterUtility for updating root disk firmware (e.g. SSDs and eMMC)
easy-unlockDaemon for handling Easy Unlock requests (e.g. unlocking Chromebooks with an Android device)
feedbackDaemon for headless systems that want to gather feedback (normally Chrome manages it)
fitpicker
gobi-cromo-pluginplugin for supporting gobi3k modems with cromo
goldfishdAndroid Emulator Daemon
hammerdFirmware updater utility for hammer hardware
image-burnerDaemon for writing disk images (e.g. recovery) to USB sticks & SD cards
imageloaderDaemon for mounting signed disk images
initCrOS common startup init scripts and boot time helpers
installerCrOS installer utility (for AU/recovery/etc...)
ippusb_manager“Service” for ipp-over-usb printing
libchromeos-ui
libcontainer
libpasswordproviderPassword Provider library for securely managing credentials with system services
libweaveLibrary for cloud messaging
login_managerSession manager for handling the life cycle of the main session (e.g. Chrome)
lorgnetteDaemon for managing attached USB scanners via SANE
metricsClient side user metrics collection
midisMIDI service
mistModem USB Interface Switching Tool
mlMachine learning service
modem-utilities
modemfwdDaemon for managing modem firmware updaters
mtpdDaemon for handling Media Transfer Protocol (MTP) with devices (e.g. phones)
p2pService for sharing files between CrOS devices (e.g. updates)
peerdDaemon for communicating with local peers
permission_broker
power_managerUserspace power management daemon and associated tools
regions
run_ociMinimalistic container runtime
salsaTouchpad experimentation framework
secure_erase_fileHelper tools for securely erasing files from storage (e.g. keys and PII data)
smbproviderDaemon for connecting Samba / Windows networking shares to the Files.app
smogcheckDeveloper library for working with raw I2C devices
st_flash
thdThermal daemon to help keep systems running cool
timberslideTool for working with EC crashes for reporting purposes
touch_firmware_calibration
touch_keyboardUtilities for a touch based virtual keyboard
tpm2-simulatorA software TPM 2.0 implementation (for testing/debugging)
tpm_managerDaemon and client for managing TPM setup and operations
trimService to manage filesystem trim operations in the background
trunksMiddleware and resource manager for interfacing with TPM 2.0 hardware
u2fdU2FHID emulation daemon for systems with secure elements (not TPMs)
userfeedbackVarious utilities to gather extended data for user feedback reports
userspace_touchpad
virtual_file_provider
vm_toolsUtilities for Virtual Machine (VM) orchestration
vpn-manager
webserverSmall web server with D-Bus client backends
wimax_manager

AOSP Project Directory

These projects can be found here: https://chromium.googlesource.com/aosp/platform/