Skip to content

bootstrap panic: overflow when subtracting durations #129959

Closed
@12101111

Description

@12101111

I tried to bootstrap rustc 1.81.0 pre-release (2024-09-03) with 1.80.1 using Gentoo portage

I expected to see this happen: It should build

Instead, this happened: bootsteap panic here

(out, dur - deps)

Note: this is not always reproducible

Meta

rustc --version --verbose:

rustc 1.80.1 (3f5fd8dd4 2024-08-06) (gentoo)
binary: rustc
commit-hash: 3f5fd8dd41153bc5fdca9427e9e05be2c767ba23
commit-date: 2024-08-06
host: x86_64-unknown-linux-musl
release: 1.80.1
LLVM version: 18.1.8
Backtrace

Copy/Link "/tmp/portage/dev-lang/rust-1.81.0_rc20240903/work/rustc-1.81.0-src/build/x86_64-unknown-linux-musl/stage2-tools/x86_64-unknown-linux-musl/release/clippy-driver" to "/tmp/portage/dev-lang/rust-1.81.0_rc20240903/work/rustc-1.81.0-src/
build/x86_64-unknown-linux-musl/stage2/bin/clippy-driver"
Copy/Link "/tmp/portage/dev-lang/rust-1.81.0_rc20240903/work/rustc-1.81.0-src/build/x86_64-unknown-linux-musl/stage2-tools/x86_64-unknown-linux-musl/release/cargo-clippy" to "/tmp/portage/dev-lang/rust-1.81.0_rc20240903/work/rustc-1.81.0-src/build/x86_64-unknown-linux-musl/stage2/bin/cargo-clippy"
thread 'main' panicked at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/time.rs:1150:31:
overflow when subtracting durations
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::option::expect_failed
   3: core::option::Option<T>::expect
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/option.rs:898:21
   4: <core::time::Duration as core::ops::arith::Sub>::sub
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/time.rs:1150:31
   5: bootstrap::core::builder::Builder::ensure
             at ./src/bootstrap/src/core/builder.rs:2252:19
   6: <bootstrap::core::build_steps::tool::Clippy as bootstrap::core::builder::Step>::make_run
             at ./src/bootstrap/src/core/build_steps/tool.rs:1042:17
   7: bootstrap::core::builder::StepDescription::maybe_run
             at ./src/bootstrap/src/core/builder.rs:392:13
   8: bootstrap::core::builder::StepDescription::run
             at ./src/bootstrap/src/core/builder.rs:433:21
   9: bootstrap::core::builder::Builder::run_step_descriptions
             at ./src/bootstrap/src/core/builder.rs:1098:9
  10: bootstrap::core::builder::Builder::execute_cli
             at ./src/bootstrap/src/core/builder.rs:1078:9
  11: bootstrap::Build::build
             at ./src/bootstrap/src/lib.rs:667:13
  12: bootstrap::main
             at ./src/bootstrap/src/bin/main.rs:79:5
  13: core::ops::function::FnOnce::call_once
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Traceback (most recent call last):
  File "/tmp/portage/dev-lang/rust-1.81.0_rc20240903/work/rustc-1.81.0-src/./x.py", line 50, in <module>
    bootstrap.main()
  File "/tmp/portage/dev-lang/rust-1.81.0_rc20240903/work/rustc-1.81.0-src/src/bootstrap/bootstrap.py", line 1191, in main
    bootstrap(args)
  File "/tmp/portage/dev-lang/rust-1.81.0_rc20240903/work/rustc-1.81.0-src/src/bootstrap/bootstrap.py", line 1167, in bootstrap
    run(args, env=env, verbose=build.verbose, is_bootstrap=True)
  File "/tmp/portage/dev-lang/rust-1.81.0_rc20240903/work/rustc-1.81.0-src/src/bootstrap/bootstrap.py", line 186, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /tmp/portage/dev-lang/rust-1.81.0_rc20240903/work/rustc-1.81.0-src/build/bootstrap/debug/bootstrap build -vvv --config=/tmp/portage/dev-lang/rust-1.81.0_rc20240903/work/rustc-1.81.0-src/config.toml -j30

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-timeArea: TimeC-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions