Skip to content

Rework host commands - #710

Merged
jamesmunns merged 3 commits into
masterfrom
james/host-retool
Jul 9, 2026
Merged

Rework host commands#710
jamesmunns merged 3 commits into
masterfrom
james/host-retool

Conversation

@jamesmunns

Copy link
Copy Markdown
Contributor

This aims to support oxidecomputer/hubris#2518, but also remedy oxidecomputer/hubris#2586.

@jamesmunns
jamesmunns requested review from cbiffle and labbott July 2, 2026 17:42
Comment thread cmd/host/src/lib.rs
Comment on lines +388 to +394
// Work through the different places "last panic" info could be hiding
let sources: [fn(&HubrisArchive, &mut dyn Core) -> _; _] = [
host_last_panic_packrat,
host_last_panic_spcomms_old,
|h, c| host_last_panic_spcomms_new(h, c, HOST_STATE_BUF_NAME_1),
|h, c| host_last_panic_spcomms_new(h, c, HOST_STATE_BUF_NAME_2),
];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this in order of newest to oldest?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old code did basically:

  • host_last_panic_spcomms_old
  • host_last_panic_spcomms_new(h, c, HOST_STATE_BUF_NAME_1)

I made the executive decision to try packrat first, then the new-new spcomms last. Open to re-order this, it shouldn't be order dependent.

Comment thread cmd/host/src/lib.rs Outdated
Comment on lines +255 to +258
fn host_boot_fail_packrat(
hubris: &HubrisArchive,
core: &mut dyn Core,
) -> Result<Option<Vec<u8>>> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I keep wishing this could share more code with host_last_panic but I think they are just enough different that would be annoying

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can take a swing at it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in bf0ecf2

@labbott labbott left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. As a follow on it would be good to grab a dump with a panic/boot error in the new format and have that in CI.

(I don't remember when I started doing it but I pruned a bunch of very very old hubris cores that were adding complexity. Adding more cores that are actually in use would be good to do!)

@jamesmunns
jamesmunns merged commit 46cdc7f into master Jul 9, 2026
13 checks passed
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