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

Issue 694675 link

Starred by 7 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

replicate field trial and experiment configuration locally

Project Member Reported by wfh@chromium.org, Feb 21 2017

Issue description

It would be good to be able to reproduce all fieldtrial/feature configuration locally e.g. for the purposes of bisecting a bug.

In the past, chrome://version would display all the field trial hashes and these could be converted into a list of field trial strings, and these could be supplied on the command line using --force-fieldtrials.

However, since field trials can now enable and disable features, it seems there is no easy way of regenerating this complete configuration locally c.f.  issue 691522  for an example of this, where the field trial was called VideoColorManagement with two groups: "WithColorMgmt" which enabled the feature "video-color-management" and "NoColorMgmt" which disabled the feature.

In this example, simply specifying --force-fieldtrials=VideoColorManagement/WithColorMgmt/ would not enable the "video-color-management" feature so there is no easy way to reproduce any issues associated with this feature.

Would it be possible to add a way to easily generate a full --force-fieldtrials=... --enable-features=... --disable-features=... from a running Chrome? This would enable easier bisecting of any feature based bugs.
 

Comment 1 by wfh@chromium.org, Aug 28 2017

Hi, I wonder if there was any update on this bug. Sometimes it's really hard to reproduce test failures or do a bisect, on functionality that is gated by a --enable-feature flag.

Comment 2 by wfh@chromium.org, Aug 31 2017

Cc: robliao@chromium.org jsc...@chromium.org f...@chromium.org
robliao had some ideas here, apparently there is a python script!
Cc: asvitk...@chromium.org
Adding asvitkine@ as it seems right up his alley too.

The python script I mentioned is at...
https://cs.chromium.org/chromium/src/tools/variations/fieldtrial_util.py

This takes
https://cs.chromium.org/chromium/src/testing/variations/fieldtrial_testing_config.json
and turns it into a set of flags and is used for the perfbots for running Chrome IIRC.

This is a bit different from the top request to go from a running version of Chrome to a set of command line flags, but Chrome should know this as it has the variations seed as well as the running experiments.



The request to add --enable-features= and --disable-features is specifically for cases where a seed is not available (Chromium or offline builds) or in cases where the features could change in the actual field trial configuration.
Components: -Internals>Metrics Internals>Metrics>Variations
Owner: asvitk...@chromium.org
Status: Assigned (was: Untriaged)
Assigning to myself for now.

Agreed that this is good to have.

I see two related use cases:
  1. Generate a command-line from a given running Chrome that would reproduce the exact field trial state on another Chrome. The command line would likely use the same format as what's generated for the field trial testing config - we just need to produce this in Chrome. Maybe via something like chrome://field-trial-internals page or maybe just an extra param to chrome://version to avoid adding a new page.
  2. Bisect through the trials of a given Chrome. This could be done in a number of ways. The first one I've thought of is specifying a numeric range for the hashes of field trials to Chrome and trials in that range could be omitted - and a script that runs this (i.e probably extending bisect-builds.py). However, it seems this might not be needed - since if we have the command-line generated by (1), then simply that can be used as the basis for the bisection - with the Python script selectively removing parts of that to narrow things down.

Comment 5 by wfh@chromium.org, Dec 5 2017

ping on this bug - another case in  issue 791342  where bisect was impossible because there was no way to replicate a field trial/feature configuration without manually searching critique for the feature to try enabling and disabling.

Can we have a nice command line in chrome://version or somewhere else, to reproduce the exact feature/field-trial configuration of a running build? :)
Cc: gayane@chromium.org
Yes, that's exactly what I want to add.

Unfortunately, I have limited cycles for this - this is my last week before vacation and I'm handling a higher priority task. So I can look at this when I get back. Or patches welcome!

Alternatively, maybe +gayane would have cycles sometime near the end of the year - as her current project is wrapping up. Gayane, feel free to grab this if you're interested to work on this.
Owner: gayane@chromium.org
Per discussion, over to gayane@.
This is the Python code that does something similar based on testing config:
https://cs.chromium.org/chromium/src/tools/variations/fieldtrial_util.p

So we want to do something like that, but based on Chrome's internal state.
I just got burned by this today with a repro that occurred on Chrome (with experiments) but not on Chromium (no experiments) via bisecting.

