Skip to content

bug: netwatch::netmon::bsd: AF_ROUTE: failed to parse rib: MessageTooShort #3449

@jeromegn

Description

@jeromegn

Describe the bug
It's unclear to me what caused this exactly, but I think it happened when my laptop went to sleep and possibly lost networking?

iroh appeared defunct after this and restarting the program fixed it.

There were panics during that time, but I have long since lost the logs.

Relevant Logs

WARN netwatch::netmon::bsd: AF_ROUTE: failed to parse rib: MessageTooShort { backtrace: Some(   0: backtrace::backtrace::libunwind::trace
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/backtrace-0.3.75/src/backtrace/libunwind.rs:117:9
      backtrace::backtrace::trace_unsynchronized
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/backtrace-0.3.75/src/backtrace/mod.rs:66:14
   1: backtrace::backtrace::trace
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/backtrace-0.3.75/src/backtrace/mod.rs:53:14
   2: backtrace::capture::Backtrace::create
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/backtrace-0.3.75/src/capture.rs:294:9
   3: backtrace::capture::Backtrace::new
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/backtrace-0.3.75/src/capture.rs:259:22
   4: snafu::backtrace_impl::<impl snafu::GenerateImplicitData for backtrace::capture::Backtrace>::generate
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/snafu-0.8.8/src/backtrace_impl_backtrace_crate.rs:5:9
   5: <core::option::Option<backtrace::capture::Backtrace> as snafu::GenerateImplicitData>::generate
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/snafu-0.8.8/src/lib.rs:1394:18
   6: netwatch::interfaces::bsd::MessageTooShortSnafu::build
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/netwatch-0.8.0/src/interfaces/bsd.rs:605:17
   7: netwatch::interfaces::bsd::MessageTooShortSnafu::fail
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/netwatch-0.8.0/src/interfaces/bsd.rs:605:17
   8: netwatch::interfaces::bsd::parse_addrs
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/netwatch-0.8.0/src/interfaces/bsd.rs:771:21
   9: netwatch::interfaces::bsd::WireFormat::parse
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/netwatch-0.8.0/src/interfaces/bsd.rs:386:29
  10: netwatch::interfaces::bsd::parse_rib
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/netwatch-0.8.0/src/interfaces/bsd.rs:470:27
  11: netwatch::netmon::bsd::RouteMonitor::new::{{closure}}
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/netwatch-0.8.0/src/netmon/bsd.rs:51:31
  12: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/task/core.rs:365:24
  13: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/loom/std/unsafe_cell.rs:16:9
      tokio::runtime::task::core::Core<T,S>::poll
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/task/core.rs:354:30
  14: tokio::runtime::task::harness::poll_future::{{closure}}
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/task/harness.rs:535:30
  15: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /Users/jerome/.rustup/toolchains/1.89.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9
  16: std::panicking::catch_unwind::do_call
             at /Users/jerome/.rustup/toolchains/1.89.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:589:40
  17: ___rust_try
  18: std::panicking::catch_unwind
             at /Users/jerome/.rustup/toolchains/1.89.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:552:19
      std::panic::catch_unwind
             at /Users/jerome/.rustup/toolchains/1.89.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:359:14
  19: tokio::runtime::task::harness::poll_future
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/task/harness.rs:523:18
  20: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/task/harness.rs:210:27
  21: tokio::runtime::task::harness::Harness<T,S>::poll
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/task/harness.rs:155:20
  22: tokio::runtime::task::raw::poll
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/task/raw.rs:325:13
  23: tokio::runtime::task::raw::RawTask::poll
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/task/raw.rs:255:18
  24: tokio::runtime::task::LocalNotified<S>::run
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/task/mod.rs:509:13
  25: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/scheduler/current_thread/mod.rs:789:30
  26: tokio::task::coop::with_budget
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/task/coop/mod.rs:167:5
      tokio::task::coop::budget
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/task/coop/mod.rs:133:5
      tokio::runtime::scheduler::current_thread::Context::run_task::{{closure}}
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/scheduler/current_thread/mod.rs:368:43
  27: tokio::runtime::scheduler::current_thread::Context::enter
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/scheduler/current_thread/mod.rs:432:19
  28: tokio::runtime::scheduler::current_thread::Context::run_task
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/scheduler/current_thread/mod.rs:368:28
  29: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/scheduler/current_thread/mod.rs:785:43
  30: tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/scheduler/current_thread/mod.rs:829:68
  31: tokio::runtime::context::scoped::Scoped<T>::set
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/context/scoped.rs:40:9
  32: tokio::runtime::context::set_scheduler::{{closure}}
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/context.rs:176:38
  33: std::thread::local::LocalKey<T>::try_with
             at /Users/jerome/.rustup/toolchains/1.89.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:315:12
  34: std::thread::local::LocalKey<T>::with
             at /Users/jerome/.rustup/toolchains/1.89.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:279:20
  35: tokio::runtime::context::set_scheduler
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/context.rs:176:17
  36: tokio::runtime::scheduler::current_thread::CoreGuard::enter
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/scheduler/current_thread/mod.rs:829:27
  37: tokio::runtime::scheduler::current_thread::CoreGuard::block_on
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/scheduler/current_thread/mod.rs:729:24
  38: tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/scheduler/current_thread/mod.rs:200:33
  39: tokio::runtime::context::runtime::enter_runtime
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/context/runtime.rs:65:16
  40: tokio::runtime::scheduler::current_thread::CurrentThread::block_on
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/scheduler/current_thread/mod.rs:188:9
  41: tokio::runtime::runtime::Runtime::block_on_inner
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/runtime.rs:356:52
  42: tokio::runtime::runtime::Runtime::block_on
             at /Users/jerome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/runtime.rs:328:18
  43: sprites::main
             at /Users/jerome/src/github.com/superfly/sprites/sprites-rs/src/main.rs:326:7
  44: core::ops::function::FnOnce::call_once
             at /Users/jerome/.rustup/toolchains/1.89.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
  45: std::sys::backtrace::__rust_begin_short_backtrace
             at /Users/jerome/.rustup/toolchains/1.89.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs:152:18
  46: std::rt::lang_start::{{closure}}
             at /Users/jerome/.rustup/toolchains/1.89.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs:206:18
  47: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/core/src/ops/function.rs:284:21
      std::panicking::catch_unwind::do_call
             at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/std/src/panicking.rs:589:40
      std::panicking::catch_unwind
             at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/std/src/panicking.rs:552:19
      std::panic::catch_unwind
             at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/std/src/panic.rs:359:14
      std::rt::lang_start_internal::{{closure}}
             at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/std/src/rt.rs:175:24
      std::panicking::catch_unwind::do_call
             at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/std/src/panicking.rs:589:40
      std::panicking::catch_unwind
             at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/std/src/panicking.rs:552:19
      std::panic::catch_unwind
             at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/std/src/panic.rs:359:14
      std::rt::lang_start_internal
             at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/std/src/rt.rs:171:5
  48: std::rt::lang_start
             at /Users/jerome/.rustup/toolchains/1.89.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs:205:5
  49: _main
) }

Expected behavior
iroh's networking should recover

Platform(s)
Desktop:

  • OS: macOS
  • Version: Sonoma 14.7.8

Additional Context

iroh v0.91.2
├── iroh-gossip v0.91.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions