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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo build -j <large> does not start compiling #11723

Open
matthiaskrgr opened this issue Feb 15, 2023 · 3 comments
Open

cargo build -j <large> does not start compiling #11723

matthiaskrgr opened this issue Feb 15, 2023 · 3 comments
Labels
A-jobserver Area: jobserver, concurrency, parallelism C-bug Category: bug S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

Comments

@matthiaskrgr
Copy link
Member

Problem

.

Steps

  1. go into cargo repo
  2. cargo build -j 100000
  3. observe as cargo neither consumes any CPU nor starts actually compiling 馃

Possible Solution(s)

No response

Notes

No response

Version

cargo 1.69.0-nightly (39c13e67a 2023-02-12)
release: 1.69.0-nightly
commit-hash: 39c13e67a5962466cc7253d41bc1099bbcb224c3
commit-date: 2023-02-12
host: x86_64-unknown-linux-gnu
libgit2: 1.5.0 (sys:0.16.0 vendored)
libcurl: 7.86.0-DEV (sys:0.4.59+curl-7.86.0 vendored ssl:OpenSSL/1.1.1q)
os: Manjaro 22.0.3 (Sikaris) [64-bit]
@matthiaskrgr matthiaskrgr added the C-bug Category: bug label Feb 15, 2023
@matthiaskrgr
Copy link
Member Author

with CARGO_LOG=debug cargo

        ): {
            "clone-impls",
            "default",
            "derive",
            "full",
            "parsing",
            "printing",
            "proc-macro",
            "quote",
        },
        (
            PackageId {
                name: "sha2",
                version: "0.10.6",
                source: "registry `crates-io`",
            },
            NormalOrDev,
        ): {
            "default",
            "std",
        },
    }
[2023-02-15T21:43:20Z DEBUG cargo::util::rustc] adding rustup info to rustc fingerprint
[2023-02-15T21:43:20Z DEBUG cargo::util::rustc] reusing existing rustc info cache
[2023-02-15T21:43:20Z DEBUG cargo::util::rustc] rustc info cache hit

@ehuss
Copy link
Contributor

ehuss commented Feb 15, 2023

This is likely the jobserver filling the pipe beyond pipe-max-size (which I think is 64k on most linux systems?).

@ehuss ehuss added the A-jobserver Area: jobserver, concurrency, parallelism label Feb 15, 2023
@matthiaskrgr
Copy link
Member Author

Oh interesting.
It indeed breaks at around 67000 but works with 64000. Guess I will never use my system to its true potential 馃檭

I checked with strace and I saw a bunch of

write(30, "|", 1)                       = 1
write(30, "|", 1)                       = 1
write(30, "|", 1)                       = 1
write(30, "|", 1)                       = 1
write(30, "|", 1)                       = 1
write(30, "|", 1)                       = 1
write(30, "|", 1)                       = 1
write(30, "|", 1)                       = 1

Ceci n'est pas une pipe :)

@weihanglo weihanglo added the S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted. label Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-jobserver Area: jobserver, concurrency, parallelism C-bug Category: bug S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Projects
None yet
Development

No branches or pull requests

3 participants