New issue
Advanced search Search tips

Issue 812234 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Feb 2018
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

crosvm: in multiprocess mode with vcpus > 1 children are forceably killed

Project Member Reported by robert.b...@intel.com, Feb 14 2018

Issue description

When running crosvm with --vcpus=2 and not --disable-sandbox (so that it is in multiprocess mode)

When shutting down the VM observe:

[    6.451359] reboot: Restarting system
[    6.451762] reboot: machine restart
[INFO:src/linux.rs:620] vcpu requested shutdown
[INFO:src/main.rs:391] crosvm has exited normally
[WARNING:src/main.rs:524] not all child processes have exited; sending SIGKILL
Killed

This does not happen with a single VCPU or when --disable-sandbox is passed.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/crosvm/+/8091a2a525f4a9de2f5493d396ce904779a7715f

commit 8091a2a525f4a9de2f5493d396ce904779a7715f
Author: Rob Bradford <robert.bradford@intel.com>
Date: Thu Feb 15 01:05:23 2018

crosvm: with vcpus > 1 cleanly shutdown jailed processes

When creating a new vcpu, setup_vcpu() returns a JoinHandle which allows
the main thread to wait for the vcpu threads to complete. Put this
handle into a vector from which it will be later join()ed with to wait
for its execution to complete. By ensuring that the thread's completion
is waited for all the references to the ProxyDevice will be dropped and
thus the jailed processes will be sent a shutdown message and they will
cleanly exit.

TEST="crosvm run --cpus=2 ..." and observe that the jailed processes are
cleanly shutdown and not forcefully killed.
BUG= 812234 

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
Change-Id: I771251ff1cdf762ca68c0781dc7de9f95cc1fcfe
Reviewed-on: https://chromium-review.googlesource.com/919165
Commit-Ready: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>

[modify] https://crrev.com/8091a2a525f4a9de2f5493d396ce904779a7715f/src/linux.rs

Status: Fixed (was: Untriaged)

Sign in to add a comment