-
Notifications
You must be signed in to change notification settings - Fork 13.3k
make rustdoc test follow the jobserver limit of threads #50134
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
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
👍 |
// Pick a "reasonable maximum" if we don't otherwise have a jobserver in | ||
// our environment, capping out at 32 so we don't take everything down | ||
// by hogging the process run queue. | ||
Client::new(32).expect("failed to create jobserver") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexcrichton, do you remember why we picked 32 instead of num_cpus here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes that has to do with deterministic compilation. With num_cpus
then you can have different results across machines from the sheer fact that the number of cpus were different. With 32, however, it's deterministic across all machines.
src/librustc/session/mod.rs
Outdated
static INIT: std::sync::Once = std::sync::ONCE_INIT; | ||
INIT.call_once(|| { | ||
GLOBAL_JOBSERVER = Box::into_raw(Box::new(Client::from_env())); | ||
let client = Client::from_env().unwrap_or_else(|| { | ||
Client::new(::num_cpus::get()).expect("failed to create jobserver") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andjo403, given @alexcrichton's comment below, could you change this 32? Most of the time there'll be a jobserver around anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michaelwoerister have updated now and added a comment about why there is a fixed value.
Thanks for the feedback
…ny threads is executing at the same timewhen rustdoc test is executed.
Is this finished? If so, how do the changes relate to rustdoc? |
yes this was all that I think is needed, it works when I tested. |
Oh ok, that makes sense! Great find! @bors r+ |
📌 Commit ed318dd has been approved by |
⌛ Testing commit ed318dd with merge ba3707e1a2fa8c282a345f2f7f660268b7a9a15a... |
💔 Test failed - status-appveyor |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@bors: retry
* crates.io was down
…On Tue, Apr 24, 2018 at 8:00 PM, Rust highfive robot < ***@***.***> wrote:
The job x86_64-gnu-llvm-3.9 of your PR failed on Travis
<https://travis-ci.org/rust-lang/rust/jobs/370848629> (raw log
<https://api.travis-ci.org/v3/job/370848629/log.txt>). Through arcane
magic we have determined that the following fragments from the build log
may contain information about the problem.
*Click to expand the log.*
[00:01:23] Downloading serde_json v1.0.15
[00:01:23] error: unable to get packages from source
[00:01:23]
[00:01:23] Caused by:
[00:01:23] failed to get 200 response from `https://crates.io/api/v1/crates/serde_json/1.0.15/download` <https://crates.io/api/v1/crates/serde_json/1.0.15/download>, got 404
[00:01:23] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:23] Build completed unsuccessfully in 0:00:36
[00:01:23] make: *** [prepare] Error 1
[00:01:23] Makefile:81: recipe for target 'prepare' failed
[00:01:24] Downloading num_cpus v1.8.0
[00:01:24] error: unable to get packages from source
[00:01:24]
[00:01:24] Caused by:
[00:01:24] Caused by:
[00:01:24] failed to get 200 response from `https://crates.io/api/v1/crates/num_cpus/1.8.0/download` <https://crates.io/api/v1/crates/num_cpus/1.8.0/download>, got 404
[00:01:24] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:24] Build completed unsuccessfully in 0:00:00
[00:01:24] make: *** [prepare] Error 1
[00:01:24] Makefile:81: recipe for target 'prepare' failed
[00:01:25] Downloading toml v0.4.6
[00:01:25] error: unable to get packages from source
[00:01:25]
[00:01:25] Caused by:
[00:01:25] Caused by:
[00:01:25] failed to get 200 response from `https://crates.io/api/v1/crates/toml/0.4.6/download` <https://crates.io/api/v1/crates/toml/0.4.6/download>, got 404
[00:01:25] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:25] Build completed unsuccessfully in 0:00:00
[00:01:25] Makefile:81: recipe for target 'prepare' failed
[00:01:25] make: *** [prepare] Error 1
[00:01:25] Downloading cc v1.0.10
[00:01:25] error: unable to get packages from source
[00:01:25]
[00:01:25] Caused by:
[00:01:25] Caused by:
[00:01:25] failed to get 200 response from `https://crates.io/api/v1/crates/cc/1.0.10/download` <https://crates.io/api/v1/crates/cc/1.0.10/download>, got 404
[00:01:25] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:25] Build completed unsuccessfully in 0:00:00
[00:01:25] Makefile:81: recipe for target 'prepare' failed
[00:01:25] make: *** [prepare] Error 1
[00:01:26] Downloading filetime v0.1.15
[00:01:26] warning: spurious network error (2 tries remaining): failed to get 200 response from `https://crates.io/api/v1/crates/filetime/0.1.15/download` <https://crates.io/api/v1/crates/filetime/0.1.15/download>, got 500
[00:01:26] warning: spurious network error (1 tries remaining): failed to get 200 response from `https://crates.io/api/v1/crates/filetime/0.1.15/download` <https://crates.io/api/v1/crates/filetime/0.1.15/download>, got 500
[00:01:26] error: unable to get packages from source
[00:01:26] error: unable to get packages from source
[00:01:26]
[00:01:26] Caused by:
[00:01:26] failed to get 200 response from `https://crates.io/api/v1/crates/filetime/0.1.15/download` <https://crates.io/api/v1/crates/filetime/0.1.15/download>, got 500
[00:01:26] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:26] Build completed unsuccessfully in 0:00:00
[00:01:26] make: *** [prepare] Error 1
[00:01:26] Makefile:81: recipe for target 'prepare' failed
[00:01:26] The command has failed after 5 attempts.
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 1.
travis_time:start:213d22b8
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
I'm a bot <https://github.com/rust-ops/rust-log-analyzer>! I can only do
what humans tell me to, so if this was not helpful or you have suggestions
for improvements, please ping or otherwise contact ***@***.****. (Feature
Requests
<https://github.com/rust-ops/rust-log-analyzer/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request>
)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#50134 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAD95Co8QVk3p2BBUD01Pq0y7l7Zj-qgks5tr8rFgaJpZM4TeU3C>
.
|
make rustdoc test follow the jobserver limit of threads fix that to many threads is executing at the same time when rustdoc test is executed.
☀️ Test successful - status-appveyor, status-travis |
fix that to many threads is executing at the same time
when rustdoc test is executed.