Change:
I tried this: src/test/ui/fn/issue--no- I expected to see this happen: the test suite is run, possibly building the testsuite binary using the existing stage 1 . Instead, this happened: the stage 1 is rebuilt before running the test suite. This seems to happen randomly; I had rerun the test suite quite a few times using the same command with no issues. This is rather inconvenient since even with 16 logical cores, building takes several minutes and grinds my machine to a halt. This doesn't just seem to happen when running the test suite, but I'm less confident about saying that rebuilds after modifying rustc's codebase are spurious. modify labels +A-contributor-roadblock +A-rustbuild
Can you try running with CARGO_LOG=cargo::core::compiler::fingerprint=info and provide a build log when you see a spurious rebuild?
Got one [ended after seeing it was building to spare my poor swap space]: <details<summaryLog</summary</detailsAlso encountered an ICE that I'll file a bug report for ().
cc any idea on what could be causing the nothing obvious fingerprint error here? Or how to debug it?
It looks like this has to do with: is this a case where a flag is used to track rlib/rmeta files, and the sysroot files are changing somehow? Are those files indeed missing? Or maybe they're linked in at a later stage of rustbuild?
Hm, yes, we're definitely tracking sysroot files, but they shouldn't be missing - can you check whether those files are actually present? Do you perhaps have something like x.py check running from your editor in the background?
That file does seem to exist. I am running via rust-analyzer, so that may be part of the issue.
I think this is a duplicate of

Discussion:
from time import time <ins> # Acquire a lock on the build directory to make sure that # we don't cause a race condition while building # Lock is created in `build_dir/lock.db` def acquire_lock(build_dir): try: import sqlite3 path = os.path.join(build_dir, "lock.db") try: con = sqlite3.Connection(path, timeout=0) curs = con.cursor() curs.execute("BEGIN EXCLUSIVE") # The lock is released when the cursor is dropped return curs # If the database is busy then lock has already been acquired # so we wait for the lock. # We retry every quarter second so that execution is passed back to python # so that it can handle signals except sqlite3.OperationalError: del con del curs print("Waiting for lock on build directory") con = sqlite3.Connection(path, timeout=0.25) curs = con.cursor() while True: try: curs.execute("BEGIN EXCLUSIVE") except sqlite3.OperationalError: pass return curs except ImportError: print("warning: sqlite3 not available in python, skipping build directory lock") print("please file an issue on rust-lang/rust") print("this is not a problem for non-concurrent x.py invocations") return None </ins> def support_xz(): try: with tempfile.NamedTemporaryFile(delete=False) as temp_file:

build.set_dist_environment(data["dist_server"]) build.build = args.build or build.build_triple() <ins> # Acquire the lock before doing any build actions # The lock is released when `lock` is dropped if not os.path.exists(build.build_dir): os.makedirs(build.build_dir) lock = acquire_lock(build.build_dir) </ins> build.update_submodules() # Fetch/build the bootstrap