Description
Problem
Running the cargo testsuite on a single-CPU machine hangs on jobserver::jobserver_exists
.
This can also be reproduced on other machines by limiting the available CPUs, e.g. with taskset
on Linux.
Steps
cargo test --test testsuite --no-run
taskset --cpu-list 0 cargo test --test testsuite -- --exact jobserver::jobserver_exists
Possible Solution(s)
That test has a build script reading CARGO_MAKEFLAGS
and trying to read/write the jobserver pipes, taking and releasing a job token. I suppose in this nested invocation, all tokens must already be in use? But there's no problem when I use cargo test -j1
without restricting the taskset
, so I'm not sure what's the difference.
Notes
Output of cargo version
:
cargo 1.47.0-nightly (1653f3546 2020-08-04)
release: 1.47.0
commit-hash: 1653f354644834073d6d2541e27fae94588e685e
commit-date: 2020-08-04
First seen in the rpm build of 1.45.2 for RHEL 8.3.0 ppc64le while running the testsuite. Usually I get a multi-CPU builder though, so I can't say this is a new issue.
Reproduced on Fedora 32 x86_64 with cargo nightly, by limiting the CPUs with taskset
as above.