Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrap: build locking doesn't work any more #109967

Closed
jyn514 opened this issue Apr 5, 2023 · 7 comments · Fixed by #110485
Closed

bootstrap: build locking doesn't work any more #109967

jyn514 opened this issue Apr 5, 2023 · 7 comments · Fixed by #110485
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself C-bug Category: This is a bug. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@jyn514
Copy link
Member

jyn514 commented Apr 5, 2023

I tried this code:

x t tidy & x t tidy

I expected to see this happen: Bootstrap is built, and one process runs tidy while the other says "waiting for build lock"

Instead, this happened:

; x t tidy & x t tidy 
[1] 34539
Building bootstrap
Building bootstrap
    Blocking waiting for file lock on build directory
    Finished dev [unoptimized] target(s) in 0.20s
    Finished dev [unoptimized] target(s) in 0.24s
Building tool tidy (stage0)
warning: creating symbolic link `/Users/jyn/src/rust/build/aarch64-apple-darwin/stage0-sysroot/lib/rustlib/src/rust` to `/Users/jyn/src/rust` failed with File exists (os error 17)
warning: creating symbolic link `/Users/jyn/src/rust/build/aarch64-apple-darwin/stage0-sysroot/lib/rustlib/rustc-src/rust` to `/Users/jyn/src/rust` failed with File exists (os error 17)
Building tool tidy (stage0)
    Finished release [optimized] target(s) in 0.98s
fmt check
    Finished release [optimized] target(s) in 1.14s
fmt check

Meta

HEAD is branched from 90a9f69.

; uname -a
Darwin jyns-MacBook-Pro 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar  6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 arm64
@jyn514 jyn514 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself labels Apr 5, 2023
@jyn514
Copy link
Member Author

jyn514 commented Apr 5, 2023

I do have a build/lock file, but apparently flock isn't working correctly?

@jyn514
Copy link
Member Author

jyn514 commented Apr 18, 2023

@miguelraz also ran into this on Linux. I'm starting to think locking is just completely broken.

@Ezrashaw
Copy link
Contributor

I can confirm it doesn't seem to work on linux. Although it is important to note that cargo still correctly locks, so most things should de-duplicate from cargo anyway.

@jyn514
Copy link
Member Author

jyn514 commented Apr 18, 2023

No, bootstrap has its own locking issues separate from cargo because it deletes and recreates the sysroot. See #76661.

@jyn514 jyn514 added E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. labels Apr 18, 2023
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Apr 18, 2023
@jyn514 jyn514 changed the title bootstrap: build locking doesn't seem to work on MacOS bootstrap: build locking doesn't work any more Apr 18, 2023
@Ezrashaw
Copy link
Contributor

Ahh, I'm just seeing the behaviour you saw here. At least x t tidy times 2 doesn't crash and burn lol.

@albertlarsan68
Copy link
Member

Well... It may very well be #108607🤦. I see a quick fix, just move the lock guard back out of the block.

@fee1-dead
Copy link
Member

This might be the cause of supposed "incremental errors" that has occurred to me when rust-analyzer and the command line is running at the same time.

@bors bors closed this as completed in aa1247a Apr 18, 2023
@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself C-bug Category: This is a bug. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants