Possible race condition when mounting a component |
|
Issue descriptionThere appears to be a race condition somewhere when loading a component for the first time and then recursively bind mounting the /run/imageloader directory. From a clean boot, perform the following steps: $ dbus-send --system --dest=org.chromium.ComponentUpdaterService /org/chromium/ComponentUpdaterService org.chromium.ComponentUpdaterService.LoadComponent string:cros-termina && mount --rbind /run/imageloader /mnt/stateful_partition/test If you then look in /mnt/stateful_partition/test/cros-termina/<some_version>, it will be empty but /run/imageloader/cros-termina/<version>/ will have a lost+found directory as well as vm_kernel and vm_rootfs.img files. I don't see anything in the imageloader source that looks fishy. When it gets a dbus command, it sends a request to its child process and waits for the child process to mount the component before returning. Is the kernel doing the mount asynchronously? If you unmount /mnt/stateful_partition/test and then remount with 'mount --rbind', the files in the component directory will show up. If you unload the component and then re-run the command above, the files will not be visible in the bind mounted location. Any thoughts?
,
Feb 9 2018
Good to know. That's not very user friendly semantics from dbus-send but so be it.
,
Feb 9 2018
to be fair, dbus-send is a fairly low-level tool. think of it as plumbing, not porcelain.
,
Feb 9 2018
Thanks for reporting this. The dbus API org.chromium.ComponentUpdaterService.LoadComponent itself is synchronous (it waits for the image to be mounted before return). So it should either succeed and return the mount point or fail permanently and return an error. |
|
►
Sign in to add a comment |
|
Comment 1 by chirantan@chromium.org
, Feb 9 2018Status: WontFix (was: Untriaged)