Skip to content

cargo doesn't respect the maximum number of jobs #7772

@glandium

Description

@glandium

Problem
When running cargo with an explicit -jn, or via GNU make with an explicit -jn, the number of jobs can actually exceed the limit given. Presumably, the same happens without -jn, but now that I have 32 cores/64 threads, I can't find a crate that saturates them.

Steps

  1. clone the cargo repository
  2. run cargo build -j4 -Z timings
  3. open cargo-timings.html

You'll notice that at some point the number of active jobs goes over 4. This report (cargo-timing.zip) goes up to 7.

Notes

Output of cargo version:

cargo 1.42.0-nightly (86134e766 2019-12-23)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions