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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrap panic: overflow when subtracting durations #129959

Open
12101111 opened this issue Sep 4, 2024 · 1 comment
Open

bootstrap panic: overflow when subtracting durations #129959

12101111 opened this issue Sep 4, 2024 · 1 comment
Labels
A-time Area: Time C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@12101111
Copy link
Contributor

12101111 commented Sep 4, 2024

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

@12101111 12101111 added the C-bug Category: This is a bug. label Sep 4, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 4, 2024
@jieyouxu jieyouxu added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Sep 4, 2024
@saethlin saethlin added T-libs Relevant to the library team, which will review and decide on the PR/issue. A-time Area: Time and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Sep 4, 2024
@saethlin
Copy link
Member

saethlin commented Sep 4, 2024

This looks an awful lot like the situation that #56988 was supposed to paper over. The fact that you're reporting this from gentoo makes me fear something highly custom is relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-time Area: Time C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants