diff --git a/.github/workflows/netsim.yml b/.github/workflows/netsim.yml index 47924c52833..159db21cd56 100644 --- a/.github/workflows/netsim.yml +++ b/.github/workflows/netsim.yml @@ -120,7 +120,7 @@ jobs: cd ../chuck/netsim sudo kill -9 $(pgrep ovs) || true sudo mn --clean || true - export RUST_LOG=debug,iroh_net=warn + export RUST_LOG=debug,iroh_net=warn,iroh::node=trace c='${{ steps.detect_comment_config.outputs.NETSIM_CONFIG }}' if [ -z "${c}" ]; then diff --git a/iroh/src/node.rs b/iroh/src/node.rs index 2563d1ab796..8a1136eaac7 100644 --- a/iroh/src/node.rs +++ b/iroh/src/node.rs @@ -265,14 +265,17 @@ impl NodeInner { }); loop { + trace!("wait for tick"); tokio::select! { biased; _ = self.cancel_token.cancelled() => { + trace!("tick: cancel"); break; }, // handle rpc requests. This will do nothing if rpc is not configured, since // accept is just a pending future. request = external_rpc.accept() => { + trace!("tick: external_rpc"); match request { Ok((msg, chan)) => { rpc::Handler::spawn_rpc_request(self.clone(), &mut join_set, msg, chan); @@ -284,6 +287,7 @@ impl NodeInner { }, // handle internal rpc requests. request = internal_rpc.accept() => { + trace!("tick: internal_rpc"); match request { Ok((msg, chan)) => { rpc::Handler::spawn_rpc_request(self.clone(), &mut join_set, msg, chan); @@ -295,6 +299,7 @@ impl NodeInner { }, // handle incoming p2p connections. Some(connecting) = self.endpoint.accept() => { + trace!("tick: endpoint.accept"); let protocols = protocols.clone(); join_set.spawn(async move { handle_connection(connecting, protocols).await; @@ -303,12 +308,16 @@ impl NodeInner { }, // handle task terminations and quit on panics. res = join_set.join_next(), if !join_set.is_empty() => { + trace!("tick: join_set.join_next"); if let Some(Err(err)) = res { error!("Task failed: {err:?}"); break; } }, - else => break, + else => { + trace!("tick: else, break"); + break; + } } }