oxidecomputer / oxidecomputer/hubris

Sidecar sequencer is using panic for control flow

Open
#1,868 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
3.6k
Forks
239
Avg merge
1d 12h
Merged PRs (30d)
23

Description

In debugging an unrelated issue, we noticed some Sidecar sequencer panics.

It turns out, the sidecar sequencer contains a lot of deliberate panics as a very expensive way of performing a loop. We have better tools for this that don't take the system down for a dump and distract engineers:

  • A loop (which is what I would strongly recommend)
  • The Jefe::restart_me operation is how you do a deliberate restart without a dump.

Contributor guide

Open the contributing guide

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

Start by locating the Sidecar sequencer and reviewing the deliberate panic sites described in the issue. Compare each control-flow use with the suggested loop approach, and use Jefe::restart_me where a deliberate restart is required. Done means the sequencer no longer uses panics for control flow and preserves the intended restart behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
embedded-iot
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 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.