-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Release a jobserver token while locking a file #6748
Conversation
r? @ehuss (rust_highfive has picked a reviewer for you, use r? to override) |
c5e821b
to
47cc83f
Compare
This is intended to fix rust-lang#6747 where multiple Cargos invoked with the same jobserver would all have their own token but not actually run concurrently due to file locking. Instead the fix is that whenever Cargo blocks for a file lock with a configured global jobserver, a token is released just before we block and then reacquired afterwards. This way we should ensure that we're not hogging a cpu/token unnecessarily without doing any work! Closes rust-lang#6747
47cc83f
to
d19b41f
Compare
@bors: r=ehuss |
📌 Commit d19b41f has been approved by |
⌛ Testing commit d19b41f with merge c24978b99f510f61213af8f6482763fa0d064f31... |
💔 Test failed - status-appveyor |
Looks like minimal versions don't work with the 0.6.5 release of `rand` on Windows...
Hm ok I've had to push up a commit which removes the minimal-versions build on Windows. Unfortunately if you create a new project, add |
I suspect this is the same issue found in #6636. I can take a look at fixing rand's minimal versions. I think switching to a direct-dependency-only minimal versions might be the better long-term solution (#5657 (comment)). But I have not thought much about how it could be implemented or what complications may arise. |
Given that #6636 and this are stuck on fixing rands minimal version, I think declaring the minimal-version experiment dead is justified, or at least suspending it until someone fixes rand. I have had only enough time to determine that it won't be trivial. |
It looks like the fundamental rand issues in 0.6 have been fixed (via rust-random/rand#703), but new versions of some of the subcrates (like Given the comments (rust-random/rand#741 (comment)) I'm not sure if they'd be receptive to doing the work to accommodate this. I can open an issue on rand, but I don't really want to police the entire ecosystem to keep this working. |
So this is the logjam as I see it:
There are 2 nash-equilibrium. We stabilize it and the ecosystem adapts or we officially give up on it. Maybe we find some smaller version that can get us out of the jam. But the current state of affairs is not stable. |
Yeah I definitely agree the direct-dependency-only version would likely solve this, but @ehuss I wouldn't necessarily take this as a signal that we need to fix Are y'all ok though temporarily at least removing this from Windows CI? |
I'm OK with this. |
I am ok with it. |
Ok! @bors: r=ehuss |
📌 Commit 512fccb has been approved by |
Release a jobserver token while locking a file This is a possible solution to #6747, but we'll ideally get some testing in before landing!
☀️ Test successful - checks-travis, status-appveyor |
This is a rework of rust-lang#6636 now possible do to the change in testing from rust-lang#6748
Anyone know why we only hit this on windows, but hit it on travis for #6753 ? |
Jobserver only uses rand on windows. |
Update cargo Update cargo 22 commits in 0e35bd8af0ec72d3225c4819b330b94628f0e9d0..63231f438a2b5b84ccf319a5de22343ee0316323 2019-03-13 06:52:51 +0000 to 2019-03-27 12:26:45 +0000 - Code cleanup (rust-lang/cargo#6787) - Add cargo:rustc-link-arg to pass custom linker arguments (rust-lang/cargo#6298) - Testsuite: remove some unnecessary is_nightly checks. (rust-lang/cargo#6786) - cargo metadata: Don't show `null` deps. (rust-lang/cargo#6534) - Some fingerprint cleanup. (rust-lang/cargo#6785) - Fix fingerprint for canceled build script. (rust-lang/cargo#6782) - Canonicalize default target if it ends with `.json` (rust-lang/cargo#6778) - Fix setting `panic=unwind` compiling lib a extra time. (rust-lang/cargo#6781) - Always nicely show errors from crates.io if possible (rust-lang/cargo#6771) - Testsuite: Make `cwd()` relative to project root. (rust-lang/cargo#6768) - Allow `cargo fix` if gitignore matches root working dir. (rust-lang/cargo#6767) - Remove redundant imports (rust-lang/cargo#6763) - Handle backcompat hazard with `toml` crate (rust-lang/cargo#6761) - Fix spurious error in dirty_both_lib_and_test. (rust-lang/cargo#6756) - Update toml requirement from 0.4.2 to 0.5.0 (rust-lang/cargo#6760) - Reuse std::env::consts::EXE_SUFFIX (rust-lang/cargo#6758) - Proptest 0.9.1 (rust-lang/cargo#6753) - Don't need extern crate in 2018 (rust-lang/cargo#6752) - Release a jobserver token while locking a file (rust-lang/cargo#6748) - Minor doc fix for publish command synopsis (rust-lang/cargo#6749) - Stricter package change detection. (rust-lang/cargo#6740) - Fix resolving yanked crates when using a local registry. (rust-lang/cargo#6742)
This is a possible solution to #6747, but we'll ideally get some testing
in before landing!