Intermittent rustc ICE when compiling
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
People
(Reporter: gw, Unassigned)
Details
Since yesterday, I'm seeing an intermittent rustc panic when compiling gecko, panicking in the style crate.
Running ./mach bootstrap doesn't fix the panic, but manually removing the obj-* directory does seem to allow the build to succeed. Once it gets in to this state, every build fails with the same panic.
The backtrace is:
0:31.57 thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/compiler/rustc_hir/src/definitions.rs:452:14
0:31.57 stack backtrace:
0:31.57 0: 0x7f08214fea9c - std::backtrace_rs::backtrace::libunwind::trace::hf6a6dfd7da937cb0
0:31.57 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
0:31.57 1: 0x7f08214fea9c - std::backtrace_rs::backtrace::trace_unsynchronized::hc596a19e4891f7f3
0:31.57 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
0:31.57 2: 0x7f08214fea9c - std::sys_common::backtrace::_print_fmt::hb16700db31584325
0:31.57 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:67:5
0:31.57 3: 0x7f08214fea9c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h231c4190cfa75162
0:31.57 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:46:22
0:31.58 4: 0x7f082155bfdc - core::fmt::write::h2a1462b5f8eea807
0:31.58 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/fmt/mod.rs:1163:17
0:31.58 5: 0x7f08214eec05 - std::io::Write::write_fmt::h71ddfebc68685972
0:31.58 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/io/mod.rs:1696:15
0:31.58 6: 0x7f0821501f60 - std::sys_common::backtrace::_print::hcc197d4bebf2b369
0:31.58 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:49:5
0:31.58 7: 0x7f0821501f60 - std::sys_common::backtrace::print::h335a66af06738c7c
0:31.58 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:36:9
0:31.58 8: 0x7f0821501f60 - std::panicking::default_hook::{{closure}}::h6fac9ac9c8b79e52
0:31.58 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:210:50
0:31.58 9: 0x7f0821501b15 - std::panicking::default_hook::h341c1030c6a1161b
0:31.58 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:227:9
0:31.59 10: 0x7f0821cee2b1 - rustc_driver::DEFAULT_HOOK::{{closure}}::{{closure}}::h932547f60770f26a
0:31.59 11: 0x7f0821502779 - std::panicking::rust_panic_with_hook::h50680ff4b44510c6
0:31.59 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:628:17
0:31.59 12: 0x7f0821502202 - std::panicking::begin_panic_handler::{{closure}}::h9371c0fbb1e8465a
0:31.59 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:519:13
0:31.59 13: 0x7f08214fef44 - std::sys_common::backtrace::__rust_end_short_backtrace::h9b3efa22a5768c0f
0:31.59 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:139:18
0:31.59 14: 0x7f0821502199 - rust_begin_unwind
0:31.59 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:517:5
0:31.59 15: 0x7f08214c6441 - core::panicking::panic_fmt::h23b9203e89cc61cf
0:31.59 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panicking.rs:100:14
0:31.59 16: 0x7f08214c638d - core::panicking::panic::h0ba7146865b2f9d6
0:31.59 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panicking.rs:50:5
0:31.59 17: 0x7f08234f1b47 - <rustc_query_impl::on_disk_cache::OnDiskCache as rustc_middle::ty::context::OnDiskCache>::def_path_hash_to_def_id::hb925ab58899dddff
0:31.59 18: 0x7f082385da7d - rustc_middle::dep_graph::dep_node::<impl rustc_query_system::dep_graph::dep_node::DepNodeParams<rustc_middle::ty::context::TyCtxt> for rustc_span::def_id::DefId>::recover::h844379e00d1509f0
0:31.59 19: 0x7f082250a22d - rustc_query_system::query::plumbing::force_query::h667ae9d7704f1462
0:31.59 20: 0x7f08234dcd6a - rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green::h14b50df9818693f3
0:31.59 21: 0x7f08234dcd41 - rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green::h14b50df9818693f3
0:31.59 22: 0x7f08234dcd41 - rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green::h14b50df9818693f3
0:31.59 23: 0x7f08234dcd41 - rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green::h14b50df9818693f3
0:31.59 24: 0x7f082346aafa - rustc_query_system::query::plumbing::try_load_from_disk_and_cache_in_memory::h2ef680fbb8bedc5e
0:31.59 25: 0x7f0823472b4d - rustc_query_system::query::plumbing::get_query::h21f7529ca365e4e5
0:31.59 26: 0x7f08234d7f26 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::fn_abi_of_instance::he62734d64ae5c53b
0:31.59 27: 0x7f0822f38491 - rustc_codegen_llvm::mono_item::<impl rustc_codegen_ssa::traits::declare::PreDefineMethods for rustc_codegen_llvm::context::CodegenCx>::predefine_fn::h1c521c4ac07b4fbd
0:31.59 28: 0x7f0822f3ff31 - rustc_codegen_llvm::base::compile_codegen_unit::module_codegen::h16153c4046d114f1
0:31.59 29: 0x7f0823955976 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task::h789e443a348261c1
0:31.59 30: 0x7f08239997f3 - rustc_codegen_llvm::base::compile_codegen_unit::hab1bf03723596068
0:31.59 31: 0x7f0823960ccb - rustc_codegen_ssa::base::codegen_crate::h7a10ba1a5bbbde6f
0:31.59 32: 0x7f082398de7a - <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate::ha56c5fc04fb5674a
0:31.59 33: 0x7f08238fef7d - rustc_interface::queries::Queries::ongoing_codegen::h11dabf965b22130b
0:31.59 34: 0x7f08238d39aa - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter::hf84cd18c24bd5171
0:31.59 35: 0x7f08238c10ee - rustc_span::with_source_map::h6ab8a240e103b5b9
0:31.59 36: 0x7f08238d32ac - scoped_tls::ScopedKey<T>::set::hd1fbd64c6f645895
0:31.59 37: 0x7f08238c1ef5 - std::sys_common::backtrace::__rust_begin_short_backtrace::h0a1328c9fa7f7448
0:31.59 38: 0x7f08238ed962 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h4ea1ced06d6b3e97
0:31.59 39: 0x7f082150d933 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h7bd677a5dc988be6
0:31.59 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/boxed.rs:1691:9
0:31.59 40: 0x7f082150d933 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h7b1c1ba11c4db785
0:31.59 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/boxed.rs:1691:9
0:31.59 41: 0x7f082150d933 - std::sys::unix::thread::Thread::new::thread_start::h9c58c0d12d84e854
0:31.59 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys/unix/thread.rs:106:17
0:31.59 42: 0x7f082142d609 - start_thread
0:31.59 at /build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477:8
0:31.59 43: 0x7f0821341293 - clone
0:31.59 44: 0x0 - <unknown>
0:31.59 error: internal compiler error: unexpected panic
0:31.59 note: the compiler unexpectedly panicked. this is a bug.
0:31.59 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
0:31.59 note: rustc 1.57.0 (f1edd0429 2021-11-29) running on x86_64-unknown-linux-gnu
0:31.59 note: compiler flags: -C opt-level=2 -C panic=abort -C embed-bitcode=no -C linker=/home/gw/code/work/gecko2/build/cargo-linker -C incremental -C debuginfo=2 -C force-frame-pointers=yes -C lto=off --crate-type lib
0:31.59 note: some of the compiler flags provided by cargo are hidden
0:31.59 query stack during panic:
0:31.59 #0 [fn_abi_of_instance] computing call ABI of `<servo_arc::Arc<shared_lock::Locked<stylesheets::supports_rule::SupportsRule>> as core::ops::drop::Drop>::drop`
0:31.59 end of query stack
0:31.96 error: could not compile `style`
Comment 1•4 years ago
|
||
note: 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
Please do this.
| Reporter | ||
Comment 2•4 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #1)
note: 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.mdPlease do this.
Comment 3•4 years ago
|
||
Can you try --disable-cargo-incremental?
| Reporter | ||
Comment 4•4 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #3)
Can you try
--disable-cargo-incremental?
Next time I reproduce it I will, yep - it seems to disappear for a while after cleaning the obj dir.
Comment 5•3 years ago
|
||
I'm fairly convinced it was cargo-incremental related and these issues have been fixed in more recent rustc.
Description
•