Comment 11 by pbos@chromium.org, Jan 24 2018

Cc: pbos@chromium.org
FWIW I'm currently hitting something that repros on my corp dev setup but not a tip-of-tree build. This feature would allow me to bisect the field trial experiments to see what actually triggers it. (me too!)
The CL to implement this is under review: https://chromium-review.googlesource.com/c/chromium/src/+/865286
Project Member

Comment 13 by bugdroid1@chromium.org, Feb 1 2018

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

commit 5b240cfb0644278915664861fd0ec04185dd0bc4
Author: Gayane Petrosyan <gayane@chromium.org>
Date: Thu Feb 01 18:26:38 2018

Show Variations info in cmd format in about:version.

When navigating to about:version/?show-variations-cmd an additional section
will appear showing complete set of client's variations in the command line
formatting that can be used to reproduce the same exact state of variations.
The displayed info contains all the trials including not activated ones
marked by '*' along with the corresponding group assignment.
It will also contain enabled and disabled features where the ones that should
use the default value will be marked with '*'(e.g. expired trials).
Trials that are unforcable through command line will be shown but warning will
be shown when processing the command line input with unforcable trial.
This CL doesn't cover iOS.

As the displayed text is huge I also changed the width of the text in the
about:version page (not mobile) to be 60% of the page with a minimum of 800px
as it used to be.

Bug: 694675
TEST=unit test, manual testing
1. run chrome with --fake-variations-channel=beta
2. copying command line input from about:version/?show-variations-cmd
3. run chrome without channel but with command line input copied in step 2.
4. confirm about:version/?show-variations-cmd page shows the same info

Change-Id: Ie73174bd5bd1a02baa75cd3294fd36cf63b3c923
Reviewed-on: https://chromium-review.googlesource.com/865286
Commit-Queue: Gayane Petrosyan <gayane@chromium.org>
Reviewed-by: Dave Schuyler <dschuyler@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533742}
[modify] https://crrev.com/5b240cfb0644278915664861fd0ec04185dd0bc4/base/metrics/field_trial.cc
[modify] https://crrev.com/5b240cfb0644278915664861fd0ec04185dd0bc4/base/metrics/field_trial.h
[modify] https://crrev.com/5b240cfb0644278915664861fd0ec04185dd0bc4/base/metrics/field_trial_unittest.cc
[modify] https://crrev.com/5b240cfb0644278915664861fd0ec04185dd0bc4/chrome/browser/ui/webui/version_handler.cc
[modify] https://crrev.com/5b240cfb0644278915664861fd0ec04185dd0bc4/chrome/browser/ui/webui/version_ui.cc
[modify] https://crrev.com/5b240cfb0644278915664861fd0ec04185dd0bc4/components/variations/BUILD.gn
[modify] https://crrev.com/5b240cfb0644278915664861fd0ec04185dd0bc4/components/variations/net/BUILD.gn
[add] https://crrev.com/5b240cfb0644278915664861fd0ec04185dd0bc4/components/variations/net/variations_command_line.cc
[add] https://crrev.com/5b240cfb0644278915664861fd0ec04185dd0bc4/components/variations/net/variations_command_line.h
[add] https://crrev.com/5b240cfb0644278915664861fd0ec04185dd0bc4/components/variations/net/variations_command_line_unittest.cc
[modify] https://crrev.com/5b240cfb0644278915664861fd0ec04185dd0bc4/components/version_ui/BUILD.gn
[modify] https://crrev.com/5b240cfb0644278915664861fd0ec04185dd0bc4/components/version_ui/resources/about_version.css
[modify] https://crrev.com/5b240cfb0644278915664861fd0ec04185dd0bc4/components/version_ui/resources/about_version.html
[modify] https://crrev.com/5b240cfb0644278915664861fd0ec04185dd0bc4/components/version_ui/resources/about_version.js
[modify] https://crrev.com/5b240cfb0644278915664861fd0ec04185dd0bc4/components/version_ui/version_handler_helper.cc
[modify] https://crrev.com/5b240cfb0644278915664861fd0ec04185dd0bc4/components/version_ui/version_handler_helper.h
[modify] https://crrev.com/5b240cfb0644278915664861fd0ec04185dd0bc4/components/version_ui/version_ui_constants.cc
[modify] https://crrev.com/5b240cfb0644278915664861fd0ec04185dd0bc4/components/version_ui/version_ui_constants.h
[modify] https://crrev.com/5b240cfb0644278915664861fd0ec04185dd0bc4/components/version_ui_strings.grdp

Project Member

Comment 14 by bugdroid1@chromium.org, Feb 1 2018

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

commit 6788e47ad67b94f8423714617798aa57da54db46
Author: Tommy Steimel <steimel@chromium.org>
Date: Thu Feb 01 23:13:07 2018

Revert "Show Variations info in cmd format in about:version."

This reverts commit 5b240cfb0644278915664861fd0ec04185dd0bc4.

Reason for revert: breaking tests on iOS bot:

https://ci.chromium.org/buildbot/chromium.mac/ios-simulator-full-configs/2677

VisibleURLTestCase/testDoubleForwardNavigationToWebUIPage:
[0201/113634.854499:FATAL:template_expressions.cc(97)] Check failed: value != replacements.end(). $i18n replacement key "variations_cmd_name" not found

Original change's description:
> Show Variations info in cmd format in about:version.
> 
> When navigating to about:version/?show-variations-cmd an additional section
> will appear showing complete set of client's variations in the command line
> formatting that can be used to reproduce the same exact state of variations.
> The displayed info contains all the trials including not activated ones
> marked by '*' along with the corresponding group assignment.
> It will also contain enabled and disabled features where the ones that should
> use the default value will be marked with '*'(e.g. expired trials).
> Trials that are unforcable through command line will be shown but warning will
> be shown when processing the command line input with unforcable trial.
> This CL doesn't cover iOS.
> 
> As the displayed text is huge I also changed the width of the text in the
> about:version page (not mobile) to be 60% of the page with a minimum of 800px
> as it used to be.
> 
> Bug: 694675
> TEST=unit test, manual testing
> 1. run chrome with --fake-variations-channel=beta
> 2. copying command line input from about:version/?show-variations-cmd
> 3. run chrome without channel but with command line input copied in step 2.
> 4. confirm about:version/?show-variations-cmd page shows the same info
> 
> Change-Id: Ie73174bd5bd1a02baa75cd3294fd36cf63b3c923
> Reviewed-on: https://chromium-review.googlesource.com/865286
> Commit-Queue: Gayane Petrosyan <gayane@chromium.org>
> Reviewed-by: Dave Schuyler <dschuyler@chromium.org>
> Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#533742}

TBR=asvitkine@chromium.org,gayane@chromium.org,dschuyler@chromium.org

Change-Id: I81dd667cfde45c209eed9889c0785fc0587b123d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 694675
Reviewed-on: https://chromium-review.googlesource.com/898405
Reviewed-by: Tommy Steimel <steimel@chromium.org>
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533844}
[modify] https://crrev.com/6788e47ad67b94f8423714617798aa57da54db46/base/metrics/field_trial.cc
[modify] https://crrev.com/6788e47ad67b94f8423714617798aa57da54db46/base/metrics/field_trial.h
[modify] https://crrev.com/6788e47ad67b94f8423714617798aa57da54db46/base/metrics/field_trial_unittest.cc
[modify] https://crrev.com/6788e47ad67b94f8423714617798aa57da54db46/chrome/browser/ui/webui/version_handler.cc
[modify] https://crrev.com/6788e47ad67b94f8423714617798aa57da54db46/chrome/browser/ui/webui/version_ui.cc
[modify] https://crrev.com/6788e47ad67b94f8423714617798aa57da54db46/components/variations/BUILD.gn
[modify] https://crrev.com/6788e47ad67b94f8423714617798aa57da54db46/components/variations/net/BUILD.gn
[delete] https://crrev.com/fcfb3eccaf6641ad98245f0e1a3bfa4ccf164001/components/variations/net/variations_command_line.cc
[delete] https://crrev.com/fcfb3eccaf6641ad98245f0e1a3bfa4ccf164001/components/variations/net/variations_command_line.h
[delete] https://crrev.com/fcfb3eccaf6641ad98245f0e1a3bfa4ccf164001/components/variations/net/variations_command_line_unittest.cc
[modify] https://crrev.com/6788e47ad67b94f8423714617798aa57da54db46/components/version_ui/BUILD.gn
[modify] https://crrev.com/6788e47ad67b94f8423714617798aa57da54db46/components/version_ui/resources/about_version.css
[modify] https://crrev.com/6788e47ad67b94f8423714617798aa57da54db46/components/version_ui/resources/about_version.html
[modify] https://crrev.com/6788e47ad67b94f8423714617798aa57da54db46/components/version_ui/resources/about_version.js
[modify] https://crrev.com/6788e47ad67b94f8423714617798aa57da54db46/components/version_ui/version_handler_helper.cc
[modify] https://crrev.com/6788e47ad67b94f8423714617798aa57da54db46/components/version_ui/version_handler_helper.h
[modify] https://crrev.com/6788e47ad67b94f8423714617798aa57da54db46/components/version_ui/version_ui_constants.cc
[modify] https://crrev.com/6788e47ad67b94f8423714617798aa57da54db46/components/version_ui/version_ui_constants.h
[modify] https://crrev.com/6788e47ad67b94f8423714617798aa57da54db46/components/version_ui_strings.grdp

