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

Compilation bug while using Diesel framework #125549

Closed
Capunix309 opened this issue May 25, 2024 · 6 comments
Closed

Compilation bug while using Diesel framework #125549

Capunix309 opened this issue May 25, 2024 · 6 comments
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Capunix309
Copy link

Capunix309 commented May 25, 2024

rustc-ice-2024-05-25T18_02_18-25659.txt

I'm developing a website using actix-web and diesel. I needed to modify a variable in my up.sql file and to redo my migration. After doing that, the compiler refused to compile. Please tell me what to do, I never reported before and I'm not a native English speaker (please forgive me for the potential errors in my explanation).

Edit : I just tried to use the stable version and it perfectly work in case you're wondering
Update : Apparently, it was ok for just a brief moment... It's still bugged, even in stable version...

Code

Before

CREATE TABLE blocks (
    --global
    id_block TEXT PRIMARY KEY NOT NULL,
    id_user TEXT,
    id_team TEXT,
    id_blocker TEXT NOT NULL,

    --infos
    date TIMESTAMP NOT NULL,
    reason VARCHAR(500) NOT NULL,
    still_active BOOL NOT NULL DEFAULT TRUE,

    --foreign keys
    CHECK (id_user IS NOT NULL OR id_team IS NOT NULL),
    FOREIGN KEY (id_blocker) REFERENCES users(id_user) ON DELETE CASCADE,
    FOREIGN KEY (id_user) REFERENCES users(id_user) ON DELETE CASCADE,
    FOREIGN KEY (id_team) REFERENCES teams(id_team) ON DELETE CASCADE
);

After

CREATE TABLE blocks (
    --global
    id_block TEXT PRIMARY KEY NOT NULL,
    id_user TEXT,
    id_team TEXT,
    id_blocker TEXT NOT NULL,

    --infos
    date TIMESTAMP NOT NULL,
    reason VARCHAR(500) NOT NULL,
    end_date TIMESTAMP NOT NULL,

    --foreign keys
    CHECK (id_user IS NOT NULL OR id_team IS NOT NULL),
    FOREIGN KEY (id_blocker) REFERENCES users(id_user) ON DELETE CASCADE,
    FOREIGN KEY (id_user) REFERENCES users(id_user) ON DELETE CASCADE,
    FOREIGN KEY (id_team) REFERENCES teams(id_team) ON DELETE CASCADE
);

Schema.rs

diesel::table! {
    blocks (id_block) {
        id_block -> Text,
        id_user -> Nullable<Text>,
        id_team -> Nullable<Text>,
        id_blocker -> Text,
        date -> Timestamp,
        #[max_length = 500]
        reason -> Varchar,
        end_date -> Timestamp,
    }
}

Meta

rustc --version --verbose:

rustc 1.80.0-nightly (36153f1a4 2024-05-24)
binary: rustc
commit-hash: 36153f1a4e3162f0a143c7b3e468ecb3beb0008e
commit-date: 2024-05-24
host: x86_64-apple-darwin
release: 1.80.0-nightly
LLVM version: 18.1.6
Backtrace

