Skip to content

Compiler Panics ,when I use Ractor Framework #124670

Open
@vinay10949

Description

Currently I am using Ractor Framework, I am not able to compile it ,the moment I change the DKGEngineMessage variable name

from

#[derive(Debug, RactorMessage)]
pub enum DkgEngineMessage {
    Init(usize, Vec<(usize, PeerId, MishtiPublicKey, String)>, usize),
    Round1,
    EncryptedYValuesAndCommittment((u128, HashMap<u128, Vec<u8>>, Vec<AffinePoint>)),
    Round2,
    StoreReceivedPublicKey(u128, AffinePoint),
    Round3,
}

to

#[derive(Debug, RactorMessage)]
pub enum DkgEngineMessage {
    Init(usize, Vec<(usize, PeerId, MishtiPublicKey, String)>, usize),
    Round1,
    EncryptedYValuesAndCommitment((u128, HashMap<u128, Vec<u8>>, Vec<AffinePoint>)),
    Round2,
    StoreReceivedPublicKey(u128, AffinePoint),
    Round3,
}

Code

use std::{collections::HashMap, fmt};

use crate::get_actor_ref;
use async_trait::async_trait;
use k256::AffinePoint;
use libp2p::PeerId;
use log::{debug, error, info};
use messages::{
    actor_type::ActorType,
    message::{DkgEngineMessage, GossipEngineMessage, Message, MishtiPublicKey},
    NETWORK_TOPIC,
};
use ractor::{Actor, ActorProcessingErr, ActorRef};
use rsa::{pkcs1::DecodeRsaPublicKey, RsaPrivateKey, RsaPublicKey};
use silk_oprf_core::{
    dkg::{Network, Node},
    Secp256k1,
};
use thiserror::*;

/// A generic error type to propagate errors from this actor
/// and other actors that interact with it
#[derive(Debug, Clone, Error)]
pub enum DKGEngineError {
    #[error("Error occurred in election engine: {0}")]
    Custom(String),
}

impl Default for DKGEngineError {
    fn default() -> Self {
        DKGEngineError::Custom("DKGEngine unable to acquire actor".to_string())
    }
}

/// The actor struct for the Election Engine actor
#[derive(Clone, Debug)]
pub struct DKGEngineActor(RsaPrivateKey);

impl DKGEngineActor {
    pub fn new(rsa_private_key: RsaPrivateKey) -> Self {
        Self(rsa_private_key)
    }
}
#[derive(Debug, Default)]
pub struct DkgStateWrapper(Option<DKGEngineState>);
pub struct DKGEngineState {
    current_node: Node<32, Secp256k1>,
    network: Network,
    input_y: HashMap<u128, Vec<u8>>,
    input_v: HashMap<u128, Vec<k256::AffinePoint>>,
    k_set: HashMap<u128, AffinePoint>,
}

impl fmt::Debug for DKGEngineState {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        f.debug_struct("DKGEngineState")
            .field("threshold", &self.network.threshold)
            .field("size", &self.network.total_nodes)
            .finish()
    }
}

type EncryptedYValues = (HashMap<u128, Vec<u8>>, Vec<AffinePoint>);

impl DKGEngineState {
    pub async fn dkg_init(
        idx: u128,
        rsa_private_key: RsaPrivateKey,
        elected_peers: Vec<(usize, PeerId, MishtiPublicKey, String)>,
        threshold: usize,
    ) -> Result<Self, DKGEngineError> {
        let current_node: Node<32, Secp256k1> =
            Node::with_rsa_key(idx, rsa_private_key).map_err(|e| {
                DKGEngineError::Custom(format!(
                    "Error occured while initializing node for dkg:{:?}",
                    e
                ))
            })?;

        let mut threshold = Network::new(threshold, elected_peers.len()).map_err(|e| {
            DKGEngineError::Custom(format!(
                "Error occured while initializing network for dkg:{:?}",
                e
            ))
        })?;
        let rsa_keys_map: HashMap<u128, RsaPublicKey> = elected_peers
            .iter()
            .map(|(idx, _, _, rsa_public_key)| {
                let rsa_public_key = RsaPublicKey::from_pkcs1_pem(rsa_public_key).map_err(|e| {
                    DKGEngineError::Custom(format!(
                        "Error occurred while parsing RSA public keys: {:?}",
                        e
                    ))
                })?;
                Ok((*idx as u128, rsa_public_key))
            })
            .collect::<Result<_, DKGEngineError>>()?;
        threshold.public_keys = rsa_keys_map;
        Ok(Self {
            current_node,
            network: threshold,
            input_v: HashMap::default(),
            input_y: HashMap::default(),
            k_set: HashMap::default(),
        })
    }

    pub async fn round1(&mut self) -> Result<EncryptedYValues, DKGEngineError> {
        let (encrypted_y_values, v_values, own_y_value) =
            self.current_node.dkg_round_1(&self.network).map_err(|e| {
                DKGEngineError::Custom(format!(
                    "Error occured while conducting dkg round 1 for the node :{:?}",
                    e
                ))
            })?;
        self.current_node.own_partial_share = own_y_value;
        self.current_node.init_pub_share = v_values[0];
        info!("Dkg round 1 done successfully");
        debug!(
            "encrypted_y_values: {:?}, {:?}, {:?}",
            encrypted_y_values, v_values, own_y_value
        );
        Ok((encrypted_y_values, v_values))
    }

    pub fn current_node(&self) -> &Node<32, Secp256k1> {
        &self.current_node
    }
}

#[async_trait]
impl Actor for DKGEngineActor {
    type Msg = DkgEngineMessage;
    type State = DkgStateWrapper;
    type Arguments = ();

    async fn pre_start(
        &self,
        _myself: ActorRef<Self::Msg>,
        _args: Self::Arguments,
    ) -> Result<Self::State, ActorProcessingErr> {
        Ok(DkgStateWrapper::default())
    }

    async fn handle(
        &self,
        myself: ActorRef<Self::Msg>,
        message: Self::Msg,
        state: &mut Self::State,
    ) -> Result<(), ActorProcessingErr> {
        match message {
            DkgEngineMessage::Init(idx, peers, threshold) => {
                info!("Initializing DKG engine");
                state.0 = Some(
                    DKGEngineState::dkg_init(idx as u128, self.0.clone(), peers, threshold)
                        .await
                        .map_err(ActorProcessingErr::from)?,
                );
                myself
                    .cast(DkgEngineMessage::Round1)
                    .map_err(ActorProcessingErr::from)?;
            }
            DkgEngineMessage::Round1 => {
                if let Some(state) = &mut state.0 {
                    match state.round1().await {
                        Ok((encrypted_values, v_values)) => {
                            let gossip_engine_actor_ref = get_actor_ref(
                                ActorType::GossipEngine,
                                "Unable to acquire gossip engine actor",
                            )?;

                            let _ = gossip_engine_actor_ref.cast(GossipEngineMessage::Gossip(
                                Message::EncryptedYValuesAndCommittment((
                                    state.current_node.id,
                                    encrypted_values,
                                    v_values,
                                )),
                                NETWORK_TOPIC.to_string(),
                            ));
                        }
                        Err(e) => {
                            error!("Error occured in DKG engine :{:?}", e);
                        }
                    }
                };
            }
            DkgEngineMessage::EncryptedYValuesAndCommittment((idx, encrypted_values, v_values)) => {
                if let Some(state) = state.0.as_mut().and_then(|state| {
                    encrypted_values.get(&state.current_node().id).map(|value| {
                        state.input_y.insert(idx, value.clone());
                        state.input_v.insert(idx, v_values.to_vec());
                        state
                    })
                }) {
                    info!("State :{:?}", state.input_y.len());
                    if state.input_y.len() == state.network.total_nodes - 1 {
                        info!("Proceeding for Round 1 of DKG");
                        myself.cast(DkgEngineMessage::Round2)?;
                    };
                }
            }

            DkgEngineMessage::Round2 => {
                if let Some(state) = &mut state.0 {
                    if let Ok((k1, k_1, pub_share)) = state
                        .current_node()
                        .dkg_round_2(state.input_y.clone(), state.input_v.clone())
                    {
                        state.current_node.private_share = k1;
                        state.current_node.pub_share = pub_share;
                        info!("DKG Round 2 done successfully");
                        info!("Proceeding for DKG Round 3");
                        state.k_set.insert(state.current_node.id, k_1);
                        let gossip_engine_actor_ref = get_actor_ref(
                            ActorType::GossipEngine,
                            "Unable to acquire gossip engine actor",
                        )?;

                        let _ = gossip_engine_actor_ref.cast(GossipEngineMessage::Gossip(
                            Message::BroadcastPublicKey(state.current_node.id, k_1),
                            NETWORK_TOPIC.to_string(),
                        ));
                    }
                }
            }
            DkgEngineMessage::StoreReceivedPublicKey(idx, point) => {
                if let Some(state) = &mut state.0 {
                    if state.current_node.id != idx {
                        state.k_set.insert(idx, point);
                    }

                    if state.k_set.len() == state.network.total_nodes {
                        info!("Proceeding to Round 3 of DKG");
                        myself.cast(DkgEngineMessage::Round3)?;
                    }
                }
            }
            DkgEngineMessage::Round3 => {
                if let Some(state) = &state.0 {
                    if let Ok(res) = state.current_node.dkg_round_3(&state.network, &state.k_set) {
                        info!("DKG done successfully :{:?}", res);
                        let gossip_engine_actor_ref = get_actor_ref(
                            ActorType::GossipEngine,
                            "Unable to acquire gossip engine actor",
                        )
                        .unwrap();
                        let _ = gossip_engine_actor_ref.cast(GossipEngineMessage::Gossip(
                            Message::Ready(state.current_node.id),
                            NETWORK_TOPIC.to_string(),
                        ));
                    }
                }
            }
        }

        Ok(())
    }
}

Meta

rustc --version --verbose:

rustc 1.77.1 (7cf61ebde 2024-03-27)
binary: rustc
commit-hash: 7cf61ebde7b22796c69757901dd346d0fe70bd97
commit-date: 2024-03-27
host: x86_64-unknown-linux-gnu
release: 1.77.1
LLVM version: 17.0.6

Error output

thread 'rustc' panicked at compiler/rustc_metadata/src/rmeta/def_path_hash_map.rs:23:54:
called `Option::unwrap()` on a `None` value
Backtrace

   0:     0x7f8f3c18bd16 - std::backtrace_rs::backtrace::libunwind::trace::h6e4a662bea54ccfc
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x7f8f3c18bd16 - std::backtrace_rs::backtrace::trace_unsynchronized::hb42b4eb2797d9c0e
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f8f3c18bd16 - std::sys_common::backtrace::_print_fmt::h2bc261f3223f4e4d
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7f8f3c18bd16 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9cca0343d66d16a8
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f8f3c1de770 - core::fmt::rt::Argument::fmt::h8b666c45176be671
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/fmt/rt.rs:142:9
   5:     0x7f8f3c1de770 - core::fmt::write::h4311bce0ee536615
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/fmt/mod.rs:1120:17
   6:     0x7f8f3c17f58f - std::io::Write::write_fmt::h0685c51539d0a0cd
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/io/mod.rs:1846:15
   7:     0x7f8f3c18baf4 - std::sys_common::backtrace::_print::h25f19b1d64e81f86
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f8f3c18baf4 - std::sys_common::backtrace::print::h2fb8f70628a241ed
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f8f3c18e887 - std::panicking::default_hook::{{closure}}::h05093fe2e3ef454d
  10:     0x7f8f3c18e5e9 - std::panicking::default_hook::h5ac38aa38e0086d2
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/panicking.rs:292:9
  11:     0x7f8f3edab4dc - std[6985fe5dee7179c0]::panicking::update_hook::<alloc[c678e180b9908eaa]::boxed::Box<rustc_driver_impl[57d634a88fe18246]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7f8f3c18efd6 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hce488f674cf5618d
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/alloc/src/boxed.rs:2029:9
  13:     0x7f8f3c18efd6 - std::panicking::rust_panic_with_hook::hed79743dc8b4b969
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/panicking.rs:785:13
  14:     0x7f8f3c18ece9 - std::panicking::begin_panic_handler::{{closure}}::ha437b5d58f431abf
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/panicking.rs:651:13
  15:     0x7f8f3c18c216 - std::sys_common::backtrace::__rust_end_short_backtrace::hd98e82d5b39ec859
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x7f8f3c18ea74 - rust_begin_unwind
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/panicking.rs:647:5
  17:     0x7f8f3c1dae75 - core::panicking::panic_fmt::hc69c4d258fe11477
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/panicking.rs:72:14
  18:     0x7f8f3c1daf33 - core::panicking::panic::h90e84101c01877ef
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/panicking.rs:144:5
  19:     0x7f8f3c1dabb6 - core::option::unwrap_failed::hac39b9b7507453f8
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/option.rs:1978:5
  20:     0x7f8f4018dbe4 - <rustc_query_system[da4130aa38fb7c58]::dep_graph::dep_node::DepNode as rustc_middle[42dfbbbcfa5f0e07]::dep_graph::dep_node::DepNodeExt>::extract_def_id
  21:     0x7f8f40ba0c21 - rustc_query_impl[cc38f1a9c625188c]::plumbing::force_from_dep_node::<rustc_query_impl[cc38f1a9c625188c]::DynamicConfig<rustc_query_system[da4130aa38fb7c58]::query::caches::DefIdCache<rustc_middle[42dfbbbcfa5f0e07]::query::erase::Erased<[u8; 8usize]>>, false, false, false>>
  22:     0x7f8f3f5222bd - <rustc_query_impl[cc38f1a9c625188c]::plumbing::query_callback<rustc_query_impl[cc38f1a9c625188c]::query_impl::type_of::QueryType>::{closure#0} as core[a93eb12aade15298]::ops::function::FnOnce<(rustc_middle[42dfbbbcfa5f0e07]::ty::context::TyCtxt, rustc_query_system[da4130aa38fb7c58]::dep_graph::dep_node::DepNode)>>::call_once
  23:     0x7f8f400512e5 - <rustc_query_system[da4130aa38fb7c58]::dep_graph::graph::DepGraphData<rustc_middle[42dfbbbcfa5f0e07]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[cc38f1a9c625188c]::plumbing::QueryCtxt>
  24:     0x7f8f40051256 - <rustc_query_system[da4130aa38fb7c58]::dep_graph::graph::DepGraphData<rustc_middle[42dfbbbcfa5f0e07]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[cc38f1a9c625188c]::plumbing::QueryCtxt>
  25:     0x7f8f40051256 - <rustc_query_system[da4130aa38fb7c58]::dep_graph::graph::DepGraphData<rustc_middle[42dfbbbcfa5f0e07]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[cc38f1a9c625188c]::plumbing::QueryCtxt>
  26:     0x7f8f40051256 - <rustc_query_system[da4130aa38fb7c58]::dep_graph::graph::DepGraphData<rustc_middle[42dfbbbcfa5f0e07]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[cc38f1a9c625188c]::plumbing::QueryCtxt>
  27:     0x7f8f40051256 - <rustc_query_system[da4130aa38fb7c58]::dep_graph::graph::DepGraphData<rustc_middle[42dfbbbcfa5f0e07]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[cc38f1a9c625188c]::plumbing::QueryCtxt>
  28:     0x7f8f40051256 - <rustc_query_system[da4130aa38fb7c58]::dep_graph::graph::DepGraphData<rustc_middle[42dfbbbcfa5f0e07]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[cc38f1a9c625188c]::plumbing::QueryCtxt>
  29:     0x7f8f401afa25 - rustc_query_system[da4130aa38fb7c58]::query::plumbing::try_execute_query::<rustc_query_impl[cc38f1a9c625188c]::DynamicConfig<rustc_query_system[da4130aa38fb7c58]::query::caches::DefaultCache<rustc_type_ir[caa3cbe50820ee17]::canonical::Canonical<rustc_middle[42dfbbbcfa5f0e07]::ty::context::TyCtxt, rustc_middle[42dfbbbcfa5f0e07]::ty::ParamEnvAnd<rustc_middle[42dfbbbcfa5f0e07]::ty::Predicate>>, rustc_middle[42dfbbbcfa5f0e07]::query::erase::Erased<[u8; 2usize]>>, false, false, false>, rustc_query_impl[cc38f1a9c625188c]::plumbing::QueryCtxt, true>
  30:     0x7f8f401ae552 - rustc_query_impl[cc38f1a9c625188c]::query_impl::evaluate_obligation::get_query_incr::__rust_end_short_backtrace
  31:     0x7f8f3d18d9e7 - <rustc_trait_selection[97775cafb2d144bf]::traits::fulfill::FulfillProcessor as rustc_data_structures[2a85f04897441841]::obligation_forest::ObligationProcessor>::process_obligation
  32:     0x7f8f400100fd - <rustc_data_structures[2a85f04897441841]::obligation_forest::ObligationForest<rustc_trait_selection[97775cafb2d144bf]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[97775cafb2d144bf]::traits::fulfill::FulfillProcessor>
  33:     0x7f8f40837dec - rustc_traits[c1eba79db089a718]::codegen::codegen_select_candidate
  34:     0x7f8f408375ef - rustc_query_impl[cc38f1a9c625188c]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[cc38f1a9c625188c]::query_impl::codegen_select_candidate::dynamic_query::{closure#2}::{closure#0}, rustc_middle[42dfbbbcfa5f0e07]::query::erase::Erased<[u8; 16usize]>>
  35:     0x7f8f408375a7 - <rustc_query_impl[cc38f1a9c625188c]::query_impl::codegen_select_candidate::dynamic_query::{closure#2} as core[a93eb12aade15298]::ops::function::FnOnce<(rustc_middle[42dfbbbcfa5f0e07]::ty::context::TyCtxt, (rustc_middle[42dfbbbcfa5f0e07]::ty::ParamEnv, rustc_middle[42dfbbbcfa5f0e07]::ty::sty::TraitRef))>>::call_once
  36:     0x7f8f40837569 - <rustc_query_system[da4130aa38fb7c58]::query::plumbing::execute_job_incr<rustc_query_impl[cc38f1a9c625188c]::DynamicConfig<rustc_query_system[da4130aa38fb7c58]::query::caches::DefaultCache<rustc_middle[42dfbbbcfa5f0e07]::ty::instance::InstanceDef, rustc_middle[42dfbbbcfa5f0e07]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[cc38f1a9c625188c]::plumbing::QueryCtxt>::{closure#2}::{closure#2} as core[a93eb12aade15298]::ops::function::FnOnce<((rustc_query_impl[cc38f1a9c625188c]::plumbing::QueryCtxt, rustc_query_impl[cc38f1a9c625188c]::DynamicConfig<rustc_query_system[da4130aa38fb7c58]::query::caches::DefaultCache<rustc_middle[42dfbbbcfa5f0e07]::ty::instance::InstanceDef, rustc_middle[42dfbbbcfa5f0e07]::query::erase::Erased<[u8; 16usize]>>, false, false, false>), rustc_middle[42dfbbbcfa5f0e07]::ty::instance::InstanceDef)>>::call_once
  37:     0x7f8f40835506 - rustc_query_system[da4130aa38fb7c58]::query::plumbing::try_execute_query::<rustc_query_impl[cc38f1a9c625188c]::DynamicConfig<rustc_query_system[da4130aa38fb7c58]::query::caches::DefaultCache<(rustc_middle[42dfbbbcfa5f0e07]::ty::ParamEnv, rustc_middle[42dfbbbcfa5f0e07]::ty::sty::TraitRef), rustc_middle[42dfbbbcfa5f0e07]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[cc38f1a9c625188c]::plumbing::QueryCtxt, true>
  38:     0x7f8f408345e5 - rustc_query_impl[cc38f1a9c625188c]::query_impl::codegen_select_candidate::get_query_incr::__rust_end_short_backtrace
  39:     0x7f8f4060b620 - rustc_monomorphize[93c111fb225a6450]::collector::find_vtable_types_for_unsizing
  40:     0x7f8f3de1ac7f - rustc_monomorphize[93c111fb225a6450]::collector::collect_items_rec::{closure#0}
  41:     0x7f8f40ee6543 - rustc_monomorphize[93c111fb225a6450]::collector::collect_items_rec
  42:     0x7f8f40ee6c88 - rustc_monomorphize[93c111fb225a6450]::collector::collect_items_rec
  43:     0x7f8f40ee6c88 - rustc_monomorphize[93c111fb225a6450]::collector::collect_items_rec
  44:     0x7f8f40ee6c88 - rustc_monomorphize[93c111fb225a6450]::collector::collect_items_rec
  45:     0x7f8f40ee6c88 - rustc_monomorphize[93c111fb225a6450]::collector::collect_items_rec
  46:     0x7f8f40ee6c88 - rustc_monomorphize[93c111fb225a6450]::collector::collect_items_rec
  47:     0x7f8f40ee6c88 - rustc_monomorphize[93c111fb225a6450]::collector::collect_items_rec
  48:     0x7f8f40ee6c88 - rustc_monomorphize[93c111fb225a6450]::collector::collect_items_rec
  49:     0x7f8f40ee6c88 - rustc_monomorphize[93c111fb225a6450]::collector::collect_items_rec
  50:     0x7f8f40ee6c88 - rustc_monomorphize[93c111fb225a6450]::collector::collect_items_rec
  51:     0x7f8f40ee6c88 - rustc_monomorphize[93c111fb225a6450]::collector::collect_items_rec
  52:     0x7f8f40ee6c88 - rustc_monomorphize[93c111fb225a6450]::collector::collect_items_rec
  53:     0x7f8f409c6536 - rustc_monomorphize[93c111fb225a6450]::partitioning::collect_and_partition_mono_items
  54:     0x7f8f409c5d2a - rustc_query_impl[cc38f1a9c625188c]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[cc38f1a9c625188c]::query_impl::collect_and_partition_mono_items::dynamic_query::{closure#2}::{closure#0}, rustc_middle[42dfbbbcfa5f0e07]::query::erase::Erased<[u8; 24usize]>>
  55:     0x7f8f409c5d0f - <rustc_query_impl[cc38f1a9c625188c]::query_impl::collect_and_partition_mono_items::dynamic_query::{closure#2} as core[a93eb12aade15298]::ops::function::FnOnce<(rustc_middle[42dfbbbcfa5f0e07]::ty::context::TyCtxt, ())>>::call_once
  56:     0x7f8f40f3e478 - rustc_query_system[da4130aa38fb7c58]::query::plumbing::try_execute_query::<rustc_query_impl[cc38f1a9c625188c]::DynamicConfig<rustc_query_system[da4130aa38fb7c58]::query::caches::SingleCache<rustc_middle[42dfbbbcfa5f0e07]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[cc38f1a9c625188c]::plumbing::QueryCtxt, true>
  57:     0x7f8f40fe6db3 - rustc_query_impl[cc38f1a9c625188c]::query_impl::collect_and_partition_mono_items::get_query_incr::__rust_end_short_backtrace
  58:     0x7f8f40e85816 - <rustc_codegen_llvm[600a145d8aceba6b]::LlvmCodegenBackend as rustc_codegen_ssa[a0fd7fe73e72c657]::traits::backend::CodegenBackend>::codegen_crate
  59:     0x7f8f40e83af0 - rustc_interface[be390c89f505a55d]::passes::start_codegen
  60:     0x7f8f40e832c2 - <rustc_interface[be390c89f505a55d]::queries::Queries>::codegen_and_build_linker
  61:     0x7f8f40e8cf26 - rustc_interface[be390c89f505a55d]::interface::run_compiler::<core[a93eb12aade15298]::result::Result<(), rustc_span[e4948e3682155d21]::ErrorGuaranteed>, rustc_driver_impl[57d634a88fe18246]::run_compiler::{closure#0}>::{closure#0}
  62:     0x7f8f40f34a1f - std[6985fe5dee7179c0]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[be390c89f505a55d]::util::run_in_thread_with_globals<rustc_interface[be390c89f505a55d]::interface::run_compiler<core[a93eb12aade15298]::result::Result<(), rustc_span[e4948e3682155d21]::ErrorGuaranteed>, rustc_driver_impl[57d634a88fe18246]::run_compiler::{closure#0}>::{closure#0}, core[a93eb12aade15298]::result::Result<(), rustc_span[e4948e3682155d21]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a93eb12aade15298]::result::Result<(), rustc_span[e4948e3682155d21]::ErrorGuaranteed>>
  63:     0x7f8f40f3487d - <<std[6985fe5dee7179c0]::thread::Builder>::spawn_unchecked_<rustc_interface[be390c89f505a55d]::util::run_in_thread_with_globals<rustc_interface[be390c89f505a55d]::interface::run_compiler<core[a93eb12aade15298]::result::Result<(), rustc_span[e4948e3682155d21]::ErrorGuaranteed>, rustc_driver_impl[57d634a88fe18246]::run_compiler::{closure#0}>::{closure#0}, core[a93eb12aade15298]::result::Result<(), rustc_span[e4948e3682155d21]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a93eb12aade15298]::result::Result<(), rustc_span[e4948e3682155d21]::ErrorGuaranteed>>::{closure#1} as core[a93eb12aade15298]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  64:     0x7f8f3c198675 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h32ae492e80523c39
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/alloc/src/boxed.rs:2015:9
  65:     0x7f8f3c198675 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd05b2dc112b7a972
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/alloc/src/boxed.rs:2015:9
  66:     0x7f8f3c198675 - std::sys::pal::unix::thread::Thread::new::thread_start::h40e6fd3f8ce15a14
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/sys/pal/unix/thread.rs:108:17
  67:     0x7f8f3bf45b43 - start_thread
                               at ./nptl/pthread_create.c:442:8
  68:     0x7f8f3bfd7a00 - clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  69:                0x0 - <unknown>

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: rustc 1.77.1 (7cf61ebde 2024-03-27) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -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 `(ractor::actor::ActorRuntime<actors::dkg_engine_actor::DKGEngineActor>, ractor::actor::actor_cell::ActorPortSet, (), core::option::Option<ractor::actor::actor_cell::ActorCell>): core::marker::Send`
#1 [codegen_select_candidate] computing candidate for `<core::pin::Pin<alloc::boxed::Box<{async block@<actors::dkg_engine_actor::DKGEngineActor as ractor::actor::Actor>::spawn<'_>::{closure#0}}>> as core::ops::unsize::CoerceUnsized<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(ractor::actor::actor_ref::ActorRef<messages::message::DkgEngineMessage>, ractor::concurrency::async_std_primatives::JoinHandle<()>), ractor::errors::SpawnErr>> + core::marker::Send>>>>`
#2 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
there was a panic while trying to force a dep node
try_mark_green dep node stack:
#0 TraitSelect(21545192d039faae-815c9158bb0f28f8)
#1 TraitSelect(6862d417d8624fec-e3087f957793ff09)
#2 TraitSelect(3c7047302421e412-6823e0396f655300)
#3 TraitSelect(2233525216606ddf-f14427a4b46ec8b9)
#4 TraitSelect(28506321078fdc1d-4025ee428ffcfc79)
#5 evaluate_obligation(2606904e103973c9-5371b8d412d42b03)
end of try_mark_green dep node stack
error: could not compile `node` (bin "mishti_node")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationC-bugCategory: This is a bug.E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcE-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️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