Project Member

Comment 15 by bugdroid1@chromium.org, Feb 5 2018

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

commit 5efebf141ac8677ff6aca5152da4b95283c86aa6
Author: Gayane Petrosyan <gayane@chromium.org>
Date: Mon Feb 05 17:25:48 2018

Reland: Show Variations info in cmd format in about::version

Original change's description:
> Show Variations info in cmd format in about:version.
>
> When navigating to about:version/?show-variations-cmd an additional section
> will appear showing complete set of client's variations in the command line
> formatting that can be used to reproduce the same exact state of variations.
> The displayed info contains all the trials including not activated ones
> marked by '*' along with the corresponding group assignment.
> It will also contain enabled and disabled features where the ones that should
> use the default value will be marked with '*'(e.g. expired trials).
> Trials that are unforcable through command line will be shown but warning will
> be shown when processing the command line input with unforcable trial.
> This CL doesn't cover iOS.
>
> As the displayed text is huge I also changed the width of the text in the
> about:version page (not mobile) to be 60% of the page with a minimum of 800px
> as it used to be.
>
> Bug: 694675
> TEST=unit test, manual testing
> 1. run chrome with --fake-variations-channel=beta
> 2. copying command line input from about:version/?show-variations-cmd
> 3. run chrome without channel but with command line input copied in step 2.
> 4. confirm about:version/?show-variations-cmd page shows the same info

Bug: 694675
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: If086e4328b0b11835f2a5c1fcedff496c6e97bac

TBR=asvitkine, dschuyler

Change-Id: If086e4328b0b11835f2a5c1fcedff496c6e97bac
Reviewed-on: https://chromium-review.googlesource.com/899695
Reviewed-by: Mike Dougherty <michaeldo@chromium.org>
Commit-Queue: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534407}
[modify] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/base/metrics/field_trial.cc
[modify] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/base/metrics/field_trial.h
[modify] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/base/metrics/field_trial_unittest.cc
[modify] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/chrome/browser/ui/webui/version_handler.cc
[modify] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/chrome/browser/ui/webui/version_ui.cc
[modify] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/components/variations/BUILD.gn
[modify] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/components/variations/net/BUILD.gn
[add] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/components/variations/net/variations_command_line.cc
[add] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/components/variations/net/variations_command_line.h
[add] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/components/variations/net/variations_command_line_unittest.cc
[modify] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/components/version_ui/BUILD.gn
[modify] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/components/version_ui/resources/about_version.css
[modify] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/components/version_ui/resources/about_version.html
[modify] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/components/version_ui/resources/about_version.js
[modify] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/components/version_ui/version_handler_helper.cc
[modify] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/components/version_ui/version_handler_helper.h
[modify] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/components/version_ui/version_ui_constants.cc
[modify] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/components/version_ui/version_ui_constants.h
[modify] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/components/version_ui_strings.grdp
[modify] https://crrev.com/5efebf141ac8677ff6aca5152da4b95283c86aa6/ios/chrome/browser/ui/webui/version_ui.mm

Comment 16 by wfh@chromium.org, Feb 12 2018

Hi - thanks for adding this.

I ran into some problems using this.

1. The command line generated on my canary install from visiting chrome://version/?show-variations-cmd is too long for me to run from a command prompt. it was 35,437 characters long. I'm not sure what the limit is here.
2. I trimmed the command line down leaving just the --force-fieldtrials just to experiment a bit, and I hit an assert in metrics:

