oxidecomputer / oxidecomputer/falcon

catch link names that are too long earlier

Open
#48 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
20
Forks
5
Avg merge
11d 13h
Merged PRs (30d)
2

Description

There is a limit of 32 characters for link names. We find this out the hard way currently.

ry@masaka:~/scratch/softnpu-uart-issue$ RUST_BACKTRACE=1 pfexec ./target/debug/softnpu-uart-issue launc
thread 'main' panicked at /home/ry/.cargo/git/checkouts/netadm-sys-25ac2db9b1b244c6/59e69ef/libnet/src/link.rs:485:9:
index out of bounds: the len is 32 but the index is 32
stack backtrace:
Nov 25 19:53:35.632 INFO creating links
   0: rust_begin_unwind
             at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5
   1: core::panicking::panic_fmt
             at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14
   2: core::panicking::panic_bounds_check
             at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:162:5
   3: libnet::link::linkname_to_id
             at /home/ry/.cargo/git/checkouts/netadm-sys-25ac2db9b1b244c6/59e69ef/libnet/src/link.rs:485:9
   4: libnet::linkname_to_id
             at /home/ry/.cargo/git/checkouts/netadm-sys-25ac2db9b1b244c6/59e69ef/libnet/src/lib.rs:226:5
   5: libnet::LinkHandle::id
             at /home/ry/.cargo/git/checkouts/netadm-sys-25ac2db9b1b244c6/59e69ef/libnet/src/lib.rs:198:39
   6: libnet::delete_link
             at /home/ry/.cargo/git/checkouts/netadm-sys-25ac2db9b1b244c6/59e69ef/libnet/src/lib.rs:318:20
   7: libfalcon::Link::create::{{closure}}
             at /home/ry/.cargo/git/checkouts/falcon-c754111a71d466df/9de4129/lib/src/lib.rs:1009:17
   8: libfalcon::libnet_retry
             at /home/ry/.cargo/git/checkouts/falcon-c754111a71d466df/9de4129/lib/src/lib.rs:1230:12
   9: libfalcon::Link::create
             at /home/ry/.cargo/git/checkouts/falcon-c754111a71d466df/9de4129/lib/src/lib.rs:1008:13
  10: libfalcon::Runner::net_launch::{{closure}}
             at /home/ry/.cargo/git/checkouts/falcon-c754111a71d466df/9de4129/lib/src/lib.rs:472:13
  11: libfalcon::Runner::do_launch::{{closure}}
             at /home/ry/.cargo/git/checkouts/falcon-c754111a71d466df/9de4129/lib/src/lib.rs:484:27
  12: libfalcon::Runner::launch::{{closure}}
             at /home/ry/.cargo/git/checkouts/falcon-c754111a71d466df/9de4129/lib/src/lib.rs:435:32
  13: libfalcon::cli::launch::{{closure}}
             at /home/ry/.cargo/git/checkouts/falcon-c754111a71d466df/9de4129/lib/src/cli.rs:310:32
  14: libfalcon::cli::run::{{closure}}
             at /home/ry/.cargo/git/checkouts/falcon-c754111a71d466df/9de4129/lib/src/cli.rs:182:23
  15: softnpu_uart_issue::main::{{closure}}
             at ./src/main.rs:15:17
  16: tokio::runtime::park::CachedParkThread::block_on::{{closure}}
             at /home/ry/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.34.0/src/runtime/park.rs:282:63
  17: tokio::runtime::coop::with_budget
             at /home/ry/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.34.0/src/runtime/coop.rs:107:5
  18: tokio::runtime::coop::budget
             at /home/ry/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.34.0/src/runtime/coop.rs:73:5
  19: tokio::runtime::park::CachedParkThread::block_on
             at /home/ry/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.34.0/src/runtime/park.rs:282:31
  20: tokio::runtime::context::blocking::BlockingRegionGuard::block_on
             at /home/ry/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.34.0/src/runtime/context/blocking.rs:66:9
  21: tokio::runtime::scheduler::multi_thread::MultiThread::block_on::{{closure}}
             at /home/ry/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.34.0/src/runtime/scheduler/multi_thread/mod.rs:87:13
  22: tokio::runtime::context::runtime::enter_runtime
             at /home/ry/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.34.0/src/runtime/context/runtime.rs:65:16
  23: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
             at /home/ry/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.34.0/src/runtime/scheduler/multi_thread/mod.rs:86:9
  24: tokio::runtime::runtime::Runtime::block_on
             at /home/ry/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.34.0/src/runtime/runtime.rs:350:45
  25: softnpu_uart_issue::main
             at ./src/main.rs:17:5
  26: core::ops::function::FnOnce::call_once
             at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the panic with the documented softnpu-uart-issue launch command and inspect libnet/src/link.rs around linkname_to_id line 485, then trace the caller through libfalcon's Link::create at lib/src/lib.rs:1008. Done means a link name exceeding the 32-character limit is caught before the current index-out-of-bounds panic; add or update a regression test if the repository provides one.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.