Skip to content

Commit

Permalink
Bug 1660614 - Upgrade sccache to pick up more resilient behavior in…
Browse files Browse the repository at this point in the history
… the presence of cache read failures r=froydnj

This avoids a set of intermittent issues related to `zstd` decompression failures, which in the absence of these changes break the entire build.

This also requires [updating an environment variable](mozilla/sccache#822), which we do in `client.mk` as well as documentation.

Differential Revision: https://phabricator.services.mozilla.com/D88184
  • Loading branch information
Ricky Stewart committed Aug 25, 2020
1 parent d2366fb commit b4a3c17
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
15 changes: 11 additions & 4 deletions build/docs/sccache-dist.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,12 @@ must read::
* When attempting to get your client running, the output of ``sccache -s`` should
be consulted to confirm compilations are being distributed. To receive helpful
logging from the local daemon in case they aren't, run
``SCCACHE_NO_DAEMON=1 RUST_LOG=sccache=trace path/to/sccache --start-server``
in a terminal window separate from your build prior to building.
``SCCACHE_NO_DAEMON=1 SCCACHE_LOG=sccache=trace path/to/sccache --start-server``
in a terminal window separate from your build prior to building. *NOTE* use
``RUST_LOG`` instead of ``SCCACHE_LOG`` if your build of ``sccache`` does not
include `pull request 822
<https://github.com/mozilla/sccache/pull/822>`_. (``sccache`` binaries from
``mach bootstrap`` do include this PR.)

* Run ``./mach build -j<value>`` with an appropriately large ``<value>``.
``sccache --dist-status`` should provide the number of cores available to you
Expand Down Expand Up @@ -179,9 +183,12 @@ similar.

Extra logging may be helpful when setting up a server. To enable logging,
run your server with
``sudo env RUST_LOG=sccache=trace ~/.mozbuild/sccache/sccache-dist server --config ~/.config/sccache/server.conf``
``sudo env SCCACHE_LOG=sccache=trace ~/.mozbuild/sccache/sccache-dist server --config ~/.config/sccache/server.conf``
(or similar). *NOTE* ``sudo`` *must* come before setting environment variables
for this to work.
for this to work. *NOTE* use ``RUST_LOG`` instead of ``SCCACHE_LOG`` if your
build of ``sccache`` does not include `pull request 822
<https://github.com/mozilla/sccache/pull/822>`_. (``sccache`` binaries from
``mach bootstrap`` do include this PR.)

As when configuring a client, the scheduler url to use is:
``https://sccache1.corpdmz.<OFFICE>.mozilla.com``, where <OFFICE> is an
Expand Down
2 changes: 1 addition & 1 deletion client.mk
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ build::
# from make (but don't use the + prefix when make -n is used, so that
# the command doesn't run in that case)
mkdir -p $(UPLOAD_PATH)
$(if $(findstring n,$(filter-out --%, $(MAKEFLAGS))),,+)env RUST_LOG=sccache=debug SCCACHE_ERROR_LOG=$(UPLOAD_PATH)/sccache.log $(MOZBUILD_MANAGE_SCCACHE_DAEMON) --start-server
$(if $(findstring n,$(filter-out --%, $(MAKEFLAGS))),,+)env SCCACHE_LOG=sccache=debug SCCACHE_ERROR_LOG=$(UPLOAD_PATH)/sccache.log $(MOZBUILD_MANAGE_SCCACHE_DAEMON) --start-server
endif

####################################
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/ci/fetch/toolchains.yml
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ sccache:
type: git
repo: https://github.com/mozilla/sccache
# 0.2.13 release + various changes
revision: d172e77c1bfd08714e71fe80f80cc149eeae1749
revision: 030c80a15e0b1aba0e61df264b320a21bb21fb15

fxc2:
description: fxc2 source code
Expand Down

0 comments on commit b4a3c17

Please sign in to comment.