From 48a14823fa3ebeb75a9739599b8106a79e95ebb8 Mon Sep 17 00:00:00 2001 From: Igor Katson Date: Sun, 19 Nov 2023 12:50:11 +0000 Subject: [PATCH] Changed log to tracing --- Cargo.lock | 186 +++++++++----- TODO.md | 3 + crates/dht/Cargo.toml | 3 +- crates/dht/src/dht.rs | 4 +- crates/dht/src/main.rs | 6 +- crates/dht/src/persistence.rs | 2 +- crates/dht/src/routing_table.rs | 2 +- crates/librqbit/Cargo.toml | 3 +- crates/librqbit/src/chunk_tracker.rs | 2 +- crates/librqbit/src/dht_utils.rs | 4 +- crates/librqbit/src/file_ops.rs | 2 +- crates/librqbit/src/http_api.rs | 4 +- crates/librqbit/src/lib.rs | 1 - crates/librqbit/src/peer_connection.rs | 32 +-- crates/librqbit/src/peer_handler.rs | 1 - crates/librqbit/src/peer_info_reader/mod.rs | 4 +- crates/librqbit/src/session.rs | 4 +- crates/librqbit/src/spawn_utils.rs | 20 +- crates/librqbit/src/torrent_manager.rs | 11 +- crates/librqbit/src/torrent_state.rs | 269 ++++++++++---------- crates/librqbit_core/Cargo.toml | 1 - crates/rqbit/Cargo.toml | 4 +- crates/rqbit/src/main.rs | 22 +- 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 ---------- 26 files changed, 321 insertions(+), 689 deletions(-) delete mode 100644 crates/librqbit/src/peer_handler.rs delete mode 100644 rustc-ice-2023-11-17T23_37_51-9985.txt delete mode 100644 rustc-ice-2023-11-17T23_37_51-9986.txt delete mode 100644 rustc-ice-2023-11-17T23_37_51-9987.txt diff --git a/Cargo.lock b/Cargo.lock index e1ed135..9d75cc8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -410,19 +410,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "env_logger" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" -dependencies = [ - "humantime", - "is-terminal", - "log", - "regex", - "termcolor", -] - [[package]] name = "equivalent" version = "1.0.1" @@ -689,12 +676,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - [[package]] name = "hyper" version = "0.14.27" @@ -781,17 +762,6 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" -[[package]] -name = "is-terminal" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi", - "rustix", - "windows-sys", -] - [[package]] name = "itertools" version = "0.12.0" @@ -860,10 +830,8 @@ dependencies = [ "librqbit-dht", "librqbit-peer-protocol", "librqbit-sha1-wrapper", - "log", "openssl", "parking_lot", - "pretty_env_logger", "rand", "regex", "reqwest", @@ -874,6 +842,7 @@ dependencies = [ "size_format", "tokio", "tokio-stream", + "tracing", "url", "urlencoding", "uuid", @@ -912,7 +881,6 @@ dependencies = [ "librqbit-bencode", "librqbit-buffers", "librqbit-clone-to-owned", - "log", "parking_lot", "serde", "url", @@ -931,14 +899,13 @@ dependencies = [ "librqbit-bencode", "librqbit-clone-to-owned", "librqbit-core", - "log", "parking_lot", - "pretty_env_logger", "rand", "serde", "serde_json", "tokio", "tokio-stream", + "tracing", ] [[package]] @@ -987,6 +954,15 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + [[package]] name = "matchit" version = "0.7.3" @@ -1043,6 +1019,16 @@ dependencies = [ "tempfile", ] +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num" version = "0.2.1" @@ -1195,6 +1181,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + [[package]] name = "parking_lot" version = "0.12.1" @@ -1279,16 +1271,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "pretty_env_logger" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "865724d4dbe39d9f3dd3b52b88d859d66bcb2d6a0acfd5ea68a65fb66d4bdc1c" -dependencies = [ - "env_logger", - "log", -] - [[package]] name = "proc-macro2" version = "1.0.69" @@ -1371,8 +1353,17 @@ checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-automata", - "regex-syntax", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", ] [[package]] @@ -1383,9 +1374,15 @@ checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.8.2", ] +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + [[package]] name = "regex-syntax" version = "0.8.2" @@ -1458,15 +1455,15 @@ dependencies = [ "futures", "librqbit", "librqbit-dht", - "log", "parse_duration", - "pretty_env_logger", "regex", "reqwest", "serde", "serde_json", "size_format", "tokio", + "tracing", + "tracing-subscriber", ] [[package]] @@ -1490,9 +1487,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.8" +version = "0.21.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" +checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" dependencies = [ "log", "ring", @@ -1643,6 +1640,15 @@ dependencies = [ "digest", ] +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + [[package]] name = "size_format" version = "1.0.2" @@ -1757,15 +1763,6 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "termcolor" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" -dependencies = [ - "winapi-util", -] - [[package]] name = "thiserror" version = "1.0.50" @@ -1786,6 +1783,16 @@ dependencies = [ "syn", ] +[[package]] +name = "thread_local" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if", + "once_cell", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -1911,9 +1918,21 @@ checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "log", "pin-project-lite", + "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "tracing-core" version = "0.1.32" @@ -1921,6 +1940,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", ] [[package]] @@ -1994,6 +2043,12 @@ dependencies = [ "getrandom", ] +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "vcpkg" version = "0.2.15" @@ -2119,15 +2174,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" diff --git a/TODO.md b/TODO.md index c6aafee..9e67d7c 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,9 @@ - [ ] 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 +- [ ] use some concurrent hashmap e.g. flurry or dashmap +- [x] tracing instead of logging. Debugging peers: RUST_LOG=[{peer=.*}]=debug + test-log for tests 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/dht/Cargo.toml b/crates/dht/Cargo.toml index c9ae8a7..5552dac 100644 --- a/crates/dht/Cargo.toml +++ b/crates/dht/Cargo.toml @@ -25,8 +25,7 @@ hex = "0.4" bencode = {path = "../bencode", default-features=false, package="librqbit-bencode", version="2.2.1"} anyhow = "1" parking_lot = "0.12" -log = "0.4" -pretty_env_logger = "0.5" +tracing = "0.1" futures = "0.3" rand = "0.8" indexmap = "2" diff --git a/crates/dht/src/dht.rs b/crates/dht/src/dht.rs index a1b23ba..970d78c 100644 --- a/crates/dht/src/dht.rs +++ b/crates/dht/src/dht.rs @@ -17,7 +17,6 @@ use bencode::ByteString; use futures::{stream::FuturesUnordered, Stream, StreamExt}; use indexmap::IndexSet; use librqbit_core::{id20::Id20, peer_id::generate_peer_id}; -use log::{debug, info, trace, warn}; use parking_lot::RwLock; use rand::Rng; use serde::Serialize; @@ -26,6 +25,7 @@ use tokio::{ sync::mpsc::{channel, unbounded_channel, Sender, UnboundedReceiver, UnboundedSender}, }; use tokio_stream::wrappers::{errors::BroadcastStreamRecvError, BroadcastStream}; +use tracing::{debug, info, trace, warn}; #[derive(Debug, Serialize)] pub struct DhtStats { @@ -449,7 +449,7 @@ async fn run_framer( Err(_) => break, } } - Err(e) => log::debug!("{}: error deserializing incoming message: {}", addr, e), + Err(e) => debug!("{}: error deserializing incoming message: {}", addr, e), } } Err::<(), _>(anyhow::anyhow!( diff --git a/crates/dht/src/main.rs b/crates/dht/src/main.rs index fc6f524..5c2f1e6 100644 --- a/crates/dht/src/main.rs +++ b/crates/dht/src/main.rs @@ -2,13 +2,11 @@ use std::{str::FromStr, time::Duration}; use anyhow::Context; use librqbit_dht::{Dht, Id20}; -use log::info; use tokio_stream::StreamExt; +use tracing::info; #[tokio::main] async fn main() -> anyhow::Result<()> { - pretty_env_logger::init(); - let info_hash = Id20::from_str("64a980abe6e448226bb930ba061592e44c3781a1").unwrap(); let dht = Dht::new().await.context("error initializing DHT")?; let mut stream = dht.get_peers(info_hash).await?; @@ -42,7 +40,7 @@ async fn main() -> anyhow::Result<()> { let peer_printer = async { while let Some(peer) = stream.next().await { - log::info!("peer found: {}", peer) + info!("peer found: {}", peer) } Ok(()) }; diff --git a/crates/dht/src/persistence.rs b/crates/dht/src/persistence.rs index affc981..d22ad6b 100644 --- a/crates/dht/src/persistence.rs +++ b/crates/dht/src/persistence.rs @@ -8,8 +8,8 @@ use std::path::{Path, PathBuf}; use std::time::Duration; use anyhow::Context; -use log::{debug, error, info, trace, warn}; use tokio::spawn; +use tracing::{debug, error, info, trace, warn}; use crate::dht::{Dht, DhtConfig}; use crate::routing_table::RoutingTable; diff --git a/crates/dht/src/routing_table.rs b/crates/dht/src/routing_table.rs index 89cd404..5118c81 100644 --- a/crates/dht/src/routing_table.rs +++ b/crates/dht/src/routing_table.rs @@ -4,8 +4,8 @@ use std::{ }; use librqbit_core::id20::Id20; -use log::debug; use serde::{ser::SerializeMap, Deserialize, Serialize}; +use tracing::debug; #[derive(Debug, Clone, Serialize, Deserialize)] enum BucketTreeNodeData { diff --git a/crates/librqbit/Cargo.toml b/crates/librqbit/Cargo.toml index 8ce32cc..e878704 100644 --- a/crates/librqbit/Cargo.toml +++ b/crates/librqbit/Cargo.toml @@ -43,7 +43,7 @@ byteorder = "1" bincode = "1" bitvec = "1" parking_lot = "0.12" -log = "0.4" +tracing = "0.1.40" size_format = "1" rand = "0.8" @@ -59,4 +59,3 @@ backoff = "0.4.0" [dev-dependencies] futures = {version = "0.3"} -pretty_env_logger = "0.5" diff --git a/crates/librqbit/src/chunk_tracker.rs b/crates/librqbit/src/chunk_tracker.rs index c013588..a0ea3bc 100644 --- a/crates/librqbit/src/chunk_tracker.rs +++ b/crates/librqbit/src/chunk_tracker.rs @@ -1,6 +1,6 @@ use librqbit_core::lengths::{ChunkInfo, Lengths, ValidPieceIndex}; -use log::{debug, info}; use peer_binary_protocol::Piece; +use tracing::{debug, info}; use crate::type_aliases::BF; diff --git a/crates/librqbit/src/dht_utils.rs b/crates/librqbit/src/dht_utils.rs index 56fd46e..2c9f3fc 100644 --- a/crates/librqbit/src/dht_utils.rs +++ b/crates/librqbit/src/dht_utils.rs @@ -4,7 +4,7 @@ use anyhow::Context; use buffers::ByteString; use futures::{stream::FuturesUnordered, Stream, StreamExt}; use librqbit_core::torrent_metainfo::TorrentMetaV1Info; -use log::debug; +use tracing::debug; use crate::{ peer_connection::PeerConnectionOptions, peer_info_reader, spawn_utils::BlockingSpawner, @@ -97,7 +97,7 @@ mod tests { fn init_logging() { #[allow(unused_must_use)] LOG_INIT.call_once(|| { - pretty_env_logger::try_init(); + // pretty_env_logger::try_init(); }) } diff --git a/crates/librqbit/src/file_ops.rs b/crates/librqbit/src/file_ops.rs index a635fe2..32e2bb3 100644 --- a/crates/librqbit/src/file_ops.rs +++ b/crates/librqbit/src/file_ops.rs @@ -11,7 +11,7 @@ use librqbit_core::{ lengths::{ChunkInfo, Lengths, ValidPieceIndex}, torrent_metainfo::{FileIteratorName, TorrentMetaV1Info}, }; -use log::{debug, trace, warn}; +use tracing::{debug, trace, warn}; use parking_lot::Mutex; use peer_binary_protocol::Piece; use sha1w::ISha1; diff --git a/crates/librqbit/src/http_api.rs b/crates/librqbit/src/http_api.rs index 93deadf..2ce53f5 100644 --- a/crates/librqbit/src/http_api.rs +++ b/crates/librqbit/src/http_api.rs @@ -7,7 +7,7 @@ use dht::{Dht, DhtStats}; use http::StatusCode; use librqbit_core::id20::Id20; use librqbit_core::torrent_metainfo::TorrentMetaV1Info; -use log::warn; +use tracing::{warn, info}; use parking_lot::RwLock; use serde::{Deserialize, Serialize}; use std::net::SocketAddr; @@ -110,7 +110,7 @@ impl HttpApi { .route("/torrents/:id/stats", get(torrent_stats)) .with_state(state); - log::info!("starting HTTP server on {}", addr); + info!("starting HTTP server on {}", addr); axum::Server::try_bind(&addr) .with_context(|| format!("error binding to {addr}"))? .serve(app.into_make_service()) diff --git a/crates/librqbit/src/lib.rs b/crates/librqbit/src/lib.rs index ecf4ef1..097d45e 100644 --- a/crates/librqbit/src/lib.rs +++ b/crates/librqbit/src/lib.rs @@ -5,7 +5,6 @@ pub mod http_api; pub mod http_api_client; mod http_api_error; pub mod peer_connection; -pub mod peer_handler; pub mod peer_info_reader; pub mod peer_state; pub mod session; diff --git a/crates/librqbit/src/peer_connection.rs b/crates/librqbit/src/peer_connection.rs index 68771e9..0814a9f 100644 --- a/crates/librqbit/src/peer_connection.rs +++ b/crates/librqbit/src/peer_connection.rs @@ -4,13 +4,13 @@ use anyhow::Context; use buffers::{ByteBuf, ByteString}; use clone_to_owned::CloneToOwned; use librqbit_core::{id20::Id20, lengths::ChunkInfo, peer_id::try_decode_peer_id}; -use log::{debug, trace}; use peer_binary_protocol::{ extended::{handshake::ExtendedHandshake, ExtendedMessage}, serialize_piece_preamble, Handshake, Message, MessageBorrowed, MessageDeserializeError, MessageOwned, PIECE_MESSAGE_DEFAULT_LEN, }; use tokio::time::timeout; +use tracing::{debug, trace}; use crate::spawn_utils::BlockingSpawner; @@ -57,10 +57,10 @@ async fn with_timeout( where E: Into, { - timeout(timeout_value, fut) - .await - .with_context(|| format!("timeout at {timeout_value:?}"))? - .map_err(|e| e.into()) + match timeout(timeout_value, fut).await { + Ok(v) => v.map_err(Into::into), + Err(_) => anyhow::bail!("timeout at {timeout_value:?}"), + } } macro_rules! read_one { @@ -149,11 +149,7 @@ impl PeerConnection { let (h, size) = Handshake::deserialize(&read_buf[..read_so_far]) .map_err(|e| anyhow::anyhow!("error deserializing handshake: {:?}", e))?; - debug!( - "connected peer {}: {:?}", - self.addr, - try_decode_peer_id(Id20(h.peer_id)) - ); + debug!("connected: id={:?}", try_decode_peer_id(Id20(h.peer_id))); if h.info_hash != self.info_hash.0 { anyhow::bail!("info hash does not match"); } @@ -170,11 +166,7 @@ impl PeerConnection { if supports_extended { let my_extended = Message::Extended(ExtendedMessage::Handshake(ExtendedHandshake::new())); - trace!( - "sending extended handshake to {}: {:?}", - self.addr, - &my_extended - ); + trace!("sending extended handshake: {:?}", &my_extended); my_extended.serialize(&mut write_buf, None).unwrap(); with_timeout(rwtimeout, conn.write_all(&write_buf)) .await @@ -184,7 +176,7 @@ impl PeerConnection { let (extended, size) = read_one!(conn, read_buf, read_so_far, rwtimeout); match extended { Message::Extended(ExtendedMessage::Handshake(h)) => { - trace!("received from {}: {:?}", self.addr, &h); + trace!("received: {:?}", &h); self.handler.on_extended_handshake(&h)?; extended_handshake = Some(h.clone_to_owned()) } @@ -213,7 +205,7 @@ impl PeerConnection { with_timeout(rwtimeout, write_half.write_all(&write_buf[..len])) .await .context("error writing bitfield to peer")?; - debug!("sent bitfield to {}", self.addr); + debug!("sent bitfield"); } } @@ -253,7 +245,7 @@ impl PeerConnection { } }; - debug!("sending to {}: {:?}, length={}", self.addr, &req, len); + debug!("sending: {:?}, length={}", &req, len); with_timeout(rwtimeout, write_half.write_all(&write_buf[..len])) .await @@ -273,7 +265,7 @@ impl PeerConnection { let reader = async move { loop { let (message, size) = read_one!(read_half, read_buf, read_so_far, rwtimeout); - trace!("received from {}: {:?}", self.addr, &message); + trace!("received: {:?}", &message); self.handler .on_received_message(message) @@ -294,7 +286,7 @@ impl PeerConnection { r = reader => {r} r = writer => {r} }; - debug!("{}: either reader or writer are done, exiting", self.addr); + debug!("either reader or writer are done, exiting"); r } } diff --git a/crates/librqbit/src/peer_handler.rs b/crates/librqbit/src/peer_handler.rs deleted file mode 100644 index 8b13789..0000000 --- a/crates/librqbit/src/peer_handler.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/crates/librqbit/src/peer_info_reader/mod.rs b/crates/librqbit/src/peer_info_reader/mod.rs index 927958a..fca366c 100644 --- a/crates/librqbit/src/peer_info_reader/mod.rs +++ b/crates/librqbit/src/peer_info_reader/mod.rs @@ -8,7 +8,6 @@ use librqbit_core::{ lengths::{ceil_div_u64, last_element_size_u64, ChunkInfo}, torrent_metainfo::TorrentMetaV1Info, }; -use log::debug; use parking_lot::{Mutex, RwLock}; use peer_binary_protocol::{ extended::{handshake::ExtendedHandshake, ut_metadata::UtMetadata, ExtendedMessage}, @@ -16,6 +15,7 @@ use peer_binary_protocol::{ }; use sha1w::{ISha1, Sha1}; use tokio::sync::mpsc::UnboundedSender; +use tracing::debug; use crate::{ peer_connection::{ @@ -238,7 +238,7 @@ mod tests { fn init_logging() { #[allow(unused_must_use)] LOG_INIT.call_once(|| { - pretty_env_logger::try_init(); + // pretty_env_logger::try_init(); }) } diff --git a/crates/librqbit/src/session.rs b/crates/librqbit/src/session.rs index 0723003..6bc881b 100644 --- a/crates/librqbit/src/session.rs +++ b/crates/librqbit/src/session.rs @@ -8,10 +8,10 @@ use librqbit_core::{ peer_id::generate_peer_id, torrent_metainfo::{torrent_from_bytes, TorrentMetaV1Info, TorrentMetaV1Owned}, }; -use log::{debug, info, warn}; use parking_lot::RwLock; use reqwest::Url; use tokio_stream::StreamExt; +use tracing::{debug, info, span, warn, Level}; use crate::{ dht_utils::{read_metainfo_from_peer_receiver, ReadMetainfoResult}, @@ -402,7 +402,7 @@ impl Session { } if let Some(mut dht_peer_rx) = dht_peer_rx { - spawn("DHT peer adder", { + spawn(span!(Level::INFO, "dht_peer_adder"), { let handle = handle.clone(); async move { while let Some(peer) = dht_peer_rx.next().await { diff --git a/crates/librqbit/src/spawn_utils.rs b/crates/librqbit/src/spawn_utils.rs index 8a52fae..04b109b 100644 --- a/crates/librqbit/src/spawn_utils.rs +++ b/crates/librqbit/src/spawn_utils.rs @@ -1,22 +1,22 @@ -use std::fmt::Display; +use tracing::{debug, error, trace, Instrument}; -use log::{debug, error}; - -pub fn spawn( - name: N, +pub fn spawn( + span: tracing::Span, fut: impl std::future::Future> + Send + 'static, ) { - debug!("starting task \"{}\"", &name); - tokio::spawn(async move { + let fut = async move { + trace!("started"); match fut.await { Ok(_) => { - debug!("task \"{}\" finished", &name); + debug!("finished"); } Err(e) => { - error!("error in task \"{}\": {:#}", &name, e) + error!("{:#}", e) } } - }); + } + .instrument(span.or_current()); + tokio::spawn(fut); } #[derive(Clone, Copy, Debug)] diff --git a/crates/librqbit/src/torrent_manager.rs b/crates/librqbit/src/torrent_manager.rs index d3826e8..943c755 100644 --- a/crates/librqbit/src/torrent_manager.rs +++ b/crates/librqbit/src/torrent_manager.rs @@ -14,11 +14,11 @@ use librqbit_core::{ id20::Id20, lengths::Lengths, peer_id::generate_peer_id, speed_estimator::SpeedEstimator, torrent_metainfo::TorrentMetaV1Info, }; -use log::{debug, info, warn}; use parking_lot::Mutex; use reqwest::Url; use sha1w::Sha1; use size_format::SizeFormatterBinary as SF; +use tracing::{debug, info, span, warn, Level}; use crate::{ chunk_tracker::ChunkTracker, @@ -116,9 +116,10 @@ impl TorrentManagerHandle { pub fn add_tracker(&self, url: Url) -> bool { let mgr = self.manager.clone(); if mgr.trackers.lock().insert(url.clone()) { - spawn(format!("tracker monitor {url}"), async move { - mgr.single_tracker_monitor(url).await - }); + spawn( + span!(Level::ERROR, "tracker_monitor", url = url.to_string()), + async move { mgr.single_tracker_monitor(url).await }, + ); true } else { false @@ -289,7 +290,7 @@ impl TorrentManager { options, }); - spawn("speed estimator updater", { + spawn(span!(Level::ERROR, "speed_estimator_updater"), { let state = mgr.state.clone(); async move { loop { diff --git a/crates/librqbit/src/torrent_state.rs b/crates/librqbit/src/torrent_state.rs index 79885ac..e948692 100644 --- a/crates/librqbit/src/torrent_state.rs +++ b/crates/librqbit/src/torrent_state.rs @@ -23,7 +23,6 @@ use librqbit_core::{ lengths::{ChunkInfo, Lengths, ValidPieceIndex}, torrent_metainfo::TorrentMetaV1Info, }; -use log::{debug, info, trace, warn}; use parking_lot::{Mutex, RwLock, RwLockReadGuard}; use peer_binary_protocol::{ extended::handshake::ExtendedHandshake, Handshake, Message, MessageOwned, Piece, Request, @@ -37,6 +36,7 @@ use tokio::{ }, time::timeout, }; +use tracing::{debug, info, span, trace, warn, Level}; use crate::{ chunk_tracker::{ChunkMarkingResult, ChunkTracker}, @@ -311,7 +311,7 @@ impl TorrentState { peer_queue_tx, finished_notify: Notify::new(), }); - spawn("peer adder", { + spawn(span!(Level::ERROR, "peer_adder"), { let state = state.clone(); async move { loop { @@ -319,47 +319,50 @@ impl TorrentState { let permit = state.peer_semaphore.acquire().await.unwrap(); permit.forget(); - spawn(format!("manage_peer({addr})"), { - let state = state.clone(); - async move { - let rx = state.locked.write().peers.mark_peer_connecting(addr)?; + spawn( + span!(parent: None, Level::ERROR, "manage_peer", peer = addr.to_string()), + { + let state = state.clone(); + async move { + let rx = state.locked.write().peers.mark_peer_connecting(addr)?; - let handler = PeerHandler { - addr, - state: state.clone(), - spawner, - }; - let options = PeerConnectionOptions { - connect_timeout: state.options.peer_connect_timeout, - read_write_timeout: state.options.peer_read_write_timeout, - ..Default::default() - }; - let peer_connection = PeerConnection::new( - addr, - state.info_hash, - state.peer_id, - handler, - Some(options), - spawner, - ); + let handler = PeerHandler { + addr, + state: state.clone(), + spawner, + }; + let options = PeerConnectionOptions { + connect_timeout: state.options.peer_connect_timeout, + read_write_timeout: state.options.peer_read_write_timeout, + ..Default::default() + }; + let peer_connection = PeerConnection::new( + addr, + state.info_hash, + state.peer_id, + handler, + Some(options), + spawner, + ); - let res = peer_connection.manage_peer(rx).await; - let state = peer_connection.into_handler().state; - state.peer_semaphore.add_permits(1); + let res = peer_connection.manage_peer(rx).await; + let state = peer_connection.into_handler().state; + state.peer_semaphore.add_permits(1); - match res { - // We disconnected the peer ourselves as we don't need it - Ok(()) => { - state.on_peer_died(addr, None); - } - Err(e) => { - debug!("error managing peer {}: {:#}", addr, e); - state.on_peer_died(addr, Some(e)); + match res { + // We disconnected the peer ourselves as we don't need it + Ok(()) => { + state.on_peer_died(addr, None); + } + Err(e) => { + debug!("error managing peer: {:#}", e); + state.on_peer_died(addr, Some(e)); + } } + Ok::<_, anyhow::Error>(()) } - Ok::<_, anyhow::Error>(()) - } - }); + }, + ); } } }); @@ -406,7 +409,7 @@ impl TorrentState { fn reserve_next_needed_piece(&self, peer_handle: PeerHandle) -> Option { if self.am_i_choked(peer_handle)? { - debug!("we are choked by {}, can't reserve next piece", peer_handle); + debug!("we are choked, can't reserve next piece"); return None; } let mut g = self.locked.write(); @@ -459,8 +462,8 @@ impl TorrentState { // heuristic for "too slow peer" if elapsed > avg_time * 10 { debug!( - "{} will steal piece {} from {}: elapsed time {:?}, avg piece time: {:?}", - handle, idx, piece_req.peer, elapsed, avg_time + "will steal piece {} from {}: elapsed time {:?}, avg piece time: {:?}", + idx, piece_req.peer, elapsed, avg_time ); piece_req.peer = handle; piece_req.started = Instant::now(); @@ -487,7 +490,7 @@ impl TorrentState { let peer = match g.peers.states.get_mut(&handle) { Some(peer) => peer, None => { - warn!("peer {} was in a wrong state", handle); + warn!("peer was in a wrong state, can't set live"); return; } }; @@ -499,6 +502,11 @@ impl TorrentState { match g.peers.mark_peer_dead(handle) { Some(Some(live)) => { for req in live.inflight_requests { + debug!( + "peer dead, marking chunk request cancelled, index={}, chunk={}", + req.piece.get(), + req.chunk + ); g.chunks.mark_chunk_request_cancelled(req.piece, req.chunk); } } @@ -509,41 +517,54 @@ impl TorrentState { } if error.is_none() { + debug!("peer died without errors, not re-queueing"); return; } - let backoff = g - .peers - .states - .get_mut(&handle) - .unwrap() - .stats - .backoff - .next_backoff(); + let backoff = { + let peer = match g.peers.states.get_mut(&handle) { + Some(p) => p, + None => { + warn!("bug: did not find peer in the list"); + return; + } + }; + + peer.stats.backoff.next_backoff() + }; if let Some(dur) = backoff { let state = self.clone(); - spawn(format!("wait_for_peer({handle}, {dur:?})"), async move { - tokio::time::sleep(dur).await; - { - let mut g = state.locked.write(); - let peer = match g.peers.states.get_mut(&handle) { - Some(p) => p, - None => bail!("bug: peer {} disappeared", handle), - }; - match &peer.state { - PeerState::Dead => peer.state = PeerState::Queued, - other => bail!( - "peer {} in unexpected state: {}. Expected dead", - handle, - other.name() - ), + spawn( + span!( + parent: None, + Level::ERROR, + "wait_for_peer", + peer = handle.to_string(), + duration = format!("{dur:?}") + ), + async move { + tokio::time::sleep(dur).await; + { + let mut g = state.locked.write(); + let peer = match g.peers.states.get_mut(&handle) { + Some(p) => p, + None => bail!("bug: peer disappeared"), + }; + match &peer.state { + PeerState::Dead => peer.state = PeerState::Queued, + other => bail!( + "peer is in unexpected state: {}. Expected dead", + other.name() + ), + } } - } - state.peer_queue_tx.send(handle)?; - Ok::<_, anyhow::Error>(()) - }); + state.peer_queue_tx.send(handle)?; + Ok::<_, anyhow::Error>(()) + }, + ); } else { + debug!("dropping peer, backoff exhausted"); g.peers.drop_peer(handle); } } @@ -602,7 +623,12 @@ impl TorrentState { let mut unordered: FuturesUnordered<_> = futures.into_iter().collect(); spawn( - format!("transmit_haves(piece={}, count={})", index, unordered.len()), + span!( + Level::ERROR, + "transmit_haves", + piece = index.get(), + count = unordered.len() + ), async move { while unordered.next().await.is_some() {} Ok(()) @@ -668,30 +694,27 @@ impl PeerConnectionHandler for PeerHandler { match message { Message::Request(request) => { self.on_download_request(self.addr, request) - .with_context(|| { - format!("error handling download request from {}", self.addr) - })?; + .context("on_download_request")?; } - Message::Bitfield(b) => self.on_bitfield(self.addr, b.clone_to_owned())?, + Message::Bitfield(b) => self + .on_bitfield(self.addr, b.clone_to_owned()) + .context("on_bitfield")?, Message::Choke => self.on_i_am_choked(self.addr), Message::Unchoke => self.on_i_am_unchoked(self.addr), Message::Interested => self.on_peer_interested(self.addr), Message::Piece(piece) => { self.on_received_piece(self.addr, piece) - .context("error in on_received_piece()")?; + .context("on_received_piece")?; } Message::KeepAlive => { - debug!("keepalive received from {}", self.addr); + debug!("keepalive received"); } Message::Have(h) => self.on_have(self.addr, h), Message::NotInterested => { info!("received \"not interested\", but we don't care yet") } message => { - warn!( - "{}: received unsupported message {:?}, ignoring", - self.addr, message - ); + warn!("received unsupported message {:?}, ignoring", message); } } Ok(()) @@ -705,7 +728,7 @@ impl PeerConnectionHandler for PeerHandler { let g = self.state.locked.read(); let msg = Message::Bitfield(ByteBuf(g.chunks.get_have_pieces().as_raw_slice())); let len = msg.serialize(buf, None).unwrap(); - debug!("sending to {}: {:?}, length={}", self.addr, &msg, len); + debug!("sending: {:?}, length={}", &msg, len); Some(len) } @@ -736,8 +759,8 @@ impl PeerHandler { Some(p) => p, None => { anyhow::bail!( - "{}: received {:?}, but it is not a valid chunk request (piece index is invalid). Ignoring.", - peer_handle, request + "received {:?}, but it is not a valid chunk request (piece index is invalid). Ignoring.", + request ); } }; @@ -749,8 +772,8 @@ impl PeerHandler { Some(d) => d, None => { anyhow::bail!( - "{}: received {:?}, but it is not a valid chunk request (chunk data is invalid). Ignoring.", - peer_handle, request + "received {:?}, but it is not a valid chunk request (chunk data is invalid). Ignoring.", + request ); } }; @@ -764,19 +787,16 @@ impl PeerHandler { ); } - g.peers.clone_tx(peer_handle).ok_or_else(|| { - anyhow::anyhow!( - "peer {} died, dropping chunk that it requested", - peer_handle - ) - })? + g.peers + .clone_tx(peer_handle) + .context("peer died, dropping chunk that it requested")? }; // TODO: this is not super efficient as it does copying multiple times. // Theoretically, this could be done in the sending code, so that it reads straight into // the send buffer. let request = WriterRequest::ReadChunkRequest(chunk_info); - debug!("sending to {}: {:?}", peer_handle, &request); + debug!("sending {:?}", &request); Ok::<_, anyhow::Error>(tx.send(request)?) } @@ -789,7 +809,7 @@ impl PeerHandler { .get_live_mut(handle) .and_then(|l| l.bitfield.as_mut()) { - debug!("{}: updated bitfield with have={}", handle, have); + debug!("updated bitfield with have={}", have); bitfield.set(have as usize, true) } } @@ -797,8 +817,7 @@ impl PeerHandler { fn on_bitfield(&self, handle: PeerHandle, bitfield: ByteString) -> anyhow::Result<()> { if bitfield.len() != self.state.lengths.piece_bitfield_bytes() { anyhow::bail!( - "dropping {} as its bitfield has unexpected size. Got {}, expected {}", - handle, + "dropping peer as its bitfield has unexpected size. Got {}, expected {}", bitfield.len(), self.state.lengths.piece_bitfield_bytes(), ); @@ -816,7 +835,7 @@ impl PeerHandler { .read() .peers .clone_tx(handle) - .ok_or_else(|| anyhow::anyhow!("peer closed"))?; + .context("peer dropped")?; tx.send(WriterRequest::Message(MessageOwned::Unchoke)) .context("peer dropped")?; tx.send(WriterRequest::Message(MessageOwned::NotInterested)) @@ -826,7 +845,11 @@ impl PeerHandler { // Additional spawn per peer, not good. spawn( - format!("peer_chunk_requester({handle})"), + span!( + Level::ERROR, + "peer_chunk_requester", + peer = handle.to_string() + ), self.clone().task_peer_chunk_requester(handle), ); Ok(()) @@ -846,7 +869,7 @@ impl PeerHandler { } fn on_i_am_choked(&self, handle: PeerHandle) { - debug!("we are choked by {}", handle); + debug!("we are choked"); self.state .locked .write() @@ -855,7 +878,7 @@ impl PeerHandler { } fn on_peer_interested(&self, handle: PeerHandle) { - debug!("peer {} is interested", handle); + debug!("peer is interested"); self.state .locked .write() @@ -878,7 +901,7 @@ impl PeerHandler { loop { match self.state.am_i_choked(handle) { Some(true) => { - debug!("we are choked by {}, can't reserve next piece", handle); + debug!("we are choked, can't reserve next piece"); #[allow(unused_must_use)] { timeout(Duration::from_secs(60), notify.notified()).await; @@ -895,15 +918,15 @@ impl PeerHandler { Some(next) => next, None => { if self.state.get_left_to_download() == 0 { - debug!("{}: nothing left to download, closing requester", handle); + debug!("nothing left to download, closing requester"); return Ok(()); } if let Some(piece) = self.state.try_steal_piece(handle) { - debug!("{}: stole a piece {}", handle, piece); + debug!("stole a piece {}", piece); piece } else { - debug!("no pieces to request from {}", handle); + debug!("no pieces to request"); #[allow(unused_must_use)] { timeout(Duration::from_secs(60), notify.notified()).await; @@ -935,10 +958,7 @@ impl PeerHandler { .inflight_requests .insert(InflightRequest::from(&chunk)) { - warn!( - "{}: probably a bug, we already requested {:?}", - handle, chunk - ); + warn!("probably a bug, we already requested {:?}", chunk); continue; } @@ -985,7 +1005,7 @@ impl PeerHandler { } fn on_i_am_unchoked(&self, handle: PeerHandle) { - debug!("we are unchoked by {}", handle); + debug!("we are unchoked"); let mut g = self.state.locked.write(); let live = match g.peers.get_live_mut(handle) { Some(live) => live, @@ -1004,11 +1024,7 @@ impl PeerHandler { ) { Some(i) => i, None => { - anyhow::bail!( - "peer {} sent us a piece that is invalid {:?}", - handle, - &piece, - ); + anyhow::bail!("peer sent us an invalid piece {:?}", &piece,); } }; @@ -1026,16 +1042,15 @@ impl PeerHandler { .remove(&InflightRequest::from(&chunk_info)) { anyhow::bail!( - "peer {} sent us a piece that we did not ask it for. Requested pieces: {:?}. Got: {:?}", handle, &h.inflight_requests, &piece, + "peer sent us a piece we did not ask. Requested pieces: {:?}. Got: {:?}", + &h.inflight_requests, + &piece, ); } let full_piece_download_time = match g.chunks.mark_chunk_downloaded(&piece) { Some(ChunkMarkingResult::Completed) => { - debug!( - "piece={} done by {}, will write and checksum", - piece.index, handle - ); + debug!("piece={} done, will write and checksum", piece.index,); // This will prevent others from stealing it. g.peers .remove_inflight_piece(chunk_info.piece_index) @@ -1043,17 +1058,13 @@ impl PeerHandler { } Some(ChunkMarkingResult::PreviouslyCompleted) => { // TODO: we might need to send cancellations here. - debug!( - "piece={} was done by someone else {}, ignoring", - piece.index, handle - ); + debug!("piece={} was done by someone else, ignoring", piece.index,); return Ok(()); } Some(ChunkMarkingResult::NotCompleted) => None, None => { anyhow::bail!( - "bogus data received from {}: {:?}, cannot map this to a chunk, dropping peer", - handle, + "bogus data received: {:?}, cannot map this to a chunk, dropping peer", piece ); } @@ -1116,10 +1127,7 @@ impl PeerHandler { g.peers.reset_peer_backoff(handle); } - debug!( - "piece={} successfully downloaded and verified from {}", - index, handle - ); + debug!("piece={} successfully downloaded and verified", index); if self.state.get_left_to_download() == 0 { self.state.finished_notify.notify_waiters(); @@ -1130,10 +1138,7 @@ impl PeerHandler { self.state.maybe_transmit_haves(chunk_info.piece_index); } false => { - warn!( - "checksum for piece={} did not validate, came from {}", - index, handle - ); + warn!("checksum for piece={} did not validate", index,); self.state .locked .write() diff --git a/crates/librqbit_core/Cargo.toml b/crates/librqbit_core/Cargo.toml index 92139c6..d3f0965 100644 --- a/crates/librqbit_core/Cargo.toml +++ b/crates/librqbit_core/Cargo.toml @@ -21,7 +21,6 @@ hex = "0.4" anyhow = "1" url = "2" uuid = {version = "1", features = ["v4"]} -log = "0.4" parking_lot = "0.12" serde = {version = "1", features=["derive"]} buffers = {path="../buffers", package="librqbit-buffers", version = "2.2.1"} diff --git a/crates/rqbit/Cargo.toml b/crates/rqbit/Cargo.toml index ec8c310..f4f58c9 100644 --- a/crates/rqbit/Cargo.toml +++ b/crates/rqbit/Cargo.toml @@ -25,8 +25,8 @@ dht = {path="../dht", package="librqbit-dht", version="2.2.2"} tokio = {version = "1", features = ["macros", "rt-multi-thread"]} anyhow = "1" clap = {version = "4", features = ["derive", "deprecated"]} -log = "0.4" -pretty_env_logger = "0.5" +tracing = "0.1" +tracing-subscriber = {version = "0.3", features = ["env-filter"]} regex = "1" futures = "0.3" parse_duration = "2" diff --git a/crates/rqbit/src/main.rs b/crates/rqbit/src/main.rs index 344af16..f6c2aa1 100644 --- a/crates/rqbit/src/main.rs +++ b/crates/rqbit/src/main.rs @@ -12,8 +12,8 @@ use librqbit::{ }, spawn_utils::{spawn, BlockingSpawner}, }; -use log::{error, info, warn}; use size_format::SizeFormatterBinary as SF; +use tracing::{error, info, span, warn, Level}; #[derive(Debug, Clone, Copy, ValueEnum)] enum LogLevel { @@ -151,7 +151,13 @@ fn init_logging(opts: &Opts) { } }; } - pretty_env_logger::init(); + + use tracing_subscriber::{fmt, prelude::*, EnvFilter}; + + tracing_subscriber::registry() + .with(fmt::layer()) + .with(EnvFilter::from_default_env()) + .init(); } fn main() -> anyhow::Result<()> { @@ -258,7 +264,10 @@ async fn async_main(opts: Opts, spawner: BlockingSpawner) -> anyhow::Result<()> .await .context("error initializing rqbit session")?, ); - spawn("Stats printer", stats_printer(session.clone())); + spawn( + span!(Level::TRACE, "stats_printer"), + stats_printer(session.clone()), + ); let http_api = HttpApi::new(session); let http_api_listen_addr = opts.http_api_listen_addr; http_api @@ -331,11 +340,14 @@ async fn async_main(opts: Opts, spawner: BlockingSpawner) -> anyhow::Result<()> .await .context("error initializing rqbit session")?, ); - spawn("Stats printer", stats_printer(session.clone())); + spawn( + span!(Level::TRACE, "stats_printer"), + stats_printer(session.clone()), + ); let http_api = HttpApi::new(session.clone()); let http_api_listen_addr = opts.http_api_listen_addr; spawn( - "HTTP API", + span!(Level::ERROR, "http_api"), http_api.clone().make_http_api_and_run(http_api_listen_addr), ); diff --git a/rustc-ice-2023-11-17T23_37_51-9985.txt b/rustc-ice-2023-11-17T23_37_51-9985.txt deleted file mode 100644 index 7b5092d..0000000 --- a/rustc-ice-2023-11-17T23_37_51-9985.txt +++ /dev/null @@ -1,140 +0,0 @@ -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 deleted file mode 100644 index 74a21c8..0000000 --- a/rustc-ice-2023-11-17T23_37_51-9986.txt +++ /dev/null @@ -1,140 +0,0 @@ -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 deleted file mode 100644 index e7f2c4a..0000000 --- a/rustc-ice-2023-11-17T23_37_51-9987.txt +++ /dev/null @@ -1,140 +0,0 @@ -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