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

no ImplicitCtxt stored in tls #117777

Closed
k-bx opened this issue Nov 10, 2023 · 1 comment
Closed

no ImplicitCtxt stored in tls #117777

k-bx opened this issue Nov 10, 2023 · 1 comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-compiler-parallel Working group: Parallelizing the compiler

Comments

@k-bx
Copy link

k-bx commented Nov 10, 2023

First cargo build crashed after upgrade to nightly, second run succeeded. My config.toml is using the latest parallelism feature:

[build]
rustflags = ["--cfg", "uuid_unstable", "-Z", "threads=8"]

Terminal output:

thread 'rustc' panicked at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/compiler/rustc_middle/src/ty/context/tls.rs:111:50:
no ImplicitCtxt stored in tls
stack backtrace:
   0:        0x1033612b8 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h052d4a6449303d0c
   1:        0x1033a3268 - core::fmt::write::hd7376fa11f842969
   2:        0x1033579ec - std::io::Write::write_fmt::h8962cd07816e935b
   3:        0x1033610f4 - std::sys_common::backtrace::print::h97fb0a8a4077c481
   4:        0x103363af4 - std::panicking::default_hook::{{closure}}::h3b4672ac61ca5355
   5:        0x10336383c - std::panicking::default_hook::h609e6a125a90b4e7
   Compiling tokio-util v0.7.10
   6:        0x10c76abb8 - <alloc[e142c9bf9c63cfc4]::boxed::Box<rustc_driver_impl[1a98898d3f3a38ed]::install_ice_hook::{closure#0}> as core[4e0a19b8f4e7b450]::ops::function::Fn<(&dyn for<'a, 'b> core[4e0a19b8f4e7b450]::ops::function::Fn<(&'a core[4e0a19b8f4e7b450]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[4e0a19b8f4e7b450]::marker::Send + core[4e0a19b8f4e7b450]::marker::Sync, &core[4e0a19b8f4e7b450]::panic::panic_info::PanicInfo)>>::call
   7:        0x10336416c - std::panicking::rust_panic_with_hook::h9625542414b348eb
   8:        0x103363f34 - std::panicking::begin_panic_handler::{{closure}}::hb4fa343c314105dc
   9:        0x103361720 - std::sys_common::backtrace::__rust_end_short_backtrace::he263cec7b035e782
  10:        0x103363cd0 - _rust_begin_unwind
  11:        0x1033bd0b8 - core::panicking::panic_fmt::h624e311b541e9a0d
  12:        0x1033bd084 - core::option::expect_failed::h3320581af4499170
  13:        0x10c71a0d0 - rustc_interface[6fd153b9b61224af]::util::run_in_thread_pool_with_globals::<rustc_interface[6fd153b9b61224af]::interface::run_compiler<core[4e0a19b8f4e7b450]::result::Result<(), rustc_span[7d3d88934d9d268]::ErrorGuaranteed>, rustc_driver_impl[1a98898d3f3a38ed]::run_compiler::{closure#1}>::{closure#0}, core[4e0a19b8f4e7b450]::result::Result<(), rustc_span[7d3d88934d9d268]::ErrorGuaranteed>>::{closure#2}
  14:        0x1104774fc - <rayon_core[cbb553a4c613b58b]::sleep::Sleep>::sleep
  15:        0x110476a04 - <rayon_core[cbb553a4c613b58b]::registry::WorkerThread>::wait_until_cold
  16:        0x10be6a22c - <rayon_core[cbb553a4c613b58b]::registry::ThreadBuilder>::run
  17:        0x10c771610 - rustc_span[7d3d88934d9d268]::set_session_globals_then::<(), rustc_interface[6fd153b9b61224af]::util::run_in_thread_pool_with_globals<rustc_interface[6fd153b9b61224af]::interface::run_compiler<core[4e0a19b8f4e7b450]::result::Result<(), rustc_span[7d3d88934d9d268]::ErrorGuaranteed>, rustc_driver_impl[1a98898d3f3a38ed]::run_compiler::{closure#1}>::{closure#0}, core[4e0a19b8f4e7b450]::result::Result<(), rustc_span[7d3d88934d9d268]::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}::{closure#0}>
  18:        0x10c71a44c - <<crossbeam_utils[6313ccede057e440]::thread::ScopedThreadBuilder>::spawn<<rayon_core[cbb553a4c613b58b]::ThreadPoolBuilder>::build_scoped<rustc_interface[6fd153b9b61224af]::util::run_in_thread_pool_with_globals<rustc_interface[6fd153b9b61224af]::interface::run_compiler<core[4e0a19b8f4e7b450]::result::Result<(), rustc_span[7d3d88934d9d268]::ErrorGuaranteed>, rustc_driver_impl[1a98898d3f3a38ed]::run_compiler::{closure#1}>::{closure#0}, core[4e0a19b8f4e7b450]::result::Result<(), rustc_span[7d3d88934d9d268]::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface[6fd153b9b61224af]::util::run_in_thread_pool_with_globals<rustc_interface[6fd153b9b61224af]::interface::run_compiler<core[4e0a19b8f4e7b450]::result::Result<(), rustc_span[7d3d88934d9d268]::ErrorGuaranteed>, rustc_driver_impl[1a98898d3f3a38ed]::run_compiler::{closure#1}>::{closure#0}, core[4e0a19b8f4e7b450]::result::Result<(), rustc_span[7d3d88934d9d268]::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core[4e0a19b8f4e7b450]::result::Result<(), rustc_span[7d3d88934d9d268]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core[4e0a19b8f4e7b450]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  19:        0x10c778478 - std[f37625d93cba7df1]::sys_common::backtrace::__rust_begin_short_backtrace::<alloc[e142c9bf9c63cfc4]::boxed::Box<dyn core[4e0a19b8f4e7b450]::ops::function::FnOnce<(), Output = ()> + core[4e0a19b8f4e7b450]::marker::Send>, ()>
  20:        0x10c74c5f0 - <<std[f37625d93cba7df1]::thread::Builder>::spawn_unchecked_<alloc[e142c9bf9c63cfc4]::boxed::Box<dyn core[4e0a19b8f4e7b450]::ops::function::FnOnce<(), Output = ()> + core[4e0a19b8f4e7b450]::marker::Send>, ()>::{closure#1} as core[4e0a19b8f4e7b450]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  21:        0x10336c368 - std::sys::unix::thread::Thread::new::thread_start::h6af77cae4d08b8df
  22:        0x1872c9034 - __pthread_joiner_wake

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please attach the file at `/Users/kon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.30/rustc-ice-2023-11-10T09_27_20-25532.txt` to your bug report

note: compiler flags: --crate-type lib -C embed-bitcode=no -Z threads=8

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
Rayon: detected unexpected panic; aborting
error: could not compile `time` (lib)

Caused by:
  process didn't exit successfully: `/Users/kon/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/rustc --crate-name time --edition=2021 /Users/kon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.30/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=206 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no --cfg 'feature="alloc"' --cfg 'feature="default"' --cfg 'feature="formatting"' --cfg 'feature="macros"' --cfg 'feature="parsing"' --cfg 'feature="std"' -C metadata=9b9908c14e0eb2d6 -C extra-filename=-9b9908c14e0eb2d6 --out-dir /Users/kon/workspace/target/target-rs/target/debug/deps -L dependency=/Users/kon/workspace/target/target-rs/target/debug/deps --extern deranged=/Users/kon/workspace/target/target-rs/target/debug/deps/libderanged-709b260a5bf657a7.rmeta --extern itoa=/Users/kon/workspace/target/target-rs/target/debug/deps/libitoa-74b7ba35877b0a7f.rmeta --extern powerfmt=/Users/kon/workspace/target/target-rs/target/debug/deps/libpowerfmt-7074e6e726d67e03.rmeta --extern time_core=/Users/kon/workspace/target/target-rs/target/debug/deps/libtime_core-e0f9755e418168c2.rmeta --extern time_macros=/Users/kon/workspace/target/target-rs/target/debug/deps/libtime_macros-28f300b509d1cafa.dylib --cap-lints allow --cfg uuid_unstable -Z threads=8` (signal: 6, SIGABRT: process abort signal)
warning: build failed, waiting for other jobs to finish...

rustc-ice-2023-11-10T09_27_20-25532.txt

@k-bx k-bx added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 10, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 10, 2023
@SparrowLii SparrowLii added the WG-compiler-parallel Working group: Parallelizing the compiler label Nov 10, 2023
@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 10, 2023
@petrochenkov
Copy link
Contributor

Duplicate of #111522.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-compiler-parallel Working group: Parallelizing the compiler
Projects
None yet
Development

No branches or pull requests

5 participants