Closed
Description
Found when testing the latest compiler optimizations. I was able to reproduce this in debug and release builds and it occurred roughly about 50% of the time.
Code
git clone https://github.com/denoland/deno.git
git checkout fb73eb1e9dca3e93cc7efcf5c2244e0068733843
RUSTFLAGS="-Z threads=8" cargo +nightly build --release
Meta
rustc --version --verbose
:
rustc 1.73.0 (cc66ad468 2023-10-03)
binary: rustc
commit-hash: cc66ad468955717ab92600c770da8c1601a4ff33
commit-date: 2023-10-03
host: x86_64-unknown-linux-gnu
release: 1.73.0
LLVM version: 17.0.2
Error output
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 `/home/mav/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tar-0.4.40/rustc-ice-2023-11-09T22_38_38-31691.txt` to your bug report
note: compiler flags: --crate-type lib -C opt-level=z -C linker-plugin-lto -C codegen-units=1 -Z threads=8
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
deadlock handler panicked, aborting process
error: could not compile `tar` (lib)
Caused by:
process didn't exit successfully: `/home/mav/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name tar --edition=2018 /home/mav/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tar-0.4.40/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=108 --crate-type lib --emit=dep-info,metadata,link -C opt-level=z -C linker-plugin-lto -C codegen-units=1 --cfg 'feature="default"' --cfg 'feature="xattr"' -C metadata=7883584f286fd265 -C extra-filename=-7883584f286fd265 --out-dir /home/mav/code/deno/target/release/deps -L dependency=/home/mav/code/deno/target/release/deps --extern filetime=/home/mav/code/deno/target/release/deps/libfiletime-e951033a3e6b7821.rmeta --extern libc=/home/mav/code/deno/target/release/deps/liblibc-2e9f2a83334b308a.rmeta --extern xattr=/home/mav/code/deno/target/release/deps/libxattr-0ed7f9ec7aeb49d0.rmeta --cap-lints allow -Z threads=8` (signal: 6, SIGABRT: process abort signal)
warning: build failed, waiting for other jobs to finish...
Backtrace
First backtrace
thread '<unnamed>' panicked at compiler/rustc_query_system/src/query/job.rs:543:9:
deadlock detected
stack backtrace:
0: 0x7fc6f4969c9c - std::backtrace_rs::backtrace::libunwind::trace::h8709aeb3a36f95da
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
1: 0x7fc6f4969c9c - std::backtrace_rs::backtrace::trace_unsynchronized::heb9f0713a26f337c
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7fc6f4969c9c - std::sys_common::backtrace::_print_fmt::h1ed75bc02e1d9ee5
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/sys_common/backtrace.rs:67:5
3: 0x7fc6f4969c9c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hddc1fcb1d86cbcd2
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/sys_common/backtrace.rs:44:22
4: 0x7fc6f49cbec0 - core::fmt::rt::Argument::fmt::h19337aa9a2c9da83
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/core/src/fmt/rt.rs:142:9
5: 0x7fc6f49cbec0 - core::fmt::write::h2d162b4d9dda182b
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/core/src/fmt/mod.rs:1117:17
6: 0x7fc6f495dbbf - std::io::Write::write_fmt::hcca591aa27610910
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/io/mod.rs:1763:15
7: 0x7fc6f4969a84 - std::sys_common::backtrace::_print::h90b2688e948a362e
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/sys_common/backtrace.rs:47:5
8: 0x7fc6f4969a84 - std::sys_common::backtrace::print::h75b0cf3671567509
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/sys_common/backtrace.rs:34:9
9: 0x7fc6f496c717 - std::panicking::default_hook::{{closure}}::h6694607f9ccfc6ea
10: 0x7fc6f496c47f - std::panicking::default_hook::h4c80dc8b62887255
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/panicking.rs:292:9
11: 0x7fc6f768cee0 - std[d2e36247d228c058]::panicking::update_hook::<alloc[74ba046d4657710e]::boxed::Box<rustc_driver_impl[741ff592be011714]::install_ice_hook::{closure#0}>>::{closure#0}
12: 0x7fc6f496ce58 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hf3ff6ce13f580837
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/alloc/src/boxed.rs:2021:9
13: 0x7fc6f496ce58 - std::panicking::rust_panic_with_hook::h5ad0da38d014c68e
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/panicking.rs:783:13
14: 0x7fc6f496cb79 - std::panicking::begin_panic_handler::{{closure}}::hdc6d3bffdbbdcfdd
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/panicking.rs:649:13
15: 0x7fc6f496a166 - std::sys_common::backtrace::__rust_end_short_backtrace::h80bfdfe497702363
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/sys_common/backtrace.rs:170:18
16: 0x7fc6f496c912 - rust_begin_unwind
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/panicking.rs:645:5
17: 0x7fc6f49c85e5 - core::panicking::panic_fmt::hf6ef87080f7e8766
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/core/src/panicking.rs:72:14
18: 0x7fc6f7ec0b35 - rustc_query_system[7526d12203c43316]::query::job::deadlock
19: 0x7fc6f7687edc - std[d2e36247d228c058]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[6c8618f6eb06e019]::util::run_in_thread_pool_with_globals<rustc_interface[6c8618f6eb06e019]::interface::run_compiler<core[916dc932853bc0a1]::result::Result<(), rustc_span[3b1f2782555e1c8c]::ErrorGuaranteed>, rustc_driver_impl[741ff592be011714]::run_compiler::{closure#1}>::{closure#0}, core[916dc932853bc0a1]::result::Result<(), rustc_span[3b1f2782555e1c8c]::ErrorGuaranteed>>::{closure#2}::{closure#1}, ()>
20: 0x7fc6f768ed71 - <<std[d2e36247d228c058]::thread::Builder>::spawn_unchecked_<rustc_interface[6c8618f6eb06e019]::util::run_in_thread_pool_with_globals<rustc_interface[6c8618f6eb06e019]::interface::run_compiler<core[916dc932853bc0a1]::result::Result<(), rustc_span[3b1f2782555e1c8c]::ErrorGuaranteed>, rustc_driver_impl[741ff592be011714]::run_compiler::{closure#1}>::{closure#0}, core[916dc932853bc0a1]::result::Result<(), rustc_span[3b1f2782555e1c8c]::ErrorGuaranteed>>::{closure#2}::{closure#1}, ()>::{closure#1} as core[916dc932853bc0a1]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
21: 0x7fc6f4977bc5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hee756f0d76156df1
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/alloc/src/boxed.rs:2007:9
22: 0x7fc6f4977bc5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc26ba9eda2105aea
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/alloc/src/boxed.rs:2007:9
23: 0x7fc6f4977bc5 - std::sys::unix::thread::Thread::new::thread_start::h9f04a0ee42338ce0
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/sys/unix/thread.rs:108:17
24: 0x7fc6f4703ac3 - start_thread
at ./nptl/pthread_create.c:442:8
25: 0x7fc6f4795a40 - clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
26: 0x0 - <unknown>
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 `/home/mav/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tar-0.4.40/rustc-ice-2023-11-09T22_38_38-31691.txt` to your bug report
note: compiler flags: --crate-type lib -C opt-level=z -C linker-plugin-lto -C codegen-units=1 -Z threads=8
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
deadlock handler panicked, aborting process
error: could not compile `tar` (lib)
Caused by:
process didn't exit successfully: `/home/mav/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name tar --edition=2018 /home/mav/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tar-0.4.40/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=108 --crate-type lib --emit=dep-info,metadata,link -C opt-level=z -C linker-plugin-lto -C codegen-units=1 --cfg 'feature="default"' --cfg 'feature="xattr"' -C metadata=7883584f286fd265 -C extra-filename=-7883584f286fd265 --out-dir /home/mav/code/deno/target/release/deps -L dependency=/home/mav/code/deno/target/release/deps --extern filetime=/home/mav/code/deno/target/release/deps/libfiletime-e951033a3e6b7821.rmeta --extern libc=/home/mav/code/deno/target/release/deps/liblibc-2e9f2a83334b308a.rmeta --extern xattr=/home/mav/code/deno/target/release/deps/libxattr-0ed7f9ec7aeb49d0.rmeta --cap-lints allow -Z threads=8` (signal: 6, SIGABRT: process abort signal)
warning: build failed, waiting for other jobs to finish...
Another occurrence with the same file and line.
thread '<unnamed>' panicked at compiler/rustc_query_system/src/query/job.rs:543:9:
deadlock detected
stack backtrace:
0: 0x7fd4d9169c9c - std::backtrace_rs::backtrace::libunwind::trace::h8709aeb3a36f95da
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
1: 0x7fd4d9169c9c - std::backtrace_rs::backtrace::trace_unsynchronized::heb9f0713a26f337c
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7fd4d9169c9c - std::sys_common::backtrace::_print_fmt::h1ed75bc02e1d9ee5
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/sys_common/backtrace.rs:67:5
3: 0x7fd4d9169c9c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hddc1fcb1d86cbcd2
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/sys_common/backtrace.rs:44:22
4: 0x7fd4d91cbec0 - core::fmt::rt::Argument::fmt::h19337aa9a2c9da83
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/core/src/fmt/rt.rs:142:9
5: 0x7fd4d91cbec0 - core::fmt::write::h2d162b4d9dda182b
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/core/src/fmt/mod.rs:1117:17
6: 0x7fd4d915dbbf - std::io::Write::write_fmt::hcca591aa27610910
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/io/mod.rs:1763:15
7: 0x7fd4d9169a84 - std::sys_common::backtrace::_print::h90b2688e948a362e
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/sys_common/backtrace.rs:47:5
8: 0x7fd4d9169a84 - std::sys_common::backtrace::print::h75b0cf3671567509
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/sys_common/backtrace.rs:34:9
9: 0x7fd4d916c717 - std::panicking::default_hook::{{closure}}::h6694607f9ccfc6ea
10: 0x7fd4d916c47f - std::panicking::default_hook::h4c80dc8b62887255
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/panicking.rs:292:9
11: 0x7fd4dbe8cee0 - std[d2e36247d228c058]::panicking::update_hook::<alloc[74ba046d4657710e]::boxed::Box<rustc_driver_impl[741ff592be011714]::install_ice_hook::{closure#0}>>::{closure#0}
12: 0x7fd4d916ce58 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hf3ff6ce13f580837
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/alloc/src/boxed.rs:2021:9
13: 0x7fd4d916ce58 - std::panicking::rust_panic_with_hook::h5ad0da38d014c68e
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/panicking.rs:783:13
14: 0x7fd4d916cb79 - std::panicking::begin_panic_handler::{{closure}}::hdc6d3bffdbbdcfdd
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/panicking.rs:649:13
15: 0x7fd4d916a166 - std::sys_common::backtrace::__rust_end_short_backtrace::h80bfdfe497702363
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/sys_common/backtrace.rs:170:18
16: 0x7fd4d916c912 - rust_begin_unwind
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/panicking.rs:645:5
17: 0x7fd4d91c85e5 - core::panicking::panic_fmt::hf6ef87080f7e8766
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/core/src/panicking.rs:72:14
18: 0x7fd4dc6c0b35 - rustc_query_system[7526d12203c43316]::query::job::deadlock
Compiling console_static_text v0.8.1
19: 0x7fd4dbe87edc - std[d2e36247d228c058]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[6c8618f6eb06e019]::util::run_in_thread_pool_with_globals<rustc_interface[6c8618f6eb06e019]::interface::run_compiler<core[916dc932853bc0a1]::result::Result<(), rustc_span[3b1f2782555e1c8c]::ErrorGuaranteed>, rustc_driver_impl[741ff592be011714]::run_compiler::{closure#1}>::{closure#0}, core[916dc932853bc0a1]::result::Result<(), rustc_span[3b1f2782555e1c8c]::ErrorGuaranteed>>::{closure#2}::{closure#1}, ()>
20: 0x7fd4dbe8ed71 - <<std[d2e36247d228c058]::thread::Builder>::spawn_unchecked_<rustc_interface[6c8618f6eb06e019]::util::run_in_thread_pool_with_globals<rustc_interface[6c8618f6eb06e019]::interface::run_compiler<core[916dc932853bc0a1]::result::Result<(), rustc_span[3b1f2782555e1c8c]::ErrorGuaranteed>, rustc_driver_impl[741ff592be011714]::run_compiler::{closure#1}>::{closure#0}, core[916dc932853bc0a1]::result::Result<(), rustc_span[3b1f2782555e1c8c]::ErrorGuaranteed>>::{closure#2}::{closure#1}, ()>::{closure#1} as core[916dc932853bc0a1]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
21: 0x7fd4d9177bc5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hee756f0d76156df1
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/alloc/src/boxed.rs:2007:9
22: 0x7fd4d9177bc5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc26ba9eda2105aea
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/alloc/src/boxed.rs:2007:9
23: 0x7fd4d9177bc5 - std::sys::unix::thread::Thread::new::thread_start::h9f04a0ee42338ce0
at /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/std/src/sys/unix/thread.rs:108:17
Compiling regex-automata v0.3.8
24: 0x7fd4d8f03ac3 - start_thread
at ./nptl/pthread_create.c:442:8
25: 0x7fd4d8f95a40 - clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
26: 0x0 - <unknown>
rustc-ice-2023-11-09T22_38_38-31691.txt
rustc-ice-2023-11-09T22_54_32-130056.txt