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

ICE when running cargo expand #99327

Closed
itsCryne opened this issue Jul 16, 2022 · 1 comment · Fixed by #99263
Closed

ICE when running cargo expand #99327

itsCryne opened this issue Jul 16, 2022 · 1 comment · Fixed by #99263
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.

Comments

@itsCryne
Copy link

itsCryne commented Jul 16, 2022

Upon running cargo expand, the compiler panics when having

sea-orm = "0.9.0"

as a dependency.

cargo check and cargo build complete without error.

Probably this is related to #99326 ?

Code

https://github.com/itsCryne/rust_ice_mve

Meta

rustc --version --verbose:

rustc 1.62.0 (a8314ef7d 2022-06-27)
binary: rustc
commit-hash: a8314ef7d0ec7b75c336af2c9857bfaf43002bfc
commit-date: 2022-06-27
host: x86_64-unknown-linux-gnu
release: 1.62.0
LLVM version: 14.0.5

and

cargo 1.64.0-nightly (8827baaa7 2022-07-14)
release: 1.64.0-nightly
commit-hash: 8827baaa781b37872134c1ba692a6f0aeb37890e
commit-date: 2022-07-14
host: x86_64-unknown-linux-gnu
libgit2: 1.4.2 (sys:0.14.2 vendored)
libcurl: 7.83.1-DEV (sys:0.4.55+curl-7.83.1 vendored ssl:OpenSSL/1.1.1n)
os: Pop!_OS 22.04 (jammy) [64-bit]

cargo expand --version:

cargo-expand 1.0.27

Error output

cargo expand:

    Checking time v0.3.11
    Checking serde v1.0.139
   Compiling thiserror v1.0.31
    Checking futures-util v0.3.21
   Compiling bae v0.1.7
   Compiling ouroboros_macro v0.15.0
    Checking async-stream v0.3.3
    Checking sea-strum v0.23.0
    Checking tracing v0.1.35
