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

Issue 624879 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Jul 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug

Blocking:
issue 626474



Sign in to add a comment

FeatureList crashes if no singleton is initialized

Project Member Reported by joedow@chromium.org, Jun 30 2016

Issue description

FeatureList currently expects a singleton to be manually set by all code
which uses it.  This works fine in the browser where it is intialized
and in unit tests which use a default initializer, however for code
outside the browser which relies on the variaous components in Chromium,
this causes their code to crash.

An example of this is CL:
https://codereview.chromium.org/2101283004/

This was an innocuous change which CRD relied on.  Since the unit tests
are set up to never catch these kind of problems, our team started
experiencing crashes across our host and client components which 
required us to spend time investigating.


 
Project Member

Comment 1 by sheriffbot@chromium.org, Jul 1 2016

Labels: -M-53 M-54 MovedFrom-53
Moving this nonessential bug to the next milestone.

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

Comment 2 by bugdroid1@chromium.org, Jul 7 2016

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

commit 958f0473b8039a057b0e31412c2acae7dfda39cd
Author: joedow <joedow@chromium.org>
Date: Thu Jul 07 22:08:55 2016

Updating FeatureList default initialization pattern

FeatureList currently expects a singleton to be manually set by all code
which uses it.  This works fine in the browser where it is intialized
and in unit tests which use a default initializer, however for code
outside the browser which relies on the various components in Chromium,
this causes their code to crash.

An example of this is CL:
https://codereview.chromium.org/2101283004/

This was an innocuous change in a component which CRD relied on.
Since the unit tests are set up to never catch these kind of problems,
our component started crashing and we had to investigate to figure out
the root cause.

This change updates the feature and trial checks to initialize the
singleton if it was not already initialized.  If a caller tries to
re-initialize the singleton after that, the init code will DCHECK as
this represents a race condition and we want to ensure consistency for
the callers who rely on these checks being accurate.

BUG= 624879 

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

[modify] https://crrev.com/958f0473b8039a057b0e31412c2acae7dfda39cd/base/feature_list.cc
[modify] https://crrev.com/958f0473b8039a057b0e31412c2acae7dfda39cd/base/feature_list.h
[modify] https://crrev.com/958f0473b8039a057b0e31412c2acae7dfda39cd/base/feature_list_unittest.cc

Blocking: 626474
Need to merge the fix to M53.
Labels: -M-54 -MovedFrom-53 Merge-Request-53 M-53

Comment 6 by dimu@google.com, Jul 8 2016

Labels: -Merge-Request-53 Merge-Approved-53 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M53 (branch: 2785)
Project Member

Comment 7 by bugdroid1@chromium.org, Jul 11 2016

Labels: -merge-approved-53 merge-merged-2785
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8ddcefe1e6ea7e133782e06b27e9767c94755840

commit 8ddcefe1e6ea7e133782e06b27e9767c94755840
Author: Sergey Ulanov <sergeyu@chromium.org>
Date: Mon Jul 11 17:39:39 2016

Updating FeatureList default initialization pattern

FeatureList currently expects a singleton to be manually set by all code
which uses it.  This works fine in the browser where it is intialized
and in unit tests which use a default initializer, however for code
outside the browser which relies on the various components in Chromium,
this causes their code to crash.

An example of this is CL:
https://codereview.chromium.org/2101283004/

This was an innocuous change in a component which CRD relied on.
Since the unit tests are set up to never catch these kind of problems,
our component started crashing and we had to investigate to figure out
the root cause.

This change updates the feature and trial checks to initialize the
singleton if it was not already initialized.  If a caller tries to
re-initialize the singleton after that, the init code will DCHECK as
this represents a race condition and we want to ensure consistency for
the callers who rely on these checks being accurate.

BUG= 624879 

Review-Url: https://codereview.chromium.org/2110083007
Cr-Commit-Position: refs/heads/master@{#404243}
(cherry picked from commit 958f0473b8039a057b0e31412c2acae7dfda39cd)

Review URL: https://codereview.chromium.org/2138923002 .

Cr-Commit-Position: refs/branch-heads/2785@{#85}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/8ddcefe1e6ea7e133782e06b27e9767c94755840/base/feature_list.cc
[modify] https://crrev.com/8ddcefe1e6ea7e133782e06b27e9767c94755840/base/feature_list.h
[modify] https://crrev.com/8ddcefe1e6ea7e133782e06b27e9767c94755840/base/feature_list_unittest.cc

Comment 8 by joedow@chromium.org, Jul 12 2016

Status: Verified (was: Assigned)

Comment 9 by joedow@chromium.org, Jul 12 2016

Owner: ajnolley@chromium.org
Status: Fixed (was: Verified)
I've verified this was fixed in ToT, assigning to AJ to verify the fix in the release branch.
Status: Verified (was: Fixed)
verified fixed in 53.0.2785.24

Sign in to add a comment