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 compiling combine-4.6.6 in nightly (75a0be98f 2023-02-05) #107730

Closed
PureWhiteWu opened this issue Feb 6, 2023 · 1 comment · Fixed by #107688
Closed

ICE when compiling combine-4.6.6 in nightly (75a0be98f 2023-02-05) #107730

PureWhiteWu opened this issue Feb 6, 2023 · 1 comment · Fixed by #107688
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

@PureWhiteWu
Copy link

PureWhiteWu commented Feb 6, 2023

Here's the log:

error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:3569 ~ combine[2dcc]::stream::{impl#47}::reset), const_param_did: None }) (after phase change to runtime-optimized) at bb0[2]:
                                encountered `Assign((_0, const Result::<(), StringStreamError>::Ok(())))` with incompatible types:
                                left-hand side has type: Result<(), <&str as StreamOnce>::Error>
                                right-hand side has type: Result<(), StringStreamError>
   --> /data00/home/purewhite/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/combine-4.6.6/src/stream/mod.rs:44:17
    |
44  |                 Ok(())
    |                 ^^^^^^
...
153 | clone_resetable! {('a) &'a str}
    | ------------------------------- in this macro invocation
    |
    = note: delayed at    0: <rustc_errors::HandlerInner>::emit_diagnostic
               1: <rustc_errors::Handler>::delay_span_bug::<rustc_span::span_encoding::Span, &alloc::string::String>
               2: <rustc_const_eval::transform::validate::TypeChecker>::fail::<alloc::string::String>
               3: <rustc_const_eval::transform::validate::Validator as rustc_middle::mir::MirPass>::run_pass
               4: rustc_mir_transform::optimized_mir
               5: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::optimized_mir, rustc_query_impl::plumbing::QueryCtxt>
               6: <rustc_metadata::rmeta::encoder::EncodeContext>::encode_crate_root
               7: rustc_metadata::rmeta::encoder::encode_metadata_impl
               8: rustc_data_structures::sync::join::<rustc_metadata::rmeta::encoder::encode_metadata::{closure#0}, rustc_metadata::rmeta::encoder::encode_metadata::{closure#1}, (), ()>
               9: rustc_metadata::rmeta::encoder::encode_metadata
              10: rustc_metadata::fs::encode_and_write_metadata
              11: rustc_interface::passes::start_codegen
              12: <rustc_interface::passes::QueryContext>::enter::<<rustc_interface::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core::result::Result<alloc::boxed::Box<dyn core::any::Any>, rustc_errors::ErrorGuaranteed>>
              13: <rustc_interface::queries::Queries>::ongoing_codegen
              14: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorGuaranteed>>
              15: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
              16: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
              17: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
              18: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
              19: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                         at /rustc/75a0be98f25a4b9de5afa0e15eb016e7f9627032/library/alloc/src/boxed.rs:1988:9
              20: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                         at /rustc/75a0be98f25a4b9de5afa0e15eb016e7f9627032/library/alloc/src/boxed.rs:1988:9
              21: std::sys::unix::thread::Thread::new::thread_start
                         at /rustc/75a0be98f25a4b9de5afa0e15eb016e7f9627032/library/std/src/sys/unix/thread.rs:108:17
              22: start_thread
                         at /build/glibc-6iIyft/glibc-2.28/nptl/pthread_create.c:486:8
              23: clone
                         at /build/glibc-6iIyft/glibc-2.28/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95

    = note: this error: internal compiler error originates in the macro `clone_resetable` (in Nightly builds, run with -Z macro-backtrace for more info)

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.69.0-nightly (75a0be98f 2023-02-05) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C target-cpu=native

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

query stack during panic:
end of query stack
error: could not compile `combine`
@PureWhiteWu PureWhiteWu 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 Feb 6, 2023
@clubby789
Copy link
Contributor

clubby789 commented Feb 6, 2023

I also got this error before the ICE:

warning: error finalizing incremental compilation session directory `/tmp/combine/target/debug/incremental/combine-32e35kuq3jptw/s-ghzmzwq1tf-1co2vxa-working`: No such file or directory (os error 2)

searched nightlies: from nightly-2023-01-30 to nightly-2023-02-06
regressed nightly: nightly-2023-02-05
searched commit range: 658fad6...50d3ba5
regressed commit: 9dee4e4

bisected with cargo-bisect-rustc v0.6.5

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc 2023-01-30 --regress=ice 

#107267, cc @cjgillot

EDIT: ah, duplicate of #107678

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