[31500:24908:0212/135103.359:FATAL:field_trial.cc(311)] Check failed: !group_reported_

void FieldTrial::Disable() {
  DCHECK(!group_reported_);  <-- here
  enable_field_trial_ = false;

https://cs.chromium.org/chromium/src/base/metrics/field_trial.cc?sq=package:chromium&l=311
Maybe we should support passing base64/gzipped version of the data, which can be decoded and set up by Chrome. This might be quite a bit shorter than the fully-spelled out one.

Will, as for the second issue with the DCHECK(), do you have a stack trace?

Comment 18 by wfh@chromium.org, Feb 12 2018

hi, thanks for your reply.

The stack is:

2:008> kn
 # Child-SP          RetAddr           Call Site
00 00000079`b67fd450 00007ffe`8f590505 chrome_7ffe8e820000!base::debug::BreakDebugger+0xd [c:\src\gclient\src\base\debug\debugger_win.cc @ 21]
01 00000079`b67fd480 00007ffe`8f5cc170 chrome_7ffe8e820000!logging::LogMessage::~LogMessage+0x3c5 [c:\src\gclient\src\base\logging.cc @ 842]
02 00000079`b67fd960 00007ffe`9120bf66 chrome_7ffe8e820000!base::FieldTrial::Disable+0x60 [c:\src\gclient\src\base\metrics\field_trial.cc @ 312]
03 00000079`b67fdab0 00007ffe`9120bb85 chrome_7ffe8e820000!variations::VariationsSeedProcessor::CreateTrialFromStudy+0x3b4 [c:\src\gclient\src\components\variations\variations_seed_processor.cc @ 304]
04 00000079`b67fdb90 00007ffe`906d886b chrome_7ffe8e820000!variations::VariationsSeedProcessor::CreateTrialsFromSeed+0x6d [c:\src\gclient\src\components\variations\variations_seed_processor.cc @ 185]
05 00000079`b67fdc10 00007ffe`906d9a69 chrome_7ffe8e820000!variations::VariationsFieldTrialCreator::CreateTrialsFromSeed+0x2dd [c:\src\gclient\src\components\variations\service\variations_field_trial_creator.cc @ 209]
06 00000079`b67fdee0 00007ffe`906d761d chrome_7ffe8e820000!variations::VariationsFieldTrialCreator::SetupFieldTrials+0x347 [c:\src\gclient\src\components\variations\service\variations_field_trial_creator.cc @ 451]
07 00000079`b67fe0b0 00007ffe`8f51d90c chrome_7ffe8e820000!variations::VariationsService::SetupFieldTrials+0xa1 [c:\src\gclient\src\components\variations\service\variations_service.cc @ 764]
08 00000079`b67fe180 00007ffe`8f51f586 chrome_7ffe8e820000!ChromeBrowserMainParts::SetupFieldTrials+0x162 [c:\src\gclient\src\chrome\browser\chrome_browser_main.cc @ 739]
09 00000079`b67fe330 00007ffe`8f51e912 chrome_7ffe8e820000!ChromeBrowserMainParts::PreCreateThreadsImpl+0xabe [c:\src\gclient\src\chrome\browser\chrome_browser_main.cc @ 1198]
0a 00000079`b67fe620 00007ffe`8f50ecd3 chrome_7ffe8e820000!ChromeBrowserMainParts::PreCreateThreads+0x4e [c:\src\gclient\src\chrome\browser\chrome_browser_main.cc @ 927]
0b 00000079`b67fe800 00007ffe`8ed2d33f chrome_7ffe8e820000!ChromeBrowserMainPartsWin::PreCreateThreads+0x159 [c:\src\gclient\src\chrome\browser\chrome_browser_main_win.cc @ 488]
0c 00000079`b67fe8e0 00007ffe`8f0d8ecb chrome_7ffe8e820000!content::BrowserMainLoop::PreCreateThreads+0x61 [c:\src\gclient\src\content\browser\browser_main_loop.cc @ 882]
0d (Inline Function) --------`-------- chrome_7ffe8e820000!base::RepeatingCallback<int ()>::Run+0xc [c:\src\gclient\src\base\callback.h @ 94]
0e 00000079`b67fea20 00007ffe`8ed2db6b chrome_7ffe8e820000!content::StartupTaskRunner::RunAllTasksNow+0x25 [c:\src\gclient\src\content\browser\startup_task_runner.cc @ 42]
0f 00000079`b67fea60 00007ffe`8ed32bbc chrome_7ffe8e820000!content::BrowserMainLoop::CreateStartupTasks+0x305 [c:\src\gclient\src\content\browser\browser_main_loop.cc @ 1017]
10 00000079`b67fec90 00007ffe`8ed2bc38 chrome_7ffe8e820000!content::BrowserMainRunnerImpl::Initialize+0x7a [c:\src\gclient\src\content\browser\browser_main_runner.cc @ 124]
11 00000079`b67fedd0 00007ffe`8f46e0aa chrome_7ffe8e820000!content::BrowserMain+0xb0 [c:\src\gclient\src\content\browser\browser_main.cc @ 42]
12 00000079`b67feeb0 00007ffe`8f46e736 chrome_7ffe8e820000!content::RunNamedProcessTypeMain+0x11e [c:\src\gclient\src\content\app\content_main_runner.cc @ 423]
13 00000079`b67ff010 00007ffe`8f48aff0 chrome_7ffe8e820000!content::ContentMainRunnerImpl::Run+0x1ae [c:\src\gclient\src\content\app\content_main_runner.cc @ 713]
14 00000079`b67ff1a0 00007ffe`8f46df61 chrome_7ffe8e820000!service_manager::Main+0x4b4 [c:\src\gclient\src\services\service_manager\embedder\main.cc @ 456]
15 00000079`b67ff550 00007ffe`8e8211d4 chrome_7ffe8e820000!content::ContentMain+0x41 [c:\src\gclient\src\content\app\content_main.cc @ 19]
16 00000079`b67ff5e0 00007ff6`10ae66cd chrome_7ffe8e820000!ChromeMain+0x13c [c:\src\gclient\src\chrome\app\chrome_main.cc @ 147]
17 00000079`b67ff6e0 00007ff6`10ae1890 chrome!MainDllLoader::Launch+0x26d [c:\src\gclient\src\chrome\app\main_dll_loader_win.cc @ 199]
18 00000079`b67ff7d0 00007ff6`10bed843 chrome!wWinMain+0x890 [c:\src\gclient\src\chrome\app\chrome_exe_main_win.cc @ 230]
19 (Inline Function) --------`-------- chrome!invoke_main+0x21 [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 118]
1a 00000079`b67ffc80 00007ffe`dfbe8364 chrome!__scrt_common_main_seh+0x117 [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 283]
1b 00000079`b67ffcc0 00007ffe`dfd37091 KERNEL32!BaseThreadInitThunk+0x14
1c 00000079`b67ffcf0 00000000`00000000 ntdll!RtlUserThreadStart+0x21

the full command line is http://shortn/_0q6rXBM6ON (Google view only since it might contain google-only fieldtrials).

Yes, compressing the command line might work, or the ability to read it from a file (a bit like .rsp files for compilers), which might make it easier to use for other line command lines that are not machine generated, or when you want to edit it easily without having to recompress it.

Comment 19 by wfh@chromium.org, Feb 12 2018

changing to stack frame 03

chrome_7ffe8e820000!variations::VariationsSeedProcessor::CreateTrialFromStudy+0x3b4

2:008> dv
                        this = <value unavailable>
             processed_study = 0x00000220`d1079160
           override_callback = 0x00000079`b67fdce8
        low_entropy_provider = <value unavailable>
                feature_list = 0x00000220`d1093830
                       trial = class scoped_refptr<base::FieldTrial>
                       study = 0x00000220`d11e5a50
              existing_trial = <value unavailable>
            experiment_index = <value unavailable>
                           i = <value unavailable>
                command_line = <value unavailable>
                  experiment = <value unavailable>
                       trial = <value unavailable>
          randomization_seed = <value unavailable>
          randomization_type = <value unavailable>
                           i = <value unavailable>
enables_or_disables_features = <value unavailable>
               has_overrides = <value unavailable>
                  experiment = <value unavailable>
                  group_name = <value unavailable>
            experiment_index = <value unavailable>


2:008> dt -r processed_study
Local var @ 0x79b67fdb00 Type variations::ProcessedStudy*
0x00000220`d1079160 
   =00007ffe`9208dff0 kGenericDefaultExperimentName : [0]  "VariationsDefaultExperiment"

might be the cause?

Comment 20 by wfh@chromium.org, Feb 12 2018

oh no nvm that's a const. ignore me...
For helping me reproducing the DCHECK problem could you send me the "Local State" file from the user-data-dir

As a workaround for DCHECK problem could you try running chrome with the same command line input but in a new user-data-dir.

I think the problem for the DCHECK is that the user-data-dir has a variation seed and after processing the --forced-fieldtrials it also tries processing the seed. 

Regardless of this problem we should consider adding a flag for ignoring the seed if we want to have only trials from command line
Maybe if we add the new flag that has the gzipped/base64-encoded content, having that flag passed should also disable processing of the normal seed.
I managed to reproduce the problem, don't need the "Local State" file anymore.

The problem aquires when an expired study is forced through command line to be active. Afterwards when processing seed it fails to disable that expired study.

Comment 25 by wfh@chromium.org, Mar 27 2018

I'm playing with this a bit more, and now failing to return true from AssociateParamsFromString, the error I am getting is:

[46740:44400:0327/131650.224:ERROR:field_trial_util.cc(108)] Trial and group name should be separated by '.'

and the string it appears to be parsing is:

"QUIC.EnabledBBRSlowerStartup1.5xConservation:connection_options/BBRS%2CBBS2/enable_quic/true"

reduced to:

--force-fieldtrial-params=QUIC.EnabledBBRSlowerStartup1.5xConservation:connection_options/BBRS%2CBBS2/enable_quic/true

are there too many dots here? It seems removing just this from --force-fieldtrial-params allows chrome to start (starting in empty user data dir).

FWIW I am using https://chromium-review.googlesource.com/c/chromium/src/+/982512 to supply the whole command line, and it seems to work reasonably well.

Comment 26 by wfh@chromium.org, Mar 27 2018

as asvitkine commented in chat, if I URLescape the experiment name then chrome loads fine... not yet sure if the QUIC param is actually being picked up though.

--force-fieldtrial-params=QUIC.EnabledBBRSlowerStartup1%2E5xConservation:connection_options/BBRS%2CBBS2/enable_quic/true
We run both the group name and trial name in the params string through the unescape function:

https://cs.chromium.org/chromium/src/components/variations/field_trial_config/field_trial_util.cc?rcl=e4afa8b5fa4a3e09a8ee3bca5e0d2cbd57bb0e39&l=118

So I think it should work when properly escaped. However, if we're not currently escaping .'s then that's a bug in the code that generates the command-line and we should fix it.

Comment 28 by phistuck@gmail.com, Mar 29 2018

Looks like this is duplicating information that chrome://net-internals already reveals -
https://plus.google.com/+FrancoisBeaufort/posts/6G72VyzWgjt
The purpose of this is to provide a command-line to reproduce the state when debugging. 

The info in net-internals doesn't provide that. So no real duplication. (One can argue that net-internals should have this same command-line info.)
Project Member

Comment 30 by bugdroid1@chromium.org, Apr 30 2018

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

commit da9ae3633bbe7ba5e0b1a92eccc9063510db6d5d
Author: Gayane Petrosyan <gayane@chromium.org>
Date: Mon Apr 30 20:43:17 2018

Trial and group names can have '.' which should be escaped properly.

When trial and group names are outputed to string special characters are
escaped. However '.' and '*' are not escaped.

Bug: 694675
Change-Id: I52583ee8f05f0dd49c6a4b28b03881054014625a
Reviewed-on: https://chromium-review.googlesource.com/988267
Commit-Queue: Gayane Petrosyan <gayane@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554866}
[modify] https://crrev.com/da9ae3633bbe7ba5e0b1a92eccc9063510db6d5d/components/variations/field_trial_config/field_trial_util.cc
[modify] https://crrev.com/da9ae3633bbe7ba5e0b1a92eccc9063510db6d5d/components/variations/field_trial_config/field_trial_util.h
[modify] https://crrev.com/da9ae3633bbe7ba5e0b1a92eccc9063510db6d5d/components/variations/field_trial_config/field_trial_util_unittest.cc

Sign in to add a comment