thread 'rustc' panicked at compiler/rustc_hir/src/definitions.rs:389:13:
("Failed to extract DefId", def_kind, PackedFingerprint(Fingerprint(1656113388420302199, 1128357605846114694)))
stack backtrace:
   0:        0x10c4a4283 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb04141112752ea70
   1:        0x10c4ef88b - core::fmt::write::hddfa7860c859e571
   2:        0x10c49a3ce - std::io::Write::write_fmt::h3002ff5eaabbfa96
   3:        0x10c4a4071 - std::sys_common::backtrace::print::hf8b8ac82befd31a5
   4:        0x10c4a6e39 - std::panicking::default_hook::{{closure}}::headb9a59455c83cc
   5:        0x10c4a6bb8 - std::panicking::default_hook::h0f278631d2fb154e
   6:        0x1151d246c - std[bbe2f3e4661d22f2]::panicking::update_hook::<alloc[6da3a573fc617c43]::boxed::Box<rustc_driver_impl[263088e60e1843a4]::install_ice_hook::{closure#0}>>::{closure#0}
   7:        0x10c4a7943 - std::panicking::rust_panic_with_hook::hc40a2ef99d181ed1
   8:        0x10c4a7282 - std::panicking::begin_panic_handler::{{closure}}::head167c964aad049
   9:        0x10c4a4759 - std::sys_common::backtrace::__rust_end_short_backtrace::h0fc564af4a20bb02
  10:        0x10c4a6fb6 - _rust_begin_unwind
  11:        0x10c50bfd2 - core::panicking::panic_fmt::ha7e6d9002cbc558e
  12:        0x1199b55ce - <rustc_hir[d3a83409fa511c04]::definitions::Definitions>::local_def_path_hash_to_def_id::err
  13:        0x115d1ecd0 - <rustc_middle[fa5ba927ae906344]::ty::context::TyCtxt>::def_path_hash_to_def_id
  14:        0x11660c59e - <rustc_query_impl[10e03e6d76125a1d]::plumbing::query_callback<rustc_query_impl[10e03e6d76125a1d]::query_impl::def_kind::QueryType>::{closure#0} as core[98362835e6f1cf4d]::ops::function::FnOnce<(rustc_middle[fa5ba927ae906344]::ty::context::TyCtxt, rustc_query_system[1b610f4e21531e30]::dep_graph::dep_node::DepNode)>>::call_once
  15:        0x11640451a - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  16:        0x11640457a - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  17:        0x11640457a - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  18:        0x11640457a - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  19:        0x11640457a - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  20:        0x11640457a - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  21:        0x11640457a - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  22:        0x11640457a - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  23:        0x1164042b0 - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  24:        0x11647e9e7 - rustc_query_system[1b610f4e21531e30]::query::plumbing::try_execute_query::<rustc_query_impl[10e03e6d76125a1d]::DynamicConfig<rustc_query_system[1b610f4e21531e30]::query::caches::DefaultCache<rustc_type_ir[8a1b53ee868f85f6]::canonical::Canonical<rustc_middle[fa5ba927ae906344]::ty::context::TyCtxt, rustc_middle[fa5ba927ae906344]::ty::ParamEnvAnd<rustc_middle[fa5ba927ae906344]::ty::predicate::Predicate>>, rustc_middle[fa5ba927ae906344]::query::erase::Erased<[u8; 2usize]>>, false, false, false>, rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt, true>
  25:        0x1166e1950 - rustc_query_impl[10e03e6d76125a1d]::query_impl::evaluate_obligation::get_query_incr::__rust_end_short_backtrace
  26:        0x116c98aec - <rustc_infer[51728598d54f1236]::infer::InferCtxt as rustc_trait_selection[3f467558470f6369]::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
  27:        0x116c98e6d - <rustc_infer[51728598d54f1236]::infer::InferCtxt as rustc_trait_selection[3f467558470f6369]::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow
  28:        0x116c89d61 - <rustc_trait_selection[3f467558470f6369]::traits::fulfill::FulfillProcessor>::process_trait_obligation
  29:        0x116c88b3e - <rustc_trait_selection[3f467558470f6369]::traits::fulfill::FulfillProcessor as rustc_data_structures[38adc06883ca682a]::obligation_forest::ObligationProcessor>::process_obligation
  30:        0x116aba733 - <rustc_data_structures[38adc06883ca682a]::obligation_forest::ObligationForest<rustc_trait_selection[3f467558470f6369]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[3f467558470f6369]::traits::fulfill::FulfillProcessor>
  31:        0x116bec685 - <rustc_trait_selection[3f467558470f6369]::traits::fulfill::FulfillmentContext as rustc_infer[51728598d54f1236]::traits::engine::TraitEngine>::select_where_possible
  32:        0x115472440 - rustc_hir_analysis[ad0ad50ab359f2b9]::check::check::check_impl_items_against_trait
  33:        0x115468dbb - rustc_hir_analysis[ad0ad50ab359f2b9]::check::check::check_item_type
  34:        0x11549ed01 - rustc_hir_analysis[ad0ad50ab359f2b9]::check::wfcheck::check_well_formed
  35:        0x116684d2a - rustc_query_impl[10e03e6d76125a1d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[10e03e6d76125a1d]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[fa5ba927ae906344]::query::erase::Erased<[u8; 1usize]>>
  36:        0x116513953 - rustc_query_system[1b610f4e21531e30]::query::plumbing::try_execute_query::<rustc_query_impl[10e03e6d76125a1d]::DynamicConfig<rustc_query_system[1b610f4e21531e30]::query::caches::VecCache<rustc_hir[d3a83409fa511c04]::hir_id::OwnerId, rustc_middle[fa5ba927ae906344]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt, true>
  37:        0x1166013cd - <rustc_query_impl[10e03e6d76125a1d]::plumbing::query_callback<rustc_query_impl[10e03e6d76125a1d]::query_impl::check_well_formed::QueryType>::{closure#0} as core[98362835e6f1cf4d]::ops::function::FnOnce<(rustc_middle[fa5ba927ae906344]::ty::context::TyCtxt, rustc_query_system[1b610f4e21531e30]::dep_graph::dep_node::DepNode)>>::call_once
  38:        0x11640451a - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  39:        0x1164042b0 - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  40:        0x11643aaa2 - rustc_query_system[1b610f4e21531e30]::query::plumbing::ensure_must_run::<rustc_query_impl[10e03e6d76125a1d]::DynamicConfig<rustc_query_system[1b610f4e21531e30]::query::caches::DefaultCache<rustc_span[b9e4b09a24a8c018]::def_id::LocalModDefId, rustc_middle[fa5ba927ae906344]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  41:        0x1166a92a6 - rustc_query_impl[10e03e6d76125a1d]::query_impl::check_mod_type_wf::get_query_incr::__rust_end_short_backtrace
  42:        0x115523a0c - rustc_hir_analysis[ad0ad50ab359f2b9]::check_crate
  43:        0x1159acd81 - rustc_interface[879bf7e024c9790f]::passes::run_required_analyses
  44:        0x1159af3c3 - rustc_interface[879bf7e024c9790f]::passes::analysis
  45:        0x116687ada - rustc_query_impl[10e03e6d76125a1d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[10e03e6d76125a1d]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[fa5ba927ae906344]::query::erase::Erased<[u8; 1usize]>>
  46:        0x116462119 - rustc_query_system[1b610f4e21531e30]::query::plumbing::try_execute_query::<rustc_query_impl[10e03e6d76125a1d]::DynamicConfig<rustc_query_system[1b610f4e21531e30]::query::caches::SingleCache<rustc_middle[fa5ba927ae906344]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt, true>
  47:        0x116691b8a - rustc_query_impl[10e03e6d76125a1d]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  48:        0x11517daf7 - <rustc_interface[879bf7e024c9790f]::queries::QueryResult<&rustc_middle[fa5ba927ae906344]::ty::context::GlobalCtxt>>::enter::<core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>, rustc_driver_impl[263088e60e1843a4]::run_compiler::{closure#0}::{closure#1}::{closure#3}>
  49:        0x1151d0c9d - rustc_interface[879bf7e024c9790f]::interface::run_compiler::<core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>, rustc_driver_impl[263088e60e1843a4]::run_compiler::{closure#0}>::{closure#1}
  50:        0x1151c3aa1 - std[bbe2f3e4661d22f2]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[879bf7e024c9790f]::util::run_in_thread_with_globals<rustc_interface[879bf7e024c9790f]::util::run_in_thread_pool_with_globals<rustc_interface[879bf7e024c9790f]::interface::run_compiler<core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>, rustc_driver_impl[263088e60e1843a4]::run_compiler::{closure#0}>::{closure#1}, core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>>::{closure#0}, core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>>
  51:        0x1151db6f6 - <<std[bbe2f3e4661d22f2]::thread::Builder>::spawn_unchecked_<rustc_interface[879bf7e024c9790f]::util::run_in_thread_with_globals<rustc_interface[879bf7e024c9790f]::util::run_in_thread_pool_with_globals<rustc_interface[879bf7e024c9790f]::interface::run_compiler<core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>, rustc_driver_impl[263088e60e1843a4]::run_compiler::{closure#0}>::{closure#1}, core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>>::{closure#0}, core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>>::{closure#2} as core[98362835e6f1cf4d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  52:        0x10c4b0ffb - std::sys::pal::unix::thread::Thread::new::thread_start::hefcab854b80b5673
  53:     0x7ff808cf318b - __pthread_start

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 make sure that you have updated to the latest nightly

note: please attach the file at `/Users/_/Documents/Dev/Projets rust/site_scan/rustc-ice-2024-05-25T17_50_05-25434.txt` to your bug report

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C incremental=[REDACTED]

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

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `diesel::query_builder::select_statement::SelectStatement<diesel::query_builder::from_clause::FromClause<schema::blocks::table>>: diesel::associations::HasTable`  |  = note: this failure-note originates in the macro `diesel::table` (in Nightly builds, run with -Z macro-backtrace for more info)

#1 [check_well_formed] checking that `schema::blocks::<impl at rest_api/src/schema.rs:3:1: 14:2>` is well-formed
end of query stack
there was a panic while trying to force a dep node
try_mark_green dep node stack:
#0 representability(4f30fb18c8887b86-69d9742e053ade32)
#1 adt_sized_constraint(thread 'rustc' panicked at compiler/rustc_hir/src/definitions.rs:389:13:
("Failed to extract DefId", adt_sized_constraint, PackedFingerprint(Fingerprint(1656113388420302199, 1128357605846114694)))
stack backtrace:
   0:        0x10c4a4283 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb04141112752ea70
   1:        0x10c4ef88b - core::fmt::write::hddfa7860c859e571
   2:        0x10c49a3ce - std::io::Write::write_fmt::h3002ff5eaabbfa96
   3:        0x10c4a4071 - std::sys_common::backtrace::print::hf8b8ac82befd31a5
   4:        0x10c4a6e39 - std::panicking::default_hook::{{closure}}::headb9a59455c83cc
   5:        0x10c4a6bb8 - std::panicking::default_hook::h0f278631d2fb154e
   6:        0x1151d246c - std[bbe2f3e4661d22f2]::panicking::update_hook::<alloc[6da3a573fc617c43]::boxed::Box<rustc_driver_impl[263088e60e1843a4]::install_ice_hook::{closure#0}>>::{closure#0}
   7:        0x10c4a7943 - std::panicking::rust_panic_with_hook::hc40a2ef99d181ed1
   8:        0x10c4a7282 - std::panicking::begin_panic_handler::{{closure}}::head167c964aad049
   9:        0x10c4a4759 - std::sys_common::backtrace::__rust_end_short_backtrace::h0fc564af4a20bb02
  10:        0x10c4a6fb6 - _rust_begin_unwind
  11:        0x10c50bfd2 - core::panicking::panic_fmt::ha7e6d9002cbc558e
  12:        0x1199b55ce - <rustc_hir[d3a83409fa511c04]::definitions::Definitions>::local_def_path_hash_to_def_id::err
  13:        0x115d1ecd0 - <rustc_middle[fa5ba927ae906344]::ty::context::TyCtxt>::def_path_hash_to_def_id
  14:        0x11599a5fa - rustc_interface[879bf7e024c9790f]::callbacks::dep_node_debug
  15:        0x11673013f - <rustc_query_system[1b610f4e21531e30]::dep_graph::dep_node::DepNode as core[98362835e6f1cf4d]::fmt::Debug>::fmt
  16:        0x10c4ef88b - core::fmt::write::hddfa7860c859e571
  17:        0x10c498621 - <&std::io::stdio::Stderr as std::io::Write>::write_fmt::hf3241710851205a6
  18:        0x10c498f87 - std::io::stdio::_eprint::heedc006db6d249f8
  19:        0x119b01600 - rustc_query_system[1b610f4e21531e30]::dep_graph::graph::print_markframe_trace::<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>
  20:        0x116404609 - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  21:        0x11640457a - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  22:        0x11640457a - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  23:        0x11640457a - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  24:        0x11640457a - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  25:        0x11640457a - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  26:        0x11640457a - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  27:        0x11640457a - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  28:        0x1164042b0 - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  29:        0x11647e9e7 - rustc_query_system[1b610f4e21531e30]::query::plumbing::try_execute_query::<rustc_query_impl[10e03e6d76125a1d]::DynamicConfig<rustc_query_system[1b610f4e21531e30]::query::caches::DefaultCache<rustc_type_ir[8a1b53ee868f85f6]::canonical::Canonical<rustc_middle[fa5ba927ae906344]::ty::context::TyCtxt, rustc_middle[fa5ba927ae906344]::ty::ParamEnvAnd<rustc_middle[fa5ba927ae906344]::ty::predicate::Predicate>>, rustc_middle[fa5ba927ae906344]::query::erase::Erased<[u8; 2usize]>>, false, false, false>, rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt, true>
  30:        0x1166e1950 - rustc_query_impl[10e03e6d76125a1d]::query_impl::evaluate_obligation::get_query_incr::__rust_end_short_backtrace
  31:        0x116c98aec - <rustc_infer[51728598d54f1236]::infer::InferCtxt as rustc_trait_selection[3f467558470f6369]::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
  32:        0x116c98e6d - <rustc_infer[51728598d54f1236]::infer::InferCtxt as rustc_trait_selection[3f467558470f6369]::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow
  33:        0x116c89d61 - <rustc_trait_selection[3f467558470f6369]::traits::fulfill::FulfillProcessor>::process_trait_obligation
  34:        0x116c88b3e - <rustc_trait_selection[3f467558470f6369]::traits::fulfill::FulfillProcessor as rustc_data_structures[38adc06883ca682a]::obligation_forest::ObligationProcessor>::process_obligation
  35:        0x116aba733 - <rustc_data_structures[38adc06883ca682a]::obligation_forest::ObligationForest<rustc_trait_selection[3f467558470f6369]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[3f467558470f6369]::traits::fulfill::FulfillProcessor>
  36:        0x116bec685 - <rustc_trait_selection[3f467558470f6369]::traits::fulfill::FulfillmentContext as rustc_infer[51728598d54f1236]::traits::engine::TraitEngine>::select_where_possible
  37:        0x115472440 - rustc_hir_analysis[ad0ad50ab359f2b9]::check::check::check_impl_items_against_trait
  38:        0x115468dbb - rustc_hir_analysis[ad0ad50ab359f2b9]::check::check::check_item_type
  39:        0x11549ed01 - rustc_hir_analysis[ad0ad50ab359f2b9]::check::wfcheck::check_well_formed
  40:        0x116684d2a - rustc_query_impl[10e03e6d76125a1d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[10e03e6d76125a1d]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[fa5ba927ae906344]::query::erase::Erased<[u8; 1usize]>>
  41:        0x116513953 - rustc_query_system[1b610f4e21531e30]::query::plumbing::try_execute_query::<rustc_query_impl[10e03e6d76125a1d]::DynamicConfig<rustc_query_system[1b610f4e21531e30]::query::caches::VecCache<rustc_hir[d3a83409fa511c04]::hir_id::OwnerId, rustc_middle[fa5ba927ae906344]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt, true>
  42:        0x1166013cd - <rustc_query_impl[10e03e6d76125a1d]::plumbing::query_callback<rustc_query_impl[10e03e6d76125a1d]::query_impl::check_well_formed::QueryType>::{closure#0} as core[98362835e6f1cf4d]::ops::function::FnOnce<(rustc_middle[fa5ba927ae906344]::ty::context::TyCtxt, rustc_query_system[1b610f4e21531e30]::dep_graph::dep_node::DepNode)>>::call_once
  43:        0x11640451a - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  44:        0x1164042b0 - <rustc_query_system[1b610f4e21531e30]::dep_graph::graph::DepGraphData<rustc_middle[fa5ba927ae906344]::dep_graph::DepsType>>::try_mark_green::<rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  45:        0x11643aaa2 - rustc_query_system[1b610f4e21531e30]::query::plumbing::ensure_must_run::<rustc_query_impl[10e03e6d76125a1d]::DynamicConfig<rustc_query_system[1b610f4e21531e30]::query::caches::DefaultCache<rustc_span[b9e4b09a24a8c018]::def_id::LocalModDefId, rustc_middle[fa5ba927ae906344]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt>
  46:        0x1166a92a6 - rustc_query_impl[10e03e6d76125a1d]::query_impl::check_mod_type_wf::get_query_incr::__rust_end_short_backtrace
  47:        0x115523a0c - rustc_hir_analysis[ad0ad50ab359f2b9]::check_crate
  48:        0x1159acd81 - rustc_interface[879bf7e024c9790f]::passes::run_required_analyses
  49:        0x1159af3c3 - rustc_interface[879bf7e024c9790f]::passes::analysis
  50:        0x116687ada - rustc_query_impl[10e03e6d76125a1d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[10e03e6d76125a1d]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[fa5ba927ae906344]::query::erase::Erased<[u8; 1usize]>>
  51:        0x116462119 - rustc_query_system[1b610f4e21531e30]::query::plumbing::try_execute_query::<rustc_query_impl[10e03e6d76125a1d]::DynamicConfig<rustc_query_system[1b610f4e21531e30]::query::caches::SingleCache<rustc_middle[fa5ba927ae906344]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[10e03e6d76125a1d]::plumbing::QueryCtxt, true>
  52:        0x116691b8a - rustc_query_impl[10e03e6d76125a1d]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  53:        0x11517daf7 - <rustc_interface[879bf7e024c9790f]::queries::QueryResult<&rustc_middle[fa5ba927ae906344]::ty::context::GlobalCtxt>>::enter::<core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>, rustc_driver_impl[263088e60e1843a4]::run_compiler::{closure#0}::{closure#1}::{closure#3}>
  54:        0x1151d0c9d - rustc_interface[879bf7e024c9790f]::interface::run_compiler::<core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>, rustc_driver_impl[263088e60e1843a4]::run_compiler::{closure#0}>::{closure#1}
  55:        0x1151c3aa1 - std[bbe2f3e4661d22f2]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[879bf7e024c9790f]::util::run_in_thread_with_globals<rustc_interface[879bf7e024c9790f]::util::run_in_thread_pool_with_globals<rustc_interface[879bf7e024c9790f]::interface::run_compiler<core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>, rustc_driver_impl[263088e60e1843a4]::run_compiler::{closure#0}>::{closure#1}, core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>>::{closure#0}, core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>>
  56:        0x1151db6f6 - <<std[bbe2f3e4661d22f2]::thread::Builder>::spawn_unchecked_<rustc_interface[879bf7e024c9790f]::util::run_in_thread_with_globals<rustc_interface[879bf7e024c9790f]::util::run_in_thread_pool_with_globals<rustc_interface[879bf7e024c9790f]::interface::run_compiler<core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>, rustc_driver_impl[263088e60e1843a4]::run_compiler::{closure#0}>::{closure#1}, core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>>::{closure#0}, core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[98362835e6f1cf4d]::result::Result<(), rustc_span[b9e4b09a24a8c018]::ErrorGuaranteed>>::{closure#2} as core[98362835e6f1cf4d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  57:        0x10c4b0ffb - std::sys::pal::unix::thread::Thread::new::thread_start::hefcab854b80b5673
  58:     0x7ff808cf318b - __pthread_start

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 make sure that you have updated to the latest nightly

note: please attach the file at `/Users/_/Documents/Dev/Projets rust/site_scan/rustc-ice-2024-05-25T17_50_05-25434.txt` to your bug report

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C incremental=[REDACTED]

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

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `diesel::query_builder::select_statement::SelectStatement<diesel::query_builder::from_clause::FromClause<schema::blocks::table>>: diesel::associations::HasTable`  |  = note: this failure-note originates in the macro `diesel::table` (in Nightly builds, run with -Z macro-backtrace for more info)

#1 [check_well_formed] checking that `schema::blocks::<impl at rest_api/src/schema.rs:3:1: 14:2>` is well-formed
end of query stack
there was a panic while trying to force a dep node
try_mark_green dep node stack:
#0 check_mod_type_wf(astralscan[16fb]::schema::blocks)
end of try_mark_green dep node stack

@Capunix309 Capunix309 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 May 25, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 25, 2024
@Capunix309 Capunix309 changed the title Diesel compilation bug Compilation bug while using Diesel framework May 25, 2024
@lqd lqd added the A-incr-comp Area: Incremental compilation label May 25, 2024
@Nilstrieb Nilstrieb added the S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. label May 25, 2024
@Nilstrieb
Copy link
Member

thank you for the report, but without a reproduction, there is sadly not much we can do.

@Nilstrieb Nilstrieb removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 25, 2024
@Capunix309
Copy link
Author

How can I give you this ?

@Nilstrieb
Copy link
Member

Ideally you could just post your project somewhere public like with a GitHub repo. If your project is not public though, then you can't easily do it, you'd need to attempt to minimize the bug to something small enough to share.

Also, just a project isn't enough in this case, we'd really need to know the exact edit you did that triggered the crash (for example with a git patch).

As a workaround, you can disable incremental compilation by setting [build] incremental = false in .cargo/config.toml.

@Capunix309
Copy link
Author

Thank you for the reply, but my project isn't public and couldn't be... The bug is disappearing when I re-install rust, and it currently isn't here. I don't understand what the problem is, since it seems being too deep for me. I'm just a junior developper you see. So thank you for your help, but I don't think I can't help you more with this.

@Capunix309 Capunix309 closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2024
@KayneWang
Copy link

@Capunix309 Delete your target directory (perhaps created by rust-analyzer) which is in your project root directory. Then try building again; it will be resolved.

@Capunix309
Copy link
Author

Thank you, I already found this solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants