oxidecomputer / oxidecomputer/propolis

Propolis panics with requests for VMs with small amounts of guest memory

Open
#109 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
270
Forks
42
Avg merge
4d 5h
Merged PRs (30d)
6

Description

I've been running some experiments using the new Oxide CLI, mostly to test behaviors in Nexus. At some point, I got lazy and started creating requests with small amounts of guest memory. If one requests a VM with 1MiB of memory, Propolis panics. Below is the server's log file:

bnaecker@feldspar : ~/omicron $ pfexec tail -f $(pfexec svcs -z oxz_propolis-server_1254f5f1-7ed6-449f-8ab3-b1ee3a006c6d -L propolis-server)
Mar 30 17:23:12.283 INFO Starting server...
Mar 30 17:23:12.454 INFO accepted connection, remote_addr: 192.168.1.145:62667, local_addr: 192.168.1.216:12400
Mar 30 17:23:12.454 INFO request completed, error_message_external: Internal Server Error, error_message_internal: Server not initialized (no instance), response_code: 500, uri: /instances/00000000-0000-0000-0000-000000000000, method: GET, req_id: a47f8763-7025-48f8-9322-72436d3d0462, remote_addr: 192.168.1.145:62667, local_addr: 192.168.1.216:12400
thread 'tokio-runtime-worker' panicked at 'assertion failed: lowmem >= MEM_BASE', propolis/src/hw/bhyve/rtc.rs:49:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

It seems like Propolis should provide some minimal amount of verification of the requested guest memory sizes, and return a 400-level error where those expectations are violated. Currently, this returns a 500, with no further details. I have in fact never seen any error other than a 500 from Propolis server, which makes sense I think looking at how the client handles errors.

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

Start by tracing guest-memory request handling to the assertion in propolis/src/hw/bhyve/rtc.rs:49 and review client/src/lib.rs for current error handling. Define the minimum valid guest-memory size and ensure requests below it return a 400-level response instead of causing a panic and 500 error.】【。} 񟿿.runner? Wait invalid accidental. Need no malformed. final redo.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
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.