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

Issue 916943 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 20
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 916881
issue 916883
issue 916886



Sign in to add a comment

ModelTypeController may CHECK-fail if datatype disabled via policy while model loading

Project Member Reported by mastiz@chromium.org, Dec 20

Issue description

There is a race condition in ModelTypeController that may cause:
[4952:4952:1219/142059.933515:FATAL:model_type_controller.cc(142)] Check failed: MODEL_STARTING == state_ (1 vs. 6)

The scenario is reproduced in some tests but is believed to be rare in reality because crashpad doesn't surface any instance.

The problematic codepath is when a controller subclass calls ReportModelError() to disable the datatype, usually because of a datatype policy reason (e.g. custom passphrase was enabled and the datatype should be disabled). At this point, the datatype must be precisely loading (MODEL_STARTING) for the crash to repro, which is very unlikely.
 
Blocking: 916886
Blocking: 916881
Project Member

Comment 3 by bugdroid1@chromium.org, Dec 20

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

commit 94c345a1ee2dd5e81d777debf57e134ff7ad74bc
Author: Mikel Astiz <mastiz@chromium.org>
Date: Thu Dec 20 13:22:00 2018

Fix CHECK failure if datatype stopped while starting

The problematic codepath is when a controller subclass calls
ReportModelError() to disable the datatype, usually because of a
datatype policy reason (e.g. custom passphrase was enabled and the
datatype should be disabled). At this point, the datatype must be
precisely loading (MODEL_STARTING) for the crash to repro, which is
very unlikely but gets surfaced by integration tests.

Bug:  916943 , 916883 , 916886 , 916884 , 916881 
Change-Id: I5cdfed50bd28aafc1bd7e5bbbe8d851e0e0100e1
Reviewed-on: https://chromium-review.googlesource.com/c/1386424
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Florian Uunk <feuunk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618193}
[modify] https://crrev.com/94c345a1ee2dd5e81d777debf57e134ff7ad74bc/components/sync/driver/model_type_controller.cc
[modify] https://crrev.com/94c345a1ee2dd5e81d777debf57e134ff7ad74bc/components/sync/driver/model_type_controller.h
[modify] https://crrev.com/94c345a1ee2dd5e81d777debf57e134ff7ad74bc/components/sync/driver/model_type_controller_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment