From 2203ffe4a94e937012d758c7037a4e5e0d525869 Mon Sep 17 00:00:00 2001 From: Igor Katson Date: Sat, 18 Nov 2023 00:20:49 +0000 Subject: [PATCH] Fixed bugs --- TODO.md | 12 +-- crates/librqbit/src/peer_connection.rs | 4 + crates/librqbit/src/peer_state.rs | 82 ++++++++++++++- crates/librqbit/src/torrent_state.rs | 62 ++++++----- rustc-ice-2023-11-17T23_37_51-9985.txt | 140 +++++++++++++++++++++++++ rustc-ice-2023-11-17T23_37_51-9986.txt | 140 +++++++++++++++++++++++++ rustc-ice-2023-11-17T23_37_51-9987.txt | 140 +++++++++++++++++++++++++ 7 files changed, 536 insertions(+), 44 deletions(-) create mode 100644 rustc-ice-2023-11-17T23_37_51-9985.txt create mode 100644 rustc-ice-2023-11-17T23_37_51-9986.txt create mode 100644 rustc-ice-2023-11-17T23_37_51-9987.txt diff --git a/TODO.md b/TODO.md index 13194fc..c6aafee 100644 --- a/TODO.md +++ b/TODO.md @@ -1,16 +1,6 @@ -- [x] Selective file downloading (mostly done) - - [x] Proper counting of how much is left, and how much is downloaded - -- [x] Send bitfield at the start if I have something -- [x] use the "update_hash" function in piece checking -- [ ] signaling when file is done - -- [ ] when we have the whole torrent, there's no point talking to peers that also have the whole torrent - +- [ ] when we have the whole torrent, there's no point talking to peers that also have the whole torrent and keep reconnecting to them. - [ ] per-file stats - [ ] per-peer stats -- [x] slow peers cause slowness in the end, need the "end of game" algorithm - someday: - [ ] cancellation from the client-side for the lib (i.e. stop the torrent manager) \ No newline at end of file diff --git a/crates/librqbit/src/peer_connection.rs b/crates/librqbit/src/peer_connection.rs index af35a02..68771e9 100644 --- a/crates/librqbit/src/peer_connection.rs +++ b/crates/librqbit/src/peer_connection.rs @@ -31,6 +31,7 @@ pub trait PeerConnectionHandler { pub enum WriterRequest { Message(MessageOwned), ReadChunkRequest(ChunkInfo), + Disconnect, } #[derive(Default, Copy, Clone)] @@ -247,6 +248,9 @@ impl PeerConnection { uploaded_add = Some(chunk.size); full_len } + WriterRequest::Disconnect => { + return Ok(()); + } }; debug!("sending to {}: {:?}, length={}", self.addr, &req, len); diff --git a/crates/librqbit/src/peer_state.rs b/crates/librqbit/src/peer_state.rs index bcfa19d..16e0592 100644 --- a/crates/librqbit/src/peer_state.rs +++ b/crates/librqbit/src/peer_state.rs @@ -4,7 +4,7 @@ use std::{collections::HashSet, sync::Arc}; use backoff::{ExponentialBackoff, ExponentialBackoffBuilder}; use librqbit_core::id20::Id20; use librqbit_core::lengths::{ChunkInfo, ValidPieceIndex}; -use tokio::sync::mpsc::{UnboundedReceiver, UnboundedSender}; +use tokio::sync::mpsc::{unbounded_channel, UnboundedReceiver, UnboundedSender}; use tokio::sync::{Notify, Semaphore}; use crate::peer_connection::WriterRequest; @@ -56,10 +56,82 @@ pub struct Peer { #[derive(Debug, Default)] pub enum PeerState { #[default] + // Will be tried to be connected as soon as possible. Queued, Connecting(PeerTx), Live(LivePeerState), + // There was an error, and it's waiting for exponential backoff. Dead, + // The peer has the full torrent, and we have the full torrent, so no need + // to keep talking to it. + FullyHaveNoLongerNeeded, +} + +impl PeerState { + fn take_connecting(&mut self) -> Option { + if let PeerState::Connecting(_) = self { + match std::mem::take(self) { + PeerState::Connecting(tx) => Some(tx), + _ => unreachable!(), + } + } else { + None + } + } + + fn take_live(&mut self) -> Option { + if let PeerState::Live(_) = self { + match std::mem::take(self) { + PeerState::Live(l) => Some(l), + _ => unreachable!(), + } + } else { + None + } + } + + pub fn get_live_mut(&mut self) -> Option<&mut LivePeerState> { + match self { + PeerState::Live(l) => Some(l), + _ => None, + } + } + + pub fn queued_to_connecting(&mut self) -> Option { + if let PeerState::Queued = self { + let (tx, rx) = unbounded_channel(); + *self = PeerState::Connecting(Arc::new(tx)); + Some(rx) + } else { + None + } + } + pub fn connecting_to_live(&mut self, peer_id: Id20) -> Option<&mut LivePeerState> { + let tx = self.take_connecting()?; + *self = PeerState::Live(LivePeerState::new(peer_id, tx)); + self.get_live_mut() + } + + pub fn dead_to_queued(&mut self) -> bool { + if let PeerState::Dead = self { + *self = PeerState::Queued; + return true; + } + false + } + + pub fn to_dead(&mut self) -> Option { + match std::mem::replace(self, PeerState::Dead) { + PeerState::Live(l) => Some(l), + _ => None, + } + } + + pub fn live_to(&mut self, new_state: PeerState) -> Option { + let l = self.take_live()?; + *self = new_state; + Some(l) + } } #[derive(Debug)] @@ -87,4 +159,12 @@ impl LivePeerState { tx, } } + + pub fn has_full_torrent(&self, total_pieces: usize) -> bool { + let bf = match self.bitfield.as_ref() { + Some(bf) => bf, + None => return false, + }; + bf.get(0..total_pieces).map_or(false, |s| s.all()) + } } diff --git a/crates/librqbit/src/torrent_state.rs b/crates/librqbit/src/torrent_state.rs index 86e7e53..73287b5 100644 --- a/crates/librqbit/src/torrent_state.rs +++ b/crates/librqbit/src/torrent_state.rs @@ -65,6 +65,7 @@ pub struct AggregatePeerStats { pub live: usize, pub seen: usize, pub dead: usize, + pub fully_have_and_we_are_finished: usize, } impl PeerStates { @@ -78,6 +79,7 @@ impl PeerStates { PeerState::Live(_) => s.live += 1, PeerState::Queued => s.queued += 1, PeerState::Dead => s.dead += 1, + PeerState::FullyHaveNoLongerNeeded => s.fully_have_and_we_are_finished += 1, }; s }); @@ -121,10 +123,7 @@ impl PeerStates { } pub fn mark_peer_dead(&mut self, handle: PeerHandle) -> Option { let peer = self.states.get_mut(&handle)?; - match std::mem::replace(&mut peer.state, PeerState::Dead) { - PeerState::Live(l) => Some(l), - _ => None, - } + peer.state.to_dead() } pub fn drop_peer(&mut self, handle: PeerHandle) -> Option { self.states.remove(&handle) @@ -161,16 +160,11 @@ impl PeerStates { .states .get_mut(&h) .context("peer not found in states")?; - match &mut peer.state { - s @ PeerState::Queued => { - let (tx, rx) = unbounded_channel(); - *s = PeerState::Connecting(Arc::new(tx)); - Ok(rx) - } - s => { - bail!("did not expect to see the peer in state {:?}", s); - } - } + let rx = peer + .state + .queued_to_connecting() + .context("invalid peer state")?; + Ok(rx) } pub fn clone_tx(&self, handle: PeerHandle) -> Option { @@ -486,29 +480,17 @@ impl TorrentState { return; } }; - let s = match &mut peer.state { - s @ PeerState::Connecting(_) => s, - _ => { - warn!("peer {} was in a wrong state", handle); - return; - } - }; - let tx = match std::mem::take(s) { - PeerState::Connecting(tx) => tx, - _ => unreachable!(), - }; - *s = PeerState::Live(LivePeerState::new(Id20(h.peer_id), tx)); + peer.state.connecting_to_live(Id20(h.peer_id)); } fn on_peer_died(self: &Arc, handle: PeerHandle) { let mut g = self.locked.write(); - let live = match g.peers.mark_peer_dead(handle) { - Some(peer) => peer, - None => return, - }; - for req in live.inflight_requests { - g.chunks.mark_chunk_request_cancelled(req.piece, req.chunk); + if let Some(live) = g.peers.mark_peer_dead(handle) { + for req in live.inflight_requests { + g.chunks.mark_chunk_request_cancelled(req.piece, req.chunk); + } } + let backoff = g .peers .states @@ -1123,6 +1105,7 @@ impl PeerHandler { if self.state.get_left_to_download() == 0 { self.state.finished_notify.notify_waiters(); + self.disconnect_all_peers_that_have_full_torrent(); self.reopen_read_only()?; } @@ -1145,4 +1128,19 @@ impl PeerHandler { .with_context(|| format!("error processing received chunk {chunk_info:?}"))?; Ok(()) } + + fn disconnect_all_peers_that_have_full_torrent(&self) { + let mut g = self.state.locked.write(); + for (_, peer) in g.peers.states.iter_mut() { + if let PeerState::Live(l) = &peer.state { + if l.has_full_torrent(self.state.lengths.total_pieces() as usize) { + let live = peer + .state + .live_to(PeerState::FullyHaveNoLongerNeeded) + .unwrap(); + let _ = live.tx.send(WriterRequest::Disconnect); + } + } + } + } } diff --git a/rustc-ice-2023-11-17T23_37_51-9985.txt b/rustc-ice-2023-11-17T23_37_51-9985.txt new file mode 100644 index 0000000..7b5092d --- /dev/null +++ b/rustc-ice-2023-11-17T23_37_51-9985.txt @@ -0,0 +1,140 @@ +thread 'rustc' panicked at /rustc/dd430bc8c22f57992ec1457a87437d14283fdd65/compiler/rustc_errors/src/lib.rs:999:33: +Box +stack backtrace: + 0: 0x1059a3dac - std::backtrace::Backtrace::create::he1446a17ed3fb192 + 1: 0x10edcb134 - as core[e0b35f7eb9175e97]::ops::function::Fn<(&dyn for<'a, 'b> core[e0b35f7eb9175e97]::ops::function::Fn<(&'a core[e0b35f7eb9175e97]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[e0b35f7eb9175e97]::marker::Sync + core[e0b35f7eb9175e97]::marker::Send, &core[e0b35f7eb9175e97]::panic::panic_info::PanicInfo)>>::call + 2: 0x1059bbca8 - std::panicking::rust_panic_with_hook::h05bd262a58657294 + 3: 0x10fbffd4c - std[4d79feac4cea9cd0]::panicking::begin_panic::::{closure#0} + 4: 0x10fbfe448 - std[4d79feac4cea9cd0]::sys_common::backtrace::__rust_end_short_backtrace::::{closure#0}, !> + 5: 0x112bec854 - std[4d79feac4cea9cd0]::panicking::begin_panic:: + 6: 0x10fb1bd68 - ::span_bug:: + 7: 0x10fb1b92c - ::span_bug:: + 8: 0x10fbe1584 - rustc_middle[c4367cd1cb8e0dc9]::util::bug::opt_span_bug_fmt::::{closure#0} + 9: 0x10fbe15b8 - rustc_middle[c4367cd1cb8e0dc9]::ty::context::tls::with_opt::::{closure#0}, !>::{closure#0} + 10: 0x10fbdea54 - rustc_middle[c4367cd1cb8e0dc9]::ty::context::tls::with_context_opt::::{closure#0}, !>::{closure#0}, !> + 11: 0x112bed690 - rustc_middle[c4367cd1cb8e0dc9]::util::bug::span_bug_fmt:: + 12: 0x10facfd78 - rustc_mir_transform[b0d987c76d7549be]::coroutine::mir_coroutine_witnesses + 13: 0x10ffd3d28 - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 14: 0x11011dc7c - >::call_once + 15: 0x10ff466e8 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 16: 0x10fee2e08 - rustc_query_system[865695b26f343ed8]::query::plumbing::force_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt> + 17: 0x10ffb0d98 - ::{closure#0} as core[e0b35f7eb9175e97]::ops::function::FnOnce<(rustc_middle[c4367cd1cb8e0dc9]::ty::context::TyCtxt, rustc_query_system[865695b26f343ed8]::dep_graph::dep_node::DepNode)>>::call_once + 18: 0x11005d434 - >::try_mark_previous_green:: + 19: 0x11005d20c - >::try_mark_green:: + 20: 0x10ff14abc - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::, rustc_middle[c4367cd1cb8e0dc9]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 21: 0x1101b69c4 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::needs_drop_raw::get_query_incr::__rust_end_short_backtrace + 22: 0x11059fd34 - ::needs_drop + 23: 0x1105ad520 - rustc_trait_selection[caa1e5098b58bda5]::traits::query::dropck_outlives::dtorck_constraint_for_ty_inner + 24: 0x1105a63e0 - rustc_trait_selection[caa1e5098b58bda5]::traits::query::dropck_outlives::compute_dropck_outlives_inner + 25: 0x11063ac8c - ::enter_canonical_trait_query::, rustc_middle[c4367cd1cb8e0dc9]::traits::query::DropckOutlivesResult, rustc_traits[56979a00368fe7bc]::dropck_outlives::dropck_outlives::{closure#0}> + 26: 0x11064c2dc - rustc_traits[56979a00368fe7bc]::dropck_outlives::dropck_outlives + 27: 0x10ffd09bc - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 28: 0x11011a488 - >)>>::call_once + 29: 0x10ff013b0 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, rustc_middle[c4367cd1cb8e0dc9]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 30: 0x110126f34 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::dropck_outlives::get_query_incr::__rust_end_short_backtrace + 31: 0x11047ec08 - rustc_middle[c4367cd1cb8e0dc9]::query::plumbing::query_get_at::>, rustc_middle[c4367cd1cb8e0dc9]::query::erase::Erased<[u8; 8usize]>>> + 32: 0x10e8aa458 - ::fully_perform_into + 33: 0x10e7d0a58 - as rustc_trait_selection[caa1e5098b58bda5]::traits::query::type_op::TypeOp>::fully_perform + 34: 0x10e7ab9b8 - ::add_drop_live_facts_for + 35: 0x10e7aac64 - rustc_borrowck[288b2637815caa8b]::type_check::liveness::trace::trace + 36: 0x10e7e2124 - rustc_borrowck[288b2637815caa8b]::type_check::liveness::generate + 37: 0x10e7ad240 - rustc_borrowck[288b2637815caa8b]::type_check::type_check + 38: 0x10e93cd7c - rustc_borrowck[288b2637815caa8b]::nll::compute_regions + 39: 0x10e78cfd0 - rustc_borrowck[288b2637815caa8b]::do_mir_borrowck + 40: 0x10e7840a0 - rustc_borrowck[288b2637815caa8b]::mir_borrowck + 41: 0x10ffcfba0 - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 42: 0x11002f10c - >::call_once + 43: 0x10ff8b7a8 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 44: 0x110035bc0 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::mir_borrowck::get_query_incr::__rust_end_short_backtrace + 45: 0x10e797140 - rustc_middle[c4367cd1cb8e0dc9]::query::plumbing::query_get_at::>> + 46: 0x10e7b1bdc - ::prove_closure_bounds + 47: 0x10e7b5090 - ::check_rvalue + 48: 0x10e7b8464 - ::typeck_mir + 49: 0x10e7acde0 - rustc_borrowck[288b2637815caa8b]::type_check::type_check + 50: 0x10e93cd7c - rustc_borrowck[288b2637815caa8b]::nll::compute_regions + 51: 0x10e78cfd0 - rustc_borrowck[288b2637815caa8b]::do_mir_borrowck + 52: 0x10e7840a0 - rustc_borrowck[288b2637815caa8b]::mir_borrowck + 53: 0x10ffcfba0 - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 54: 0x11002f10c - >::call_once + 55: 0x10ff8b7a8 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 56: 0x110035bc0 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::mir_borrowck::get_query_incr::__rust_end_short_backtrace + 57: 0x10f057fe8 - rustc_middle[c4367cd1cb8e0dc9]::query::plumbing::query_get_at::>> + 58: 0x10f06a940 - rustc_hir_analysis[c19c0bfd1608da07]::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit + 59: 0x10ffd075c - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 60: 0x11011a304 - >::call_once + 61: 0x10ff466e8 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 62: 0x1100d219c - rustc_query_impl[6ec06d95fa579ddc]::query_impl::type_of_opaque::get_query_incr::__rust_end_short_backtrace + 63: 0x10f000e20 - rustc_middle[c4367cd1cb8e0dc9]::query::plumbing::query_get_at::>> + 64: 0x10f019a78 - rustc_hir_analysis[c19c0bfd1608da07]::collect::type_of::type_of + 65: 0x10ffd5210 - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 66: 0x11012062c - >::call_once + 67: 0x10ff466e8 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 68: 0x1101568b0 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::type_of::get_query_incr::__rust_end_short_backtrace + 69: 0x10f8fa314 - rustc_middle[c4367cd1cb8e0dc9]::query::plumbing::query_get_at::>> + 70: 0x10f8e7f94 - ::expand_opaque_ty + 71: 0x10f8e8080 - >::fold_ty + 72: 0x10f8e82c8 - >::fold_ty + 73: 0x10f8eacdc - rustc_middle[c4367cd1cb8e0dc9]::ty::util::fold_list:: as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with::{closure#0}> + 74: 0x10f888ed8 - >::try_super_fold_with:: + 75: 0x10f8e8060 - >::fold_ty + 76: 0x10f7c7fcc - <&rustc_middle[c4367cd1cb8e0dc9]::ty::list::List as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with:: + 77: 0x10f888f1c - >::try_super_fold_with:: + 78: 0x10f8e8060 - >::fold_ty + 79: 0x10f8e82c8 - >::fold_ty + 80: 0x10f8eacdc - rustc_middle[c4367cd1cb8e0dc9]::ty::util::fold_list:: as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with::{closure#0}> + 81: 0x10f888ed8 - >::try_super_fold_with:: + 82: 0x10f8e8060 - >::fold_ty + 83: 0x10f8e7fc4 - ::expand_opaque_ty + 84: 0x10f8e8080 - >::fold_ty + 85: 0x10f8e82c8 - >::fold_ty + 86: 0x10f8eacdc - rustc_middle[c4367cd1cb8e0dc9]::ty::util::fold_list:: as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with::{closure#0}> + 87: 0x10f888ed8 - >::try_super_fold_with:: + 88: 0x10f8e8060 - >::fold_ty + 89: 0x10f7c7fcc - <&rustc_middle[c4367cd1cb8e0dc9]::ty::list::List as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with:: + 90: 0x10f888e74 - >::try_super_fold_with:: + 91: 0x10f8e8060 - >::fold_ty + 92: 0x10f8eacdc - rustc_middle[c4367cd1cb8e0dc9]::ty::util::fold_list:: as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with::{closure#0}> + 93: 0x10f888eb4 - >::try_super_fold_with:: + 94: 0x10f8e8060 - >::fold_ty + 95: 0x10f8e82c8 - >::fold_ty + 96: 0x10f8eacdc - rustc_middle[c4367cd1cb8e0dc9]::ty::util::fold_list:: as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with::{closure#0}> + 97: 0x10f888ed8 - >::try_super_fold_with:: + 98: 0x10f8e8060 - >::fold_ty + 99: 0x10f8e7fc4 - ::expand_opaque_ty + 100: 0x10f780f54 - ::try_expand_impl_trait_type + 101: 0x10f01034c - rustc_hir_analysis[c19c0bfd1608da07]::check::check::check_item_type + 102: 0x10f0169cc - rustc_hir_analysis[c19c0bfd1608da07]::check::check::check_mod_item_types + 103: 0x10ffd292c - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 104: 0x1101b0bf8 - >::call_once + 105: 0x10ff2d2d4 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 106: 0x110158cb0 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::check_mod_item_types::get_query_incr::__rust_end_short_backtrace + 107: 0x10f0c2914 - ::for_each_module:: + 108: 0x10f094b04 - rustc_hir_analysis[c19c0bfd1608da07]::check_crate + 109: 0x10f51d094 - rustc_interface[fd51d116160c92d2]::passes::analysis + 110: 0x10ffd5238 - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 111: 0x110155f7c - >::call_once + 112: 0x10feeeec4 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 113: 0x11019b9d8 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace + 114: 0x10edad124 - ::enter::> + 115: 0x10ed3f4f4 - ::enter::, rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>> + 116: 0x10edab4dc - rustc_span[cc43194fc10ba92f]::set_source_map::, rustc_interface[fd51d116160c92d2]::interface::run_compiler, rustc_driver_impl[683555f6943f3d8]::run_compiler::{closure#1}>::{closure#0}::{closure#0}> + 117: 0x10edb3c5c - std[4d79feac4cea9cd0]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver_impl[683555f6943f3d8]::run_compiler::{closure#1}>::{closure#0}, core[e0b35f7eb9175e97]::result::Result<(), rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>>::{closure#0}, core[e0b35f7eb9175e97]::result::Result<(), rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[e0b35f7eb9175e97]::result::Result<(), rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>> + 118: 0x10ed9b854 - <::spawn_unchecked_, rustc_driver_impl[683555f6943f3d8]::run_compiler::{closure#1}>::{closure#0}, core[e0b35f7eb9175e97]::result::Result<(), rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>>::{closure#0}, core[e0b35f7eb9175e97]::result::Result<(), rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[e0b35f7eb9175e97]::result::Result<(), rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>>::{closure#1} as core[e0b35f7eb9175e97]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} + 119: 0x1059c3ea4 - std::sys::unix::thread::Thread::new::thread_start::hc8d37e25d4657683 + 120: 0x18c159034 - __pthread_joiner_wake + + +rustc version: 1.76.0-nightly (dd430bc8c 2023-11-14) +platform: aarch64-apple-darwin + +query stack during panic: +#0 [mir_coroutine_witnesses] coroutine witness types for `peer_connection::::manage_peer::{closure#0}::{closure#3}` +#1 [needs_drop_raw] computing whether `{coroutine witness@crates/librqbit/src/peer_connection.rs:202:22: 268:10}` needs drop +#2 [dropck_outlives] computing dropck types for `{async block@crates/librqbit/src/peer_connection.rs:202:22: 268:10}` +#3 [mir_borrowck] borrow-checking `peer_connection::::manage_peer::{closure#0}` +#4 [mir_borrowck] borrow-checking `peer_connection::::manage_peer` +#5 [type_of_opaque] computing type of opaque `peer_connection::::manage_peer::{opaque#0}` +#6 [type_of] computing type of `peer_connection::::manage_peer::{opaque#0}` +#7 [check_mod_item_types] checking item types in module `dht_utils` +#8 [analysis] running analysis passes on this crate +end of query stack diff --git a/rustc-ice-2023-11-17T23_37_51-9986.txt b/rustc-ice-2023-11-17T23_37_51-9986.txt new file mode 100644 index 0000000..74a21c8 --- /dev/null +++ b/rustc-ice-2023-11-17T23_37_51-9986.txt @@ -0,0 +1,140 @@ +thread 'rustc' panicked at /rustc/dd430bc8c22f57992ec1457a87437d14283fdd65/compiler/rustc_errors/src/lib.rs:999:33: +Box +stack backtrace: + 0: 0x10470fdac - std::backtrace::Backtrace::create::he1446a17ed3fb192 + 1: 0x10db37134 - as core[e0b35f7eb9175e97]::ops::function::Fn<(&dyn for<'a, 'b> core[e0b35f7eb9175e97]::ops::function::Fn<(&'a core[e0b35f7eb9175e97]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[e0b35f7eb9175e97]::marker::Sync + core[e0b35f7eb9175e97]::marker::Send, &core[e0b35f7eb9175e97]::panic::panic_info::PanicInfo)>>::call + 2: 0x104727ca8 - std::panicking::rust_panic_with_hook::h05bd262a58657294 + 3: 0x10e96bd4c - std[4d79feac4cea9cd0]::panicking::begin_panic::::{closure#0} + 4: 0x10e96a448 - std[4d79feac4cea9cd0]::sys_common::backtrace::__rust_end_short_backtrace::::{closure#0}, !> + 5: 0x111958854 - std[4d79feac4cea9cd0]::panicking::begin_panic:: + 6: 0x10e887d68 - ::span_bug:: + 7: 0x10e88792c - ::span_bug:: + 8: 0x10e94d584 - rustc_middle[c4367cd1cb8e0dc9]::util::bug::opt_span_bug_fmt::::{closure#0} + 9: 0x10e94d5b8 - rustc_middle[c4367cd1cb8e0dc9]::ty::context::tls::with_opt::::{closure#0}, !>::{closure#0} + 10: 0x10e94aa54 - rustc_middle[c4367cd1cb8e0dc9]::ty::context::tls::with_context_opt::::{closure#0}, !>::{closure#0}, !> + 11: 0x111959690 - rustc_middle[c4367cd1cb8e0dc9]::util::bug::span_bug_fmt:: + 12: 0x10e83bd78 - rustc_mir_transform[b0d987c76d7549be]::coroutine::mir_coroutine_witnesses + 13: 0x10ed3fd28 - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 14: 0x10ee89c7c - >::call_once + 15: 0x10ecb26e8 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 16: 0x10ec4ee08 - rustc_query_system[865695b26f343ed8]::query::plumbing::force_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt> + 17: 0x10ed1cd98 - ::{closure#0} as core[e0b35f7eb9175e97]::ops::function::FnOnce<(rustc_middle[c4367cd1cb8e0dc9]::ty::context::TyCtxt, rustc_query_system[865695b26f343ed8]::dep_graph::dep_node::DepNode)>>::call_once + 18: 0x10edc9434 - >::try_mark_previous_green:: + 19: 0x10edc920c - >::try_mark_green:: + 20: 0x10ec80abc - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::, rustc_middle[c4367cd1cb8e0dc9]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 21: 0x10ef229c4 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::needs_drop_raw::get_query_incr::__rust_end_short_backtrace + 22: 0x10f30bd34 - ::needs_drop + 23: 0x10f319520 - rustc_trait_selection[caa1e5098b58bda5]::traits::query::dropck_outlives::dtorck_constraint_for_ty_inner + 24: 0x10f3123e0 - rustc_trait_selection[caa1e5098b58bda5]::traits::query::dropck_outlives::compute_dropck_outlives_inner + 25: 0x10f3a6c8c - ::enter_canonical_trait_query::, rustc_middle[c4367cd1cb8e0dc9]::traits::query::DropckOutlivesResult, rustc_traits[56979a00368fe7bc]::dropck_outlives::dropck_outlives::{closure#0}> + 26: 0x10f3b82dc - rustc_traits[56979a00368fe7bc]::dropck_outlives::dropck_outlives + 27: 0x10ed3c9bc - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 28: 0x10ee86488 - >)>>::call_once + 29: 0x10ec6d3b0 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, rustc_middle[c4367cd1cb8e0dc9]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 30: 0x10ee92f34 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::dropck_outlives::get_query_incr::__rust_end_short_backtrace + 31: 0x10f1eac08 - rustc_middle[c4367cd1cb8e0dc9]::query::plumbing::query_get_at::>, rustc_middle[c4367cd1cb8e0dc9]::query::erase::Erased<[u8; 8usize]>>> + 32: 0x10d616458 - ::fully_perform_into + 33: 0x10d53ca58 - as rustc_trait_selection[caa1e5098b58bda5]::traits::query::type_op::TypeOp>::fully_perform + 34: 0x10d5179b8 - ::add_drop_live_facts_for + 35: 0x10d516c64 - rustc_borrowck[288b2637815caa8b]::type_check::liveness::trace::trace + 36: 0x10d54e124 - rustc_borrowck[288b2637815caa8b]::type_check::liveness::generate + 37: 0x10d519240 - rustc_borrowck[288b2637815caa8b]::type_check::type_check + 38: 0x10d6a8d7c - rustc_borrowck[288b2637815caa8b]::nll::compute_regions + 39: 0x10d4f8fd0 - rustc_borrowck[288b2637815caa8b]::do_mir_borrowck + 40: 0x10d4f00a0 - rustc_borrowck[288b2637815caa8b]::mir_borrowck + 41: 0x10ed3bba0 - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 42: 0x10ed9b10c - >::call_once + 43: 0x10ecf77a8 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 44: 0x10eda1bc0 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::mir_borrowck::get_query_incr::__rust_end_short_backtrace + 45: 0x10d503140 - rustc_middle[c4367cd1cb8e0dc9]::query::plumbing::query_get_at::>> + 46: 0x10d51dbdc - ::prove_closure_bounds + 47: 0x10d521090 - ::check_rvalue + 48: 0x10d524464 - ::typeck_mir + 49: 0x10d518de0 - rustc_borrowck[288b2637815caa8b]::type_check::type_check + 50: 0x10d6a8d7c - rustc_borrowck[288b2637815caa8b]::nll::compute_regions + 51: 0x10d4f8fd0 - rustc_borrowck[288b2637815caa8b]::do_mir_borrowck + 52: 0x10d4f00a0 - rustc_borrowck[288b2637815caa8b]::mir_borrowck + 53: 0x10ed3bba0 - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 54: 0x10ed9b10c - >::call_once + 55: 0x10ecf77a8 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 56: 0x10eda1bc0 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::mir_borrowck::get_query_incr::__rust_end_short_backtrace + 57: 0x10ddc3fe8 - rustc_middle[c4367cd1cb8e0dc9]::query::plumbing::query_get_at::>> + 58: 0x10ddd6940 - rustc_hir_analysis[c19c0bfd1608da07]::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit + 59: 0x10ed3c75c - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 60: 0x10ee86304 - >::call_once + 61: 0x10ecb26e8 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 62: 0x10ee3e19c - rustc_query_impl[6ec06d95fa579ddc]::query_impl::type_of_opaque::get_query_incr::__rust_end_short_backtrace + 63: 0x10dd6ce20 - rustc_middle[c4367cd1cb8e0dc9]::query::plumbing::query_get_at::>> + 64: 0x10dd85a78 - rustc_hir_analysis[c19c0bfd1608da07]::collect::type_of::type_of + 65: 0x10ed41210 - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 66: 0x10ee8c62c - >::call_once + 67: 0x10ecb26e8 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 68: 0x10eec28b0 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::type_of::get_query_incr::__rust_end_short_backtrace + 69: 0x10e666314 - rustc_middle[c4367cd1cb8e0dc9]::query::plumbing::query_get_at::>> + 70: 0x10e653f94 - ::expand_opaque_ty + 71: 0x10e654080 - >::fold_ty + 72: 0x10e6542c8 - >::fold_ty + 73: 0x10e656cdc - rustc_middle[c4367cd1cb8e0dc9]::ty::util::fold_list:: as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with::{closure#0}> + 74: 0x10e5f4ed8 - >::try_super_fold_with:: + 75: 0x10e654060 - >::fold_ty + 76: 0x10e533fcc - <&rustc_middle[c4367cd1cb8e0dc9]::ty::list::List as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with:: + 77: 0x10e5f4f1c - >::try_super_fold_with:: + 78: 0x10e654060 - >::fold_ty + 79: 0x10e6542c8 - >::fold_ty + 80: 0x10e656cdc - rustc_middle[c4367cd1cb8e0dc9]::ty::util::fold_list:: as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with::{closure#0}> + 81: 0x10e5f4ed8 - >::try_super_fold_with:: + 82: 0x10e654060 - >::fold_ty + 83: 0x10e653fc4 - ::expand_opaque_ty + 84: 0x10e654080 - >::fold_ty + 85: 0x10e6542c8 - >::fold_ty + 86: 0x10e656cdc - rustc_middle[c4367cd1cb8e0dc9]::ty::util::fold_list:: as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with::{closure#0}> + 87: 0x10e5f4ed8 - >::try_super_fold_with:: + 88: 0x10e654060 - >::fold_ty + 89: 0x10e533fcc - <&rustc_middle[c4367cd1cb8e0dc9]::ty::list::List as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with:: + 90: 0x10e5f4e74 - >::try_super_fold_with:: + 91: 0x10e654060 - >::fold_ty + 92: 0x10e656cdc - rustc_middle[c4367cd1cb8e0dc9]::ty::util::fold_list:: as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with::{closure#0}> + 93: 0x10e5f4eb4 - >::try_super_fold_with:: + 94: 0x10e654060 - >::fold_ty + 95: 0x10e6542c8 - >::fold_ty + 96: 0x10e656cdc - rustc_middle[c4367cd1cb8e0dc9]::ty::util::fold_list:: as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with::{closure#0}> + 97: 0x10e5f4ed8 - >::try_super_fold_with:: + 98: 0x10e654060 - >::fold_ty + 99: 0x10e653fc4 - ::expand_opaque_ty + 100: 0x10e4ecf54 - ::try_expand_impl_trait_type + 101: 0x10dd7c34c - rustc_hir_analysis[c19c0bfd1608da07]::check::check::check_item_type + 102: 0x10dd829cc - rustc_hir_analysis[c19c0bfd1608da07]::check::check::check_mod_item_types + 103: 0x10ed3e92c - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 104: 0x10ef1cbf8 - >::call_once + 105: 0x10ec992d4 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 106: 0x10eec4cb0 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::check_mod_item_types::get_query_incr::__rust_end_short_backtrace + 107: 0x10de2e914 - ::for_each_module:: + 108: 0x10de00b04 - rustc_hir_analysis[c19c0bfd1608da07]::check_crate + 109: 0x10e289094 - rustc_interface[fd51d116160c92d2]::passes::analysis + 110: 0x10ed41238 - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 111: 0x10eec1f7c - >::call_once + 112: 0x10ec5aec4 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 113: 0x10ef079d8 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace + 114: 0x10db19124 - ::enter::> + 115: 0x10daab4f4 - ::enter::, rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>> + 116: 0x10db174dc - rustc_span[cc43194fc10ba92f]::set_source_map::, rustc_interface[fd51d116160c92d2]::interface::run_compiler, rustc_driver_impl[683555f6943f3d8]::run_compiler::{closure#1}>::{closure#0}::{closure#0}> + 117: 0x10db1fc5c - std[4d79feac4cea9cd0]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver_impl[683555f6943f3d8]::run_compiler::{closure#1}>::{closure#0}, core[e0b35f7eb9175e97]::result::Result<(), rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>>::{closure#0}, core[e0b35f7eb9175e97]::result::Result<(), rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[e0b35f7eb9175e97]::result::Result<(), rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>> + 118: 0x10db07854 - <::spawn_unchecked_, rustc_driver_impl[683555f6943f3d8]::run_compiler::{closure#1}>::{closure#0}, core[e0b35f7eb9175e97]::result::Result<(), rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>>::{closure#0}, core[e0b35f7eb9175e97]::result::Result<(), rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[e0b35f7eb9175e97]::result::Result<(), rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>>::{closure#1} as core[e0b35f7eb9175e97]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} + 119: 0x10472fea4 - std::sys::unix::thread::Thread::new::thread_start::hc8d37e25d4657683 + 120: 0x18c159034 - __pthread_joiner_wake + + +rustc version: 1.76.0-nightly (dd430bc8c 2023-11-14) +platform: aarch64-apple-darwin + +query stack during panic: +#0 [mir_coroutine_witnesses] coroutine witness types for `peer_connection::::manage_peer::{closure#0}::{closure#3}` +#1 [needs_drop_raw] computing whether `{coroutine witness@crates/librqbit/src/peer_connection.rs:202:22: 268:10}` needs drop +#2 [dropck_outlives] computing dropck types for `{async block@crates/librqbit/src/peer_connection.rs:202:22: 268:10}` +#3 [mir_borrowck] borrow-checking `peer_connection::::manage_peer::{closure#0}` +#4 [mir_borrowck] borrow-checking `peer_connection::::manage_peer` +#5 [type_of_opaque] computing type of opaque `peer_connection::::manage_peer::{opaque#0}` +#6 [type_of] computing type of `peer_connection::::manage_peer::{opaque#0}` +#7 [check_mod_item_types] checking item types in module `dht_utils` +#8 [analysis] running analysis passes on this crate +end of query stack diff --git a/rustc-ice-2023-11-17T23_37_51-9987.txt b/rustc-ice-2023-11-17T23_37_51-9987.txt new file mode 100644 index 0000000..e7f2c4a --- /dev/null +++ b/rustc-ice-2023-11-17T23_37_51-9987.txt @@ -0,0 +1,140 @@ +thread 'rustc' panicked at /rustc/dd430bc8c22f57992ec1457a87437d14283fdd65/compiler/rustc_errors/src/lib.rs:999:33: +Box +stack backtrace: + 0: 0x1026c3dac - std::backtrace::Backtrace::create::he1446a17ed3fb192 + 1: 0x10baeb134 - as core[e0b35f7eb9175e97]::ops::function::Fn<(&dyn for<'a, 'b> core[e0b35f7eb9175e97]::ops::function::Fn<(&'a core[e0b35f7eb9175e97]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[e0b35f7eb9175e97]::marker::Sync + core[e0b35f7eb9175e97]::marker::Send, &core[e0b35f7eb9175e97]::panic::panic_info::PanicInfo)>>::call + 2: 0x1026dbca8 - std::panicking::rust_panic_with_hook::h05bd262a58657294 + 3: 0x10c91fd4c - std[4d79feac4cea9cd0]::panicking::begin_panic::::{closure#0} + 4: 0x10c91e448 - std[4d79feac4cea9cd0]::sys_common::backtrace::__rust_end_short_backtrace::::{closure#0}, !> + 5: 0x10f90c854 - std[4d79feac4cea9cd0]::panicking::begin_panic:: + 6: 0x10c83bd68 - ::span_bug:: + 7: 0x10c83b92c - ::span_bug:: + 8: 0x10c901584 - rustc_middle[c4367cd1cb8e0dc9]::util::bug::opt_span_bug_fmt::::{closure#0} + 9: 0x10c9015b8 - rustc_middle[c4367cd1cb8e0dc9]::ty::context::tls::with_opt::::{closure#0}, !>::{closure#0} + 10: 0x10c8fea54 - rustc_middle[c4367cd1cb8e0dc9]::ty::context::tls::with_context_opt::::{closure#0}, !>::{closure#0}, !> + 11: 0x10f90d690 - rustc_middle[c4367cd1cb8e0dc9]::util::bug::span_bug_fmt:: + 12: 0x10c7efd78 - rustc_mir_transform[b0d987c76d7549be]::coroutine::mir_coroutine_witnesses + 13: 0x10ccf3d28 - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 14: 0x10ce3dc7c - >::call_once + 15: 0x10cc666e8 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 16: 0x10cc02e08 - rustc_query_system[865695b26f343ed8]::query::plumbing::force_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt> + 17: 0x10ccd0d98 - ::{closure#0} as core[e0b35f7eb9175e97]::ops::function::FnOnce<(rustc_middle[c4367cd1cb8e0dc9]::ty::context::TyCtxt, rustc_query_system[865695b26f343ed8]::dep_graph::dep_node::DepNode)>>::call_once + 18: 0x10cd7d434 - >::try_mark_previous_green:: + 19: 0x10cd7d20c - >::try_mark_green:: + 20: 0x10cc34abc - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::, rustc_middle[c4367cd1cb8e0dc9]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 21: 0x10ced69c4 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::needs_drop_raw::get_query_incr::__rust_end_short_backtrace + 22: 0x10d2bfd34 - ::needs_drop + 23: 0x10d2cd520 - rustc_trait_selection[caa1e5098b58bda5]::traits::query::dropck_outlives::dtorck_constraint_for_ty_inner + 24: 0x10d2c63e0 - rustc_trait_selection[caa1e5098b58bda5]::traits::query::dropck_outlives::compute_dropck_outlives_inner + 25: 0x10d35ac8c - ::enter_canonical_trait_query::, rustc_middle[c4367cd1cb8e0dc9]::traits::query::DropckOutlivesResult, rustc_traits[56979a00368fe7bc]::dropck_outlives::dropck_outlives::{closure#0}> + 26: 0x10d36c2dc - rustc_traits[56979a00368fe7bc]::dropck_outlives::dropck_outlives + 27: 0x10ccf09bc - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 28: 0x10ce3a488 - >)>>::call_once + 29: 0x10cc213b0 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, rustc_middle[c4367cd1cb8e0dc9]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 30: 0x10ce46f34 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::dropck_outlives::get_query_incr::__rust_end_short_backtrace + 31: 0x10d19ec08 - rustc_middle[c4367cd1cb8e0dc9]::query::plumbing::query_get_at::>, rustc_middle[c4367cd1cb8e0dc9]::query::erase::Erased<[u8; 8usize]>>> + 32: 0x10b5ca458 - ::fully_perform_into + 33: 0x10b4f0a58 - as rustc_trait_selection[caa1e5098b58bda5]::traits::query::type_op::TypeOp>::fully_perform + 34: 0x10b4cb9b8 - ::add_drop_live_facts_for + 35: 0x10b4cac64 - rustc_borrowck[288b2637815caa8b]::type_check::liveness::trace::trace + 36: 0x10b502124 - rustc_borrowck[288b2637815caa8b]::type_check::liveness::generate + 37: 0x10b4cd240 - rustc_borrowck[288b2637815caa8b]::type_check::type_check + 38: 0x10b65cd7c - rustc_borrowck[288b2637815caa8b]::nll::compute_regions + 39: 0x10b4acfd0 - rustc_borrowck[288b2637815caa8b]::do_mir_borrowck + 40: 0x10b4a40a0 - rustc_borrowck[288b2637815caa8b]::mir_borrowck + 41: 0x10ccefba0 - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 42: 0x10cd4f10c - >::call_once + 43: 0x10ccab7a8 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 44: 0x10cd55bc0 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::mir_borrowck::get_query_incr::__rust_end_short_backtrace + 45: 0x10b4b7140 - rustc_middle[c4367cd1cb8e0dc9]::query::plumbing::query_get_at::>> + 46: 0x10b4d1bdc - ::prove_closure_bounds + 47: 0x10b4d5090 - ::check_rvalue + 48: 0x10b4d8464 - ::typeck_mir + 49: 0x10b4ccde0 - rustc_borrowck[288b2637815caa8b]::type_check::type_check + 50: 0x10b65cd7c - rustc_borrowck[288b2637815caa8b]::nll::compute_regions + 51: 0x10b4acfd0 - rustc_borrowck[288b2637815caa8b]::do_mir_borrowck + 52: 0x10b4a40a0 - rustc_borrowck[288b2637815caa8b]::mir_borrowck + 53: 0x10ccefba0 - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 54: 0x10cd4f10c - >::call_once + 55: 0x10ccab7a8 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 56: 0x10cd55bc0 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::mir_borrowck::get_query_incr::__rust_end_short_backtrace + 57: 0x10bd77fe8 - rustc_middle[c4367cd1cb8e0dc9]::query::plumbing::query_get_at::>> + 58: 0x10bd8a940 - rustc_hir_analysis[c19c0bfd1608da07]::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit + 59: 0x10ccf075c - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 60: 0x10ce3a304 - >::call_once + 61: 0x10cc666e8 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 62: 0x10cdf219c - rustc_query_impl[6ec06d95fa579ddc]::query_impl::type_of_opaque::get_query_incr::__rust_end_short_backtrace + 63: 0x10bd20e20 - rustc_middle[c4367cd1cb8e0dc9]::query::plumbing::query_get_at::>> + 64: 0x10bd39a78 - rustc_hir_analysis[c19c0bfd1608da07]::collect::type_of::type_of + 65: 0x10ccf5210 - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 66: 0x10ce4062c - >::call_once + 67: 0x10cc666e8 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 68: 0x10ce768b0 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::type_of::get_query_incr::__rust_end_short_backtrace + 69: 0x10c61a314 - rustc_middle[c4367cd1cb8e0dc9]::query::plumbing::query_get_at::>> + 70: 0x10c607f94 - ::expand_opaque_ty + 71: 0x10c608080 - >::fold_ty + 72: 0x10c6082c8 - >::fold_ty + 73: 0x10c60acdc - rustc_middle[c4367cd1cb8e0dc9]::ty::util::fold_list:: as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with::{closure#0}> + 74: 0x10c5a8ed8 - >::try_super_fold_with:: + 75: 0x10c608060 - >::fold_ty + 76: 0x10c4e7fcc - <&rustc_middle[c4367cd1cb8e0dc9]::ty::list::List as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with:: + 77: 0x10c5a8f1c - >::try_super_fold_with:: + 78: 0x10c608060 - >::fold_ty + 79: 0x10c6082c8 - >::fold_ty + 80: 0x10c60acdc - rustc_middle[c4367cd1cb8e0dc9]::ty::util::fold_list:: as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with::{closure#0}> + 81: 0x10c5a8ed8 - >::try_super_fold_with:: + 82: 0x10c608060 - >::fold_ty + 83: 0x10c607fc4 - ::expand_opaque_ty + 84: 0x10c608080 - >::fold_ty + 85: 0x10c6082c8 - >::fold_ty + 86: 0x10c60acdc - rustc_middle[c4367cd1cb8e0dc9]::ty::util::fold_list:: as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with::{closure#0}> + 87: 0x10c5a8ed8 - >::try_super_fold_with:: + 88: 0x10c608060 - >::fold_ty + 89: 0x10c4e7fcc - <&rustc_middle[c4367cd1cb8e0dc9]::ty::list::List as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with:: + 90: 0x10c5a8e74 - >::try_super_fold_with:: + 91: 0x10c608060 - >::fold_ty + 92: 0x10c60acdc - rustc_middle[c4367cd1cb8e0dc9]::ty::util::fold_list:: as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with::{closure#0}> + 93: 0x10c5a8eb4 - >::try_super_fold_with:: + 94: 0x10c608060 - >::fold_ty + 95: 0x10c6082c8 - >::fold_ty + 96: 0x10c60acdc - rustc_middle[c4367cd1cb8e0dc9]::ty::util::fold_list:: as rustc_type_ir[9486e74e44844ae3]::fold::TypeFoldable>::try_fold_with::{closure#0}> + 97: 0x10c5a8ed8 - >::try_super_fold_with:: + 98: 0x10c608060 - >::fold_ty + 99: 0x10c607fc4 - ::expand_opaque_ty + 100: 0x10c4a0f54 - ::try_expand_impl_trait_type + 101: 0x10bd3034c - rustc_hir_analysis[c19c0bfd1608da07]::check::check::check_item_type + 102: 0x10bd369cc - rustc_hir_analysis[c19c0bfd1608da07]::check::check::check_mod_item_types + 103: 0x10ccf292c - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 104: 0x10ced0bf8 - >::call_once + 105: 0x10cc4d2d4 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 106: 0x10ce78cb0 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::check_mod_item_types::get_query_incr::__rust_end_short_backtrace + 107: 0x10bde2914 - ::for_each_module:: + 108: 0x10bdb4b04 - rustc_hir_analysis[c19c0bfd1608da07]::check_crate + 109: 0x10c23d094 - rustc_interface[fd51d116160c92d2]::passes::analysis + 110: 0x10ccf5238 - rustc_query_impl[6ec06d95fa579ddc]::plumbing::__rust_begin_short_backtrace::> + 111: 0x10ce75f7c - >::call_once + 112: 0x10cc0eec4 - rustc_query_system[865695b26f343ed8]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[6ec06d95fa579ddc]::plumbing::QueryCtxt, true> + 113: 0x10cebb9d8 - rustc_query_impl[6ec06d95fa579ddc]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace + 114: 0x10bacd124 - ::enter::> + 115: 0x10ba5f4f4 - ::enter::, rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>> + 116: 0x10bacb4dc - rustc_span[cc43194fc10ba92f]::set_source_map::, rustc_interface[fd51d116160c92d2]::interface::run_compiler, rustc_driver_impl[683555f6943f3d8]::run_compiler::{closure#1}>::{closure#0}::{closure#0}> + 117: 0x10bad3c5c - std[4d79feac4cea9cd0]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver_impl[683555f6943f3d8]::run_compiler::{closure#1}>::{closure#0}, core[e0b35f7eb9175e97]::result::Result<(), rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>>::{closure#0}, core[e0b35f7eb9175e97]::result::Result<(), rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[e0b35f7eb9175e97]::result::Result<(), rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>> + 118: 0x10babb854 - <::spawn_unchecked_, rustc_driver_impl[683555f6943f3d8]::run_compiler::{closure#1}>::{closure#0}, core[e0b35f7eb9175e97]::result::Result<(), rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>>::{closure#0}, core[e0b35f7eb9175e97]::result::Result<(), rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[e0b35f7eb9175e97]::result::Result<(), rustc_span[cc43194fc10ba92f]::ErrorGuaranteed>>::{closure#1} as core[e0b35f7eb9175e97]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} + 119: 0x1026e3ea4 - std::sys::unix::thread::Thread::new::thread_start::hc8d37e25d4657683 + 120: 0x18c159034 - __pthread_joiner_wake + + +rustc version: 1.76.0-nightly (dd430bc8c 2023-11-14) +platform: aarch64-apple-darwin + +query stack during panic: +#0 [mir_coroutine_witnesses] coroutine witness types for `peer_connection::::manage_peer::{closure#0}::{closure#3}` +#1 [needs_drop_raw] computing whether `{coroutine witness@crates/librqbit/src/peer_connection.rs:202:22: 268:10}` needs drop +#2 [dropck_outlives] computing dropck types for `{async block@crates/librqbit/src/peer_connection.rs:202:22: 268:10}` +#3 [mir_borrowck] borrow-checking `peer_connection::::manage_peer::{closure#0}` +#4 [mir_borrowck] borrow-checking `peer_connection::::manage_peer` +#5 [type_of_opaque] computing type of opaque `peer_connection::::manage_peer::{opaque#0}` +#6 [type_of] computing type of `peer_connection::::manage_peer::{opaque#0}` +#7 [check_mod_item_types] checking item types in module `dht_utils` +#8 [analysis] running analysis passes on this crate +end of query stack