thread 'rustc' panicked at 'index out of bounds: the len is 1 but the index is 2', compiler/rustc_builtin_macros/src/format.rs:1001:28
stack backtrace:
   Compiling sea-query-derive v0.2.0
   0:     0x7fc1148a2930 - std::backtrace_rs::backtrace::libunwind::trace::hc933fa0cb8627706
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   1:     0x7fc1148a2930 - std::backtrace_rs::backtrace::trace_unsynchronized::h821571732dd332a1
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fc1148a2930 - std::sys_common::backtrace::_print_fmt::h557d50ac4a63aebc
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7fc1148a2930 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h76b8147c2bdde75b
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7fc1148fbf0c - core::fmt::write::h5d8be78170c85a1a
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/core/src/fmt/mod.rs:1198:17
   5:     0x7fc114893f35 - std::io::Write::write_fmt::h506eb24e7560f644
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/io/mod.rs:1672:15
   6:     0x7fc1148a55c1 - std::sys_common::backtrace::_print::h2201ccbfedce10bc
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7fc1148a55c1 - std::sys_common::backtrace::print::hfac17af9266b406b
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7fc1148a55c1 - std::panicking::default_hook::{{closure}}::h391a6c901adb4324
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/panicking.rs:295:22
   9:     0x7fc1148a5293 - std::panicking::default_hook::hba36336a5210bb57
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/panicking.rs:314:9
  10:     0x7fc11514ac11 - rustc_driver[ce628f6b2a67333f]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7fc1148a5d96 - std::panicking::rust_panic_with_hook::hf5a9c547fa70e52e
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/panicking.rs:702:17
  12:     0x7fc1148a5be7 - std::panicking::begin_panic_handler::{{closure}}::h458eb96a30055863
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/panicking.rs:588:13
  13:     0x7fc1148a2e14 - std::sys_common::backtrace::__rust_end_short_backtrace::he0b6e245c28401ce
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/sys_common/backtrace.rs:138:18
  14:     0x7fc1148a5912 - rust_begin_unwind
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/panicking.rs:584:5
  15:     0x7fc114869c53 - core::panicking::panic_fmt::h9776dcd13d59b560
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/core/src/panicking.rs:142:14
  16:     0x7fc114869b92 - core::panicking::panic_bounds_check::hc49ce542f03c88ff
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/core/src/panicking.rs:84:5
  17:     0x7fc11756aeb8 - rustc_builtin_macros[555fb7b74bb18701]::format::expand_preparsed_format_args
  18:     0x7fc1175645fc - rustc_builtin_macros[555fb7b74bb18701]::format::expand_format_args_impl
  19:     0x7fc116ea525d - <rustc_expand[315316ef4f9feff3]::expand::MacroExpander>::fully_expand_fragment
  20:     0x7fc117a06f8b - <rustc_expand[315316ef4f9feff3]::expand::MacroExpander>::expand_crate
  21:     0x7fc11733fdd2 - <rustc_session[a00dc85a9977996c]::session::Session>::time::<core[675039967b0ce395]::result::Result<rustc_ast[5a87b50f347d23c0]::ast::Crate, rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>, rustc_interface[7690044e2c4491ef]::passes::configure_and_expand::{closure#1}>
  22:     0x7fc117332bd7 - <rustc_interface[7690044e2c4491ef]::passes::boxed_resolver::BoxedResolver>::access::<<rustc_interface[7690044e2c4491ef]::queries::Queries>::expansion::{closure#0}::{closure#0}, core[675039967b0ce395]::result::Result<rustc_ast[5a87b50f347d23c0]::ast::Crate, rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>>
  23:     0x7fc11732b3e2 - <rustc_interface[7690044e2c4491ef]::queries::Queries>::expansion
  24:     0x7fc1172f475c - <rustc_interface[7690044e2c4491ef]::interface::Compiler>::enter::<rustc_driver[ce628f6b2a67333f]::run_compiler::{closure#1}::{closure#2}, core[675039967b0ce395]::result::Result<core[675039967b0ce395]::option::Option<rustc_interface[7690044e2c4491ef]::queries::Linker>, rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>>
  25:     0x7fc1172f09bf - rustc_span[715bcd6866f3f365]::with_source_map::<core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>, rustc_interface[7690044e2c4491ef]::interface::create_compiler_and_run<core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>, rustc_driver[ce628f6b2a67333f]::run_compiler::{closure#1}>::{closure#1}>
  26:     0x7fc11730cc40 - rustc_interface[7690044e2c4491ef]::interface::create_compiler_and_run::<core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>, rustc_driver[ce628f6b2a67333f]::run_compiler::{closure#1}>
  27:     0x7fc117320d72 - <scoped_tls[e6e812a5eee10b50]::ScopedKey<rustc_span[715bcd6866f3f365]::SessionGlobals>>::set::<rustc_interface[7690044e2c4491ef]::interface::run_compiler<core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>, rustc_driver[ce628f6b2a67333f]::run_compiler::{closure#1}>::{closure#0}, core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>>
  28:     0x7fc1172f2f2f - std[ed8ee9cb5bbd555]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[7690044e2c4491ef]::util::run_in_thread_pool_with_globals<rustc_interface[7690044e2c4491ef]::interface::run_compiler<core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>, rustc_driver[ce628f6b2a67333f]::run_compiler::{closure#1}>::{closure#0}, core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>>::{closure#0}, core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>>
  29:     0x7fc11730d099 - <<std[ed8ee9cb5bbd555]::thread::Builder>::spawn_unchecked_<rustc_interface[7690044e2c4491ef]::util::run_in_thread_pool_with_globals<rustc_interface[7690044e2c4491ef]::interface::run_compiler<core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>, rustc_driver[ce628f6b2a67333f]::run_compiler::{closure#1}>::{closure#0}, core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>>::{closure#0}, core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>>::{closure#1} as core[675039967b0ce395]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  30:     0x7fc1148af7e3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb12c75146d360fc4
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/alloc/src/boxed.rs:1934:9
  31:     0x7fc1148af7e3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he05a53703329061d
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/alloc/src/boxed.rs:1934:9
  32:     0x7fc1148af7e3 - std::sys::unix::thread::Thread::new::thread_start::h45088dc5029897c3
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/sys/unix/thread.rs:108:17
  33:     0x7fc11466cb43 - <unknown>
  34:     0x7fc1146fea00 - <unknown>
  35:                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.64.0-nightly (23e21bdd2 2022-07-15) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
error: could not compile `time`
warning: build failed, waiting for other jobs to finish...
Backtrace

`RUST_BACKTRACE=1 cargo expand`: ``` Checking time v0.3.11 Checking chrono v0.4.19 Checking serde_json v1.0.82 Checking rust_decimal v1.25.0 Checking uuid v1.1.2 Checking futures-executor v0.3.21 Checking ouroboros v0.15.0 Compiling sea-orm-macros v0.9.0 thread 'rustc' panicked at 'index out of bounds: the len is 1 but the index is 2', compiler/rustc_builtin_macros/src/format.rs:1001:28 stack backtrace: 0: rust_begin_unwind at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/panicking.rs:584:5 1: core::panicking::panic_fmt at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/core/src/panicking.rs:142:14 2: core::panicking::panic_bounds_check at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/core/src/panicking.rs:84:5 3: rustc_builtin_macros::format::expand_preparsed_format_args 4: rustc_builtin_macros::format::expand_format_args_impl 5: ::fully_expand_fragment 6: ::expand_crate 7: ::time::, rustc_interface::passes::configure_and_expand::{closure#1}> 8: ::access::<::expansion::{closure#0}::{closure#0}, core::result::Result> 9: ::expansion 10: ::enter::, rustc_errors::ErrorGuaranteed>> 11: rustc_span::with_source_map::, rustc_interface::interface::create_compiler_and_run, rustc_driver::run_compiler::{closure#1}>::{closure#1}> 12: rustc_interface::interface::create_compiler_and_run::, rustc_driver::run_compiler::{closure#1}> 13: >::set::, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>> note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. 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.64.0-nightly (23e21bd 2022-07-15) running on x86_64-unknown-linux-gnu note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 note: some of the compiler flags provided by cargo are hidden query stack during panic: end of query stack error: could not compile `time` warning: build failed, waiting for other jobs to finish... ```

@itsCryne itsCryne 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 Jul 16, 2022
@Noratrieb
Copy link
Member

Appears to be a duplicate of #99261

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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants