ModelTypeController may CHECK-fail if datatype disabled via policy while model loading |
|||
Issue descriptionThere 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.
,
Dec 20
,
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
,
Dec 20
|
|||
►
Sign in to add a comment |
|||
Comment 1 by mastiz@chromium.org
, Dec 20