New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 727980 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Jun 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 719266



Sign in to add a comment

Possible race condition in crypto migration during shutdown

Project Member Reported by dspaid@chromium.org, May 31 2017

Issue description

If the ecryptfs->ext4-crypto migration is running when the device shuts down, the migration will fail (due to files not being found) and signal any dbus clients that it failed.  If chrome has not yet shutdown and is still listening to this signal, it may attempt to remove the profile, causing some data loss.

Investigate the order of things to see if this is currently a plausible scenario, and come up with a solution to prevent it from happening now or in the future.
 

Comment 1 by uekawa@chromium.org, May 31 2017

(It sounds to me migration not honoring shutdown is not great. cryptohomed is already notified it's shutting down.)


Comment 2 by dspaid@chromium.org, May 31 2017

Do you happen to know where cryptohomed is notified?  I can't find any mechanism by which it would know about shutdown today (outside of trying to catch SIGTERM).  I'm also not yet clear where the unmount dbus call is coming from yet.

But yes, the core of this bug is that cryptohome (and the migration process) should gracefully handle shutdown.  Its just not yet clear how to do that.

Comment 3 by uekawa@chromium.org, May 31 2017

Blocking: 719266

Comment 4 by dspaid@chromium.org, May 31 2017

As far as I can tell nobody has actually hit this race condition yet (and I've not been able to do so myself), so I'm not sure its related to 719266 (i.e. its not currently impacting either users or UMA stats).
Status: WontFix (was: Started)
hashimoto@ pointed me to /usr/share/cros/init/ui-post-stop where unmount is being called via the cryptohome command line.
Since it is guaranteed to be called after the UI is stopped, this race condition should be impossible.
However, we're still planning to stop the migration at unmount for safety.

Sign in to add a comment