Skip to content

Conversation

@hawkw
Copy link
Member

@hawkw hawkw commented Dec 24, 2025

tokio::task::JoinSet::join_next_with_id can return a JoinError if a task has panicked or if a task sapwned on the JoinSet was aborted through its AbortHandle...which the trust-quorum ConnectionManager will do when disconnecting a client connection:

if let Some(handle) = self.connecting.remove2(&addr) {
// The connection has not yet completed its handshake
info!(
self.log,
"Deleting initiating connection";
"remote_addr" => %addr
);
handle.abort();
None
} else if let Some(handle) = self.established.remove3(&addr) {
info!(
self.log,
"Deleting established connection";
"peer_addr" => %addr,
"peer_id" => %handle.baseboard_id
);
handle.abort();
Some(handle)
} else {
None
}

This is a normal operation and probably deserves to be logged at a less verbose level than Warn, and the log line which suggests both cancelled and panicked JoinErrors are panics is incorrect. This is a potential red herring while debugging, so I've changed it to be more accurate.

`tokio::task::JoinSet::join_next_with_id` can return a `JoinError` if a
task has panicked _or_ if a task sapwned on the `JoinSet` was aborted
through its `AbortHandle`...which the trust-quorum `ConnectionManager`
will do when disconnecting a client connection:
https://github.com/oxidecomputer/omicron/blob/e00aabaee707ae1fab7203d72c0243f8dacf5403/trust-quorum/src/connection_manager.rs#L866-L886

This is a normal operation and probably deserves to be logged at a less
verbose level than `Warn`, and the log line which suggests both
cancelled _and_ panicked `JoinError`s are panics is incorrect. This is a
potential red herring while debugging, so I've changed it to be more
accurate.
@hawkw hawkw requested a review from andrewjstone December 24, 2025 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants