Skip to content

Panic in op_state_manager during connectivity test shutdown #2042

@sanity

Description

@sanity

Summary

While running the three-node connectivity test, the runtime repeatedly logs a panic as the nodes are shutting down:

thread 'tokio-runtime-worker' panicked at crates/core/src/node/op_state_manager.rs:408:128:
called `Result::unwrap()` on an `Err` value: SendError { .. }

This occurs on feat/event-log-aggregator without any local patches, so it predates the mesh fix in PR #2041.

Steps to Reproduce

  1. Checkout feat/event-log-aggregator.
  2. Run cargo test --test connectivity test_three_node_network_connectivity -- --nocapture.
  3. Watch the test output as the nodes tear down; the panic appears after the success summary.

Expected Behavior

All runtime threads should exit cleanly without unwinding after the test completes.

Actual Behavior

Multiple tokio-runtime-worker threads panic in op_state_manager.rs when SendError is unwrapped during shutdown. The test still reports success, but the panic pollutes logs and masks genuine failures.

Environment

  • Branch: feat/event-log-aggregator
  • Command: cargo test --test connectivity test_three_node_network_connectivity -- --nocapture
  • Toolchain: nightly per workspace metadata

Additional Context

This surfaced while fixing #2039 (PR #2041) and appears in both the base branch and the patched branch. The panic is likely tied to teardown ordering in OpStateManager—a defensive if let Err(e) path would prevent the panic, but a deeper look is warranted to ensure we’re not dropping inflight work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-networkingArea: Networking, ring protocol, peer discoveryP-mediumMedium priorityT-bugType: Something is broken

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions