-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed as not planned
Labels
A-networkingArea: networking issues, curl, etc.Area: networking issues, curl, etc.C-bugCategory: bugCategory: bugCommand-fetchPerformanceGotta go fast!Gotta go fast!
Description
Problem
It used to be possible to run multiple cargo fetch in parallel inside the same cargo home, but it's not possible anymore on the latest nightly: the following fetch invocations just wait for the package cache lock until the other fetches finish.
This is bad for Crater since it slows down fetching deps to 1/8.
Steps
#!/bin/bash
set +euo pipefail
if [[ $# -ne 1 ]]; then
echo "usage: $0 <toolchain-name>"
exit 1
fi
export RUSTUP_TOOLCHAIN="$1"
# Use a temporary cargo home so the user-wide one is not messed up
export CARGO_HOME=tmp-cargo-home
set -x
# Create a simple repro crate which depends on lazy_static
cargo init --bin repro
cd repro
echo 'reqwest = "*"' >> Cargo.toml
# Generate the lockfile and fetch the dependencies using it
cargo generate-lockfile
cargo fetch --locked >/dev/null 2>&1 &
sleep 0.1
cargo fetch --lockedbash repro.sh stablefor the correct behaviorbash repro.sh nightlyfor the wrong behavior
Possible Solution(s)
After talking to @Eh2406 the issue seems to be caused by #6880.
Metadata
Metadata
Assignees
Labels
A-networkingArea: networking issues, curl, etc.Area: networking issues, curl, etc.C-bugCategory: bugCategory: bugCommand-fetchPerformanceGotta go fast!Gotta go fast!