TaskCluster Linux64 static analysis builds share a cached object directory with gcc builds

RESOLVED FIXED

Status

RESOLVED FIXED
3 years ago
8 months ago

People

(Reporter: Ehsan, Assigned: dustin)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
These builds are currently perma red on inbound, see a sample log here: <https://s3-us-west-2.amazonaws.com/taskcluster-public-artifacts/EkLgoZzOTkabLAH-NbfChg/0/public/logs/live_backing.log>

The interesting bits are:

16:24:18     INFO -  checking for gcc... (cached) /usr/bin/ccache /home/worker/workspace/build/src/gcc/bin/gcc
16:24:18     INFO -  checking whether the C compiler (/usr/bin/ccache /home/worker/workspace/build/src/gcc/bin/gcc  -L/home/worker/workspace/build/src/gtk3/usr/local/lib ) works... yes
16:24:18     INFO -  checking whether the C compiler (/usr/bin/ccache /home/worker/workspace/build/src/gcc/bin/gcc  -L/home/worker/workspace/build/src/gtk3/usr/local/lib ) is a cross-compiler... no
16:24:18     INFO -  checking whether we are using GNU C... (cached) yes
16:24:18     INFO -  checking whether /usr/bin/ccache /home/worker/workspace/build/src/gcc/bin/gcc accepts -g... (cached) yes
16:24:18     INFO -  checking for c++... (cached) /usr/bin/ccache /home/worker/workspace/build/src/gcc/bin/g++
16:24:18     INFO -  checking whether the C++ compiler (/usr/bin/ccache /home/worker/workspace/build/src/gcc/bin/g++  -L/home/worker/workspace/build/src/gtk3/usr/local/lib ) works... yes
16:24:18     INFO -  checking whether the C++ compiler (/usr/bin/ccache /home/worker/workspace/build/src/gcc/bin/g++  -L/home/worker/workspace/build/src/gtk3/usr/local/lib ) is a cross-compiler... no
16:24:18     INFO -  checking whether we are using GNU C++... (cached) yes

And later on:

16:24:20     INFO -  configure: error: Can't use clang plugin without clang.

The problem is that we're doing an incremental build over an object directory which has been using gcc as the compiler, so things are all confused.

I can "fix" this by making these builds clobber builds, but is there a better way to deal with this?
Flags: needinfo?(dustin)
(Reporter)

Updated

3 years ago
See Also: → bug 1207135
Ah, just use a different cache name in the task description.  testing/taskcluster/tasks/builds/opt_linux64.yml has

task:
  # same as clobber, but with a cached workspace
  scopes:
    - 'docker-worker:cache:build-linux64-c6-workspace'

  payload:
    cache:
      build-linux64-c6-workspace: '/home/worker/workspace'

which is specifying the cache named build-linux64-c6-workspace.  So you'll need to instead inherit from opt_linux64_clobber.yml and then use a cache with a different name (st-an specific), and update the scopes to allow that cache.
Flags: needinfo?(dustin)
In fact, this is polluting caches the other way 'round too (bug 1208356).
Created attachment 8666014 [details]
MozReview Request: Bug 1208279: use a different cache for static analysis builds; r?ehsan

Bug 1208279: use a different cache for static analysis builds; r?ehsan
Comment on attachment 8666014 [details]
MozReview Request: Bug 1208279: use a different cache for static analysis builds; r?ehsan

I'm hoping "don't ask me for review" doesn't apply in this case :)
Attachment #8666014 - Flags: review?(ehsan)
Assignee: nobody → dustin
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Duplicate of this bug: 1208356
(Reporter)

Comment 13

3 years ago
Comment on attachment 8666014 [details]
MozReview Request: Bug 1208279: use a different cache for static analysis builds; r?ehsan

https://reviewboard.mozilla.org/r/20405/#review18331

Awesome, thanks for the quick fix!
Attachment #8666014 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/mozilla-central/rev/ccb137011a0c
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Duplicate of this bug: 1208188

Updated

8 months ago
Product: TaskCluster → Firefox Build System
You need to log in before you can comment on or make changes to this bug.