New issue
Advanced search Search tips

Issue 728656 link

Starred by 3 users

Issue metadata

Status: Untriaged
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

DeviceSettingsService::status() looks fishy

Project Member Reported by tnagel@chromium.org, Jun 1 2017

Issue description

status() reports the result of the last load/store operation, however since these operations are asynchronous it seems hard to be sure which operation's status is actually being reported.  By design, status() thus seems to be prone to race conditions and we should probably replace it by a saner construct.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fedcbd35f0a601ed3e07642673a7ab0e602bee26

commit fedcbd35f0a601ed3e07642673a7ab0e602bee26
Author: tnagel <tnagel@chromium.org>
Date: Fri Jun 02 11:29:41 2017

Improve DeviceSettingsService documentation

BUG=728656

Review-Url: https://codereview.chromium.org/2920833002
Cr-Commit-Position: refs/heads/master@{#476616}

[modify] https://crrev.com/fedcbd35f0a601ed3e07642673a7ab0e602bee26/chrome/browser/chromeos/settings/device_settings_service.h

Labels: Enterprise-Triaged
Owner: tnagel@chromium.org
Status: Assigned (was: Untriaged)
I believe as long as you make sure all access to status() happens on the same thread as store_status_ is written, it should be fine. Otherwise, you're in trouble. In general, I agree this seems to be bad design.
Since it was me to originally write this code, here is some background: The idea was that interactions with session_manager would not only indicate status of the operation, but also about the state the system is in. E.g. STORE_KEY_UNAVAILABLE triggers PERMANENTLY_UNTRUSTED status, and a successful store operation updates that to TEMPORARILY_UNTRUSTED / TRUSTED. So the status of an operation *does* have a meaning for the overall system status as observed from Chrome. Since all operations happen asynchronously and there's no way around that, the risk of race conditions is inherent and you'll not be able to fix that. I'd agree though that it'd be nice to have a way to determine the status of an individual operation if that is useful (is it?).

Comment 4 by tnagel@chromium.org, Jul 26 2017

Owner: ----
Status: Available (was: Assigned)
Project Member

Comment 5 by sheriffbot@chromium.org, Jul 26

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment