Skip to content

reproducing ICE while compiling experimental RSLint on 1.51.0-nightly #81614

Open
@namibj

Description

@namibj

Code

Trying to compile Kixiron/RSLint@9388cdd, having changed the Cargo.toml a the repository root slightly to the following, in preparation for trying some experimental changes to new code that runs a few seconds even with fat LTO:

[workspace]
members = ["crates/*", "xtask"]
default-members = ["crates/rslint_cli"]

[profile]
release = { lto = "thin", codegen-units = 128, debug = 2, incremental = true }
bench = { lto = "fat", codegen-units = 1 }

[profile.dev]
# Disabling debug info speeds up builds a lot, and we do not really
# rely on debug info for debugging
debug = 0
incremental = true
codegen-units = 16

The command line was nice nice cargo run --locked --release ../../engine262/engine262/src.

Meta

It reproduced after a cargo clean. If there are procedures to appropriately handle an rr trace (it might contain personal/private data by accident, so I'd need some sort of formal agreement to be comfortable sharing it), I'd offer to try to reproduce it under rr.

rustc --version --verbose:

rustc 1.51.0-nightly (04caa632d 2021-01-30)
binary: rustc
commit-hash: 04caa632dd10c2bf64b69524c7f9c4c30a436877
commit-date: 2021-01-30
host: x86_64-unknown-linux-gnu
release: 1.51.0-nightly
LLVM version: 11.0.1

Error output

thread 'rustc' panicked at 'assertion failed: self.text.iter().all(|r| !r.contains(&\'\\t\'))', compiler/rustc_errors/src/styled_buffer.rs:18:9
Backtrace

thread 'rustc' panicked at 'assertion failed: self.text.iter().all(|r| !r.contains(&\'\\t\'))', compiler/rustc_errors/src/styled_buffer.rs:18:9                                                        
stack backtrace:                                                                                                                                                                                       
   0:     0x7fda5500ade7 - std::backtrace_rs::backtrace::libunwind::trace::h8bc78f7bc1f75bdb                                                                                                           
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5                                                      
   1:     0x7fda5500ade7 - std::backtrace_rs::backtrace::trace_unsynchronized::ha4c961c9576f95ba                                                                                                       
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5                                                            
   2:     0x7fda5500ade7 - std::sys_common::backtrace::_print_fmt::hc20cfdc233d6eb02               
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/std/src/sys_common/backtrace.rs:67:5                                                                         
   3:     0x7fda5500ade7 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h04bea14549780a0f                                                                        
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/std/src/sys_common/backtrace.rs:46:22                                                                        
   4:     0x7fda5507bebc - core::fmt::write::h3868db8542c90941                                     
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/core/src/fmt/mod.rs:1096:17                                                                                  
   5:     0x7fda54ffd612 - std::io::Write::write_fmt::h55dd75636eef6a5c                            
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/std/src/io/mod.rs:1568:15                                                                                    
   6:     0x7fda5500ed45 - std::sys_common::backtrace::_print::h6439e8525077c7da
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x7fda5500ed45 - std::sys_common::backtrace::print::h02b685f728ce3931
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x7fda5500ed45 - std::panicking::default_hook::{{closure}}::h7c29625065fafae1
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/std/src/panicking.rs:208:50
   9:     0x7fda5500e8a3 - std::panicking::default_hook::hba441710bb71f4d5
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/std/src/panicking.rs:225:9
  10:     0x7fda55867f6b - rustc_driver::report_ice::h6029ac9bafd12823
  11:     0x7fda343e10da - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::he99c6b079846fdb4
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/alloc/src/boxed.rs:1502:9
  12:     0x7fda343e10da - proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}::h6419eb83c727cc8d
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/proc_macro/src/bridge/client.rs:320:21
  13:     0x7fda5500f646 - std::panicking::rust_panic_with_hook::ha936eb00e51bc4d9
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/std/src/panicking.rs:595:17
  14:     0x7fda5500f137 - std::panicking::begin_panic_handler::{{closure}}::hcd15140e0238536e
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/std/src/panicking.rs:495:13
  15:     0x7fda5500b2ac - std::sys_common::backtrace::__rust_end_short_backtrace::hb13a021bb64823a1
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/std/src/sys_common/backtrace.rs:141:18
  16:     0x7fda5500f0c9 - rust_begin_unwind
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/std/src/panicking.rs:493:5
  17:     0x7fda55078301 - core::panicking::panic_fmt::h20225113c4a2f8fd
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/core/src/panicking.rs:92:14
  18:     0x7fda5507824d - core::panicking::panic::h35b77276aa4b0c12
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/core/src/panicking.rs:50:5
  19:     0x7fda5884a956 - rustc_errors::styled_buffer::StyledBuffer::render::hf197269b1385afc5
  20:     0x7fda588565af - rustc_errors::emitter::EmitterWriter::emit_message_default::h30e67badffef966e
  21:     0x7fda58850a20 - <rustc_errors::emitter::EmitterWriter as rustc_errors::emitter::Emitter>::emit_diagnostic::h73ba5da66cba0737
  22:     0x7fda57075ded - rustc_errors::json::Diagnostic::from_errors_diagnostic::h532f5d6f5adb4036
  23:     0x7fda570758ea - <rustc_errors::json::JsonEmitter as rustc_errors::emitter::Emitter>::emit_diagnostic::h0fcfeff719ad096f
  24:     0x7fda588639a8 - rustc_errors::HandlerInner::emit_diagnostic::he36ed20f4ba26d16
  25:     0x7fda58861ae1 - rustc_errors::diagnostic_builder::DiagnosticBuilder::emit::h4eae571a83ebb272
  26:     0x7fda57d51dfc - rustc_codegen_ssa::back::link::link_natively::hdcdbeb8d48df28bc
  27:     0x7fda57d4f9ef - rustc_codegen_ssa::back::link::link_binary::h0ed9bbc4697317f5
  28:     0x7fda57d431f2 - <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::link::h0c5383f466d78197
  29:     0x7fda57c98470 - rustc_interface::queries::Linker::link::h1a500de353d01a7e
    30:     0x7fda57c41ea2 - rustc_span::with_source_map::h0b3994d7a2f67198
  31:     0x7fda57c0b477 - rustc_interface::interface::create_compiler_and_run::h4d7ef2129059135c
  32:     0x7fda57c42abf - std::sys_common::backtrace::__rust_begin_short_backtrace::hcb0be55fe1a86377
  33:     0x7fda57c283ca - core::ops::function::FnOnce::call_once{{vtable.shim}}::h0363f9b03bb4d9ca 
  34:     0x7fda5501fb5a - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h8ffdf8dc1f37e360
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/alloc/src/boxed.rs:1488:9
  35:     0x7fda5501fb5a - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h74f6ec149ce6acc8
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/alloc/src/boxed.rs:1488:9
  36:     0x7fda5501fb5a - std::sys::unix::thread::Thread::new::thread_start::h565bef3956c58d58
                               at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/library/std/src/sys/unix/thread.rs:71:17
  37:     0x7fda54efa3e9 - start_thread
  38:     0x7fda54e17293 - __GI___clone
  39:                0x0 - <unknown>

error: internal compiler error: unexpected panic

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

note: rustc 1.51.0-nightly (04caa632d 2021-01-30) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=2 -C lto=thin -C codegen-units=128 -C debuginfo=2 -C incremental -C linker-plugin-lto -C linker=clang -C link-arg=-fuse-ld=lld -C target-cpu=native --crate-type bin

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

query stack during panic:
end of query stack
error: could not compile `rslint_cli`

Caused by:
  process didn't exit successfully: `rustc --crate-name rslint --edition=2018 crates/rslint_cli/src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -
C opt-level=2 -C lto=thin -C codegen-units=128 -C debuginfo=2 -C metadata=dcfc483af5b58fa2 -C extra-filename=-dcfc483af5b58fa2 --out-dir /home/namibj/git/com.github/Kixiron/RSLint/target/release/deps
 -C incremental=/home/namibj/git/com.github/Kixiron/RSLint/target/release/incremental -L dependency=/home/namibj/git/com.github/Kixiron/RSLint/target/release/deps --extern colored=/home/namibj/git/co
m.github/Kixiron/RSLint/target/release/deps/libcolored-7727c7e1b68c14fb.rlib --extern glob=/home/namibj/git/com.github/Kixiron/RSLint/target/release/deps/libglob-7ea9db01674e63ab.rlib --extern hashbr
own=/home/namibj/git/com.github/Kixiron/RSLint/target/release/deps/libhashbrown-64261e3b4ef68a8e.rlib --extern heck=/home/namibj/git/com.github/Kixiron/RSLint/target/release/deps/libheck-613679886784
88a6.rlib --extern inferno=/home/namibj/git/com.github/Kixiron/RSLint/target/release/deps/libinferno-bbf230b2bce37f47.rlib --extern notify=/home/namibj/git/com.github/Kixiron/RSLint/target/release/de
ps/libnotify-10e4119a7ba6ac4a.rlib --extern num_cpus=/home/namibj/git/com.github/Kixiron/RSLint/target/release/deps/libnum_cpus-be72278e2849f75d.rlib --extern rayon=/home/namibj/git/com.github/Kixiro
n/RSLint/target/release/deps/librayon-116b86cdca50eaef.rlib --extern regex=/home/namibj/git/com.github/Kixiron/RSLint/target/release/deps/libregex-24e065abec23db26.rlib --extern rslint_cli=/home/nami
bj/git/com.github/Kixiron/RSLint/target/release/deps/librslint_cli-ccb05ea486f9436d.rlib --extern rslint_config=/home/namibj/git/com.github/Kixiron/RSLint/target/release/deps/librslint_config-99b2cff
405429ff9.rlib --extern rslint_core=/home/namibj/git/com.github/Kixiron/RSLint/target/release/deps/librslint_core-dea84447ce975c85.rlib --extern rslint_errors=/home/namibj/git/com.github/Kixiron/RSLi
nt/target/release/deps/librslint_errors-e60fb80c864a7276.rlib --extern rslint_lexer=/home/namibj/git/com.github/Kixiron/RSLint/target/release/deps/librslint_lexer-0410773ec6f5f963.rlib --extern rslin
t_parser=/home/namibj/git/com.github/Kixiron/RSLint/target/release/deps/librslint_parser-a72024f6739abcc4.rlib --extern rslint_scope=/home/namibj/git/com.github/Kixiron/RSLint/target/release/deps/lib
rslint_scope-b76071063f2d9698.rlib --extern serde=/home/namibj/git/com.github/Kixiron/RSLint/target/release/deps/libserde-dee461c6720cf3d6.rlib --extern structopt=/home/namibj/git/com.github/Kixiron/
RSLint/target/release/deps/libstructopt-1977d2ca169ad09c.rlib --extern superluminal_perf=/home/namibj/git/com.github/Kixiron/RSLint/target/release/deps/libsuperluminal_perf-2c9299ef870c98ab.rlib --ex
tern termcolor=/home/namibj/git/com.github/Kixiron/RSLint/target/release/deps/libtermcolor-ac236553c1b6a182.rlib --extern toml=/home/namibj/git/com.github/Kixiron/RSLint/target/release/deps/libtoml-6
e273cc90a8a6a85.rlib --extern tracing=/home/namibj/git/com.github/Kixiron/RSLint/target/release/deps/libtracing-74ef76726037215c.rlib --extern tracing_flame=/home/namibj/git/com.github/Kixiron/RSLint
/target/release/deps/libtracing_flame-e76192304d77edc6.rlib --extern tracing_subscriber=/home/namibj/git/com.github/Kixiron/RSLint/target/release/deps/libtracing_subscriber-daae4d1a5e78637d.rlib --ex
tern walkdir=/home/namibj/git/com.github/Kixiron/RSLint/target/release/deps/libwalkdir-8d990d6e0e4f6efd.rlib -Clinker-plugin-lto -Clinker=clang -Clink-arg=-fuse-ld=lld -Ctarget-cpu=native` (exit code
: 101)

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.S-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.T-compilerRelevant to the compiler 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