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

Issue 617771 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

CFI Linux ToT is not clobbered automatically

Project Member Reported by krasin@chromium.org, Jun 6 2016

Issue description

CFI Linux ToT bot has been broken for a while, and the fix was to clobber the out/ directory manually. We can see the issue here:

https://build.chromium.org/p/chromium.fyi/builders/CFI%20Linux%20ToT/builds/2969/steps/compile/logs/stdio
https://build.chromium.org/p/chromium.fyi/builders/CFI%20Linux%20ToT/builds/2970/steps/compile/logs/stdio
https://build.chromium.org/p/chromium.fyi/builders/CFI%20Linux%20ToT/builds/2971/steps/compile/logs/stdio
https://build.chromium.org/p/chromium.fyi/builders/CFI%20Linux%20ToT/builds/2972/steps/compile/logs/stdio

Instead of doing roughly the same number of edges, it jumps a lot: 14864 / 24448 / 23162 / etc.

So, it's clearly not clobbering. I also ssh-ed on the bot and saw object files under out/Release dated by May 26. 

I found this line that might be responsible for that (not sure):
https://cs.chromium.org/chromium/build/scripts/slave/recipe_modules/chromium/config.py?q=tot+clobber+file:build&sq=package:chromium&dr=CSs&l=790

@config_ctx()
def chromium_perf_fyi(c):
  c.clobber_before_runhooks = False

Nico, Hans,
what are the expectations from ToT bots? Shall they clobber src/ build?
 
Ah, it's chromium_perf_fyi, not chromium_fyi. Continue looking...
It seems that other ToT bots actually get clobbered. Not sure what's special about 'CFI Linux ToT'. At the same time, we probably need to apply 'clobber' config to 'clang_tot' anyway:
https://cs.chromium.org/chromium/build/scripts/slave/recipe_modules/chromium/config.py?q=%5B%27%5Dclang.tot%5B%27%5D&sq=package:chromium&dr=C&l=521

This might fix 'CFI Linux ToT'.

Comment 3 by h...@chromium.org, Jun 6 2016

> At the same time, we probably need to apply 'clobber' config to 'clang_tot'

The clobbering of Clang ToT bots (and Clang builds in general) rely on the build config to add -DCR_CLANG_REVISION=123456 to the build flags. When the revision changes, that causes the files to be recompiled. This is also how developers builds get clobbered when we roll Clang. I don't know why this doesn't work for the CFI bot.

Comment 4 Deleted

Never mind, I found it:

https://cs.chromium.org/chromium/src/build/config/compiler/BUILD.gn?q=_CLANG_REVISION&sq=package:chromium&l=234&dr=C


  if (is_clang && !is_nacl) {
    # This is here so that all files get recompiled after a clang roll and
    # when turning clang on or off. (defines are passed via the command line,
    # and build system rebuild things when their commandline changes). Nothing
    # should ever read this define.
    defines += [ "CR_CLANG_REVISION=$clang_revision" ]
  }

Comment 6 by h...@chromium.org, Jun 6 2016

Yup, that's the one.
From 'generate build files' step on ClangToTLinux:
https://build.chromium.org/p/chromium.fyi/builders/ClangToTLinux/builds/5499/steps/generate_build_files/logs/stdio

Writing """\
clang_use_chrome_plugins = false
is_clang = true
is_component_build = true
is_debug = false
llvm_force_head_revision = true
symbol_level = 2
""" to /b/build/slave/ClangToTLinux/build/src/out/Release/args.gn.

And the same step from 'CFI Linux ToT':

Writing """\
is_cfi = true
is_component_build = false
is_debug = false
""" to /b/build/slave/CFI_Linux_ToT/build/src/out/Release/args.gn.

Comment 8 by h...@chromium.org, Jun 6 2016

Hmm, but is_clang should be true anyway when targeting Linux, supposedly because of https://cs.chromium.org/chromium/src/build/config/BUILDCONFIG.gn?rcl=0&l=125
Okay, I know what to do; just a sec.
The issue is in mb_config.pyl.
#8: possibly, the lack of llvm_force_head_revision sets the stable LLVM revision inside GN.
My best guess for the fix: https://codereview.chromium.org/2039103003/
Owner: krasin@chromium.org
Project Member

Comment 14 by bugdroid1@chromium.org, Jun 7 2016

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

commit 0475505c4370a6186fd73ffc9c8ae07af55bf0ae
Author: krasin <krasin@google.com>
Date: Tue Jun 07 00:42:32 2016

Add clang_tot config to 'CFI Linux ToT' bot.

Otherwise, GN does not get that it's a ToT build and the build dir
is not clobbered.

BUG= 617771 

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

[modify] https://crrev.com/0475505c4370a6186fd73ffc9c8ae07af55bf0ae/tools/mb/mb_config.pyl

Status: Fixed (was: Untriaged)
It seems to be clobbered now. 

Sign in to add a comment