bug(vm-driver): VM sandbox cold start stalls ~5 s repeatedly on "Waiting for VM supervisor"
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
まず crates/openshell-driver-vm/runtime/pins.env を確認し、VMランタイムがlibkrunをどのようにピン留めしているか確認してください。upstreamで発生した接続拒否の修正を含むリリースにピンを更新し、報告された再現手順でVMサンドボックスを作成します。完了とは、ランタイムが修正済みリリースを使用し、VMスーパーバイザの待機中に約5秒間サンドボックス作成が停止しない状態を指します。
索引モデルが issue の本文から書いたものです。
説明
Note: I have observed the behaviour, but due to lacking Rust knowledge and the codebase in general I have instructed Claude Opus 5.5 to use the skills in this repo and analyze for potential cause of the 5s wait. "Analysis by Claude" is added where the statements are from Claude, and I have verified the parts I am able to (commit references etc).
User Story
I use OpenShell for running ephemeral sandboxes. I directly encountered repeatedly a 5 second wait on "Waiting for VM supervisor". I need sandboxes to become ready without this wait, so that they start faster and the task can be done quicker.
⠐ Starting sandbox... Waiting for VM supervisor (0s)
⠐ Starting sandbox... Waiting for VM supervisor (5s)
Problem Statement
Analysis by Claude:
VM sandbox startup can stall for about 5 seconds while the host waits to reach the guest over the boundary control connection.
The VM driver maps its boundary control port with krun_add_vsock_port2(..., listen=true). libkrun accepts the host-side Unix socket connection immediately, before anything in the guest listens on that port. In libkrun v1.19.4 and earlier, when the guest refuses that connection, libkrun keeps the host socket open until its reaper reclaims it 5 s later. connect_boundary_with_retry in openshell-sandbox-backend therefore blocks for that window instead of retrying every 25 ms.
Upstream fixed this in libkrun/libkrun@d2d8dd6 ("virtio/vsock: remove refused connections without waiting for the reaper"), first released in v1.19.5 (upstream issue containers/libkrun#684). OpenShell pins libkrun v1.19.4 in crates/openshell-driver-vm/runtime/pins.env.
Impact / Why This Matters
Analysis by Claude:
Every VM sandbox whose host-side probe reaches the control socket before the guest is listening pays up to ~5 s of extra startup time. The delay dominates cold start for short-lived sandboxes. There is no workaround in OpenShell configuration. Upstream measured time to first round trip after VM start at 5338 ms before the fix and 415 ms after, with a blocking probe.
Acceptance Criteria
- The VM driver runtime is built with a libkrun release that contains libkrun/libkrun@d2d8dd6. (1.19.5 or 1.19.6 atm)
- VM sandbox creation no longer includes a ~5 s stall
Reproduction Steps
openshell sandbox create --name sandbox
Created sandbox: sandbox
✓ Sandbox allocated (0s)
✓ Image pulled (512 MB) (0s)
⠤ Starting sandbox... Waiting for VM supervisor (5s)
Suggested UX (if applicable)
No response
Environment
- OpenShell: openshell 0.1.2
- OS: macOS 26.6.2 (Apple silicon)
- OpenShell deployment mode and runtime: local gateway, VM compute driver (libkrun v1.19.4)
Logs
Created sandbox: sandbox
✓ Sandbox allocated (0s)
✓ Image pulled (512 MB) (0s)
⠤ Starting sandbox... Waiting for VM supervisor (5s)
- 主要言語
- Rust
- スター
- 13.2k
- フォーク
- 1.6k
- 平均マージ
- 1日 20時間
- マージ済み PR(30日)
- 348
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/OpenShell のほかの issue
-
docs: document workspace and provider label capabilities対応中かも @johntmyers が 1 日前に担当しました。 オープンarea:docs
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NVIDIA/OpenShell#4250 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Sandbox-side proposal audit (CONFIG:PROPOSED and /wait decisions) names only the first endpoint対応中かも @ericcurtin が今日担当しました。 オープンstate:accepted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug(driver-mxc): test helper fails to compile after gateway-name argument対応中かも @feloy が 2 日前に担当しました。 オープンstate:triage-needed
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
bug: install.sh ignores XDG_CONFIG_HOME for the local gateway config対応中かも @fede-kamel が 6 日前に担当しました。 オープンarea:cli os:linux os:macos state:validated
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NVIDIA/OpenShell#4042 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
state:triage-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NVIDIA/OpenShell#3995 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
NVIDIA/OpenShell の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
bmander/geomsolver#118 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Three Windows builds are keyed on a later release than their layout対応中かも @ero-qt が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
priority:P3 type:docs
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
sebastian-software/ferroni#253 ·
メンテナーはふだん 1 日以内に返信