bug: Kill aborts cleanup when OCI spec omits network namespace
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- go, linux
調査の方向性
unikontainers パッケージから始めて、Kill()、joinSandboxNetNs()、findNS() の場所を特定し、既存の回帰テスト TestKill_MissingNetworkNamespace を確認します。ネットワーク namespace が存在しない場合にどのように Kill() へ到達するかを追跡し、vmm.Stop() と network.CleanupAllUruncTaps() を含むクリーンアップ経路を検証します。完了の条件は、ネットワーク namespace のない有効な OCI 仕様でも必要なクリーンアップに到達し、一方で本当に致命的な namespace エラーは区別可能なままであることです。
索引モデルが issue の本文から書いたものです。
説明
Description
Kill() aborts before reaching the VMM and network cleanup when the OCI specification does not contain a network namespace.
When linux.namespaces omits specs.NetworkNamespace, findNS() returns:
namespace network was not found
This error propagates through joinSandboxNetNs() to Kill(), which returns immediately instead of continuing with the VMM and network cleanup.
This means the cleanup path is skipped for this OCI configuration.
System info
- urunc version/commit:
b752cf9 - Architecture:
amd64 - OS: Linux
- Go:
1.26.4 - VMM: Not exercised in the reproduction environment
- Unikernel: Not exercised in the reproduction environment
Steps to reproduce
- Create an OCI specification whose
linux.namespacescontains namespaces such aspid,ipc,uts, andmount, but omits thenetworknamespace. - Construct a
Unikontainerusing this OCI specification. - Invoke
Unikontainer.Kill(). - Observe the returned error and whether the cleanup functions are reached.
A minimal regression-style test reproduces the behavior:
=== RUN TestKill_MissingNetworkNamespace
--- PASS: TestKill_MissingNetworkNamespace (0.00s)
PASS
ok github.com/urunc-dev/urunc/pkg/unikontainers 0.003s
The test verifies that Kill() returns:
failed to join sandbox netns: namespace network was not found
and that the VMM stop function is not invoked.
Actual behavior
Kill() returns:
failed to join sandbox netns: namespace network was not found
before reaching the subsequent cleanup operations.
The relevant control flow is:
Kill()
-> joinSandboxNetNs()
-> findNS(..., specs.NetworkNamespace)
-> namespace network was not found
-> return error
Therefore the subsequent cleanup calls are not reached:
vmm.Stop(u.State.Pid)
network.CleanupAllUruncTaps()
The reproduction confirms:
Kill() return value: error
VMM.Stop() called: NO
Network cleanup called: NO
Expected behavior
If an OCI specification legitimately omits the network namespace, Kill() should still perform the required process/VMM cleanup instead of aborting before cleanup.
At minimum, absence of the namespace should not prevent the termination/cleanup path from being executed.
Root cause
findNS() returns an error when the requested namespace type is absent from the OCI namespace list:
namespace network was not found
joinSandboxNetNs() does not distinguish between an intentionally absent network namespace and other namespace lookup failures, so the error propagates to Kill().
Kill() then returns immediately and does not reach the VMM/network cleanup operations.
Testing
A temporary regression-style test was used to verify the behavior.
The test does not claim to demonstrate an actual orphaned QEMU/Firecracker process because a complete VMM/container lifecycle could not be exercised in the available environment.
The confirmed behavior is that Kill() returns before vmm.Stop() and network.CleanupAllUruncTaps() are invoked.
Relevance to robustness testing
This is an OCI edge case that can be exercised by structured testing/fuzzing by mutating the namespace configuration.
A robustness test suite should verify that lifecycle operations such as Kill() continue to perform required cleanup across valid and edge-case OCI configurations.
Possible fix direction
Investigate handling an absent network namespace separately from an invalid/unusable namespace.
The fix should avoid relying on matching an error string and should preserve genuinely fatal namespace errors.
A regression test should verify that a Unikontainer without a network namespace does not abort the cleanup path.
Related issues
I searched the existing urunc issues and pull requests for:
KillNetworkNamespacenetwork namespacejoinSandboxNetNsnamespace was not found- cleanup
Issue #240 is related to Kill() cleanup behavior but covers a different failure mode and does not address the missing network namespace case.
- 主要言語
- Go
- スター
- 308
- フォーク
- 222
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 42
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
urunc-dev/urunc のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 2 日以内に返信
-
Containers handed over to runc cannot be started, killed or deleted when urunc runs without --root再び着手できるかも @Daksha1611 が 16 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
urunc-dev/urunc#1127 · コメント 4 件 ·
メンテナーはふだん 2 日以内に返信
-
urunc-deploy cleanup never labels the node, so the cleanup DaemonSet does not run対応中かも @Sarthak-Shreshtha01 が 18 日前に担当しました。 オープンbug K8s/Tools
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 2 日以内に返信
-
FreeBSD: docs update and rootfs detection対応中かも @yug105 が 13 日前に担当しました。 オープンdocumentation enhancement Storage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
urunc-dev/urunc#1108 · コメント 6 件 ·
メンテナーはふだん 2 日以内に返信
-
Rumprun guests receive &, < and > as \u0026, \u003c and \u003e対応中かも @Sarthak-Shreshtha01 が 24 日前に担当しました。 オープンbug Guests
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
urunc-dev/urunc#1074 · コメント 4 件 ·
メンテナーはふだん 2 日以内に返信
urunc-dev/urunc の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
Schema validation is skipped when a transaction is invoked with a lowercase first letter対応中かも @RaphaelFakhri が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
-
cmd/ebitenmobile: multi-language bindings run the complete generator twice対応中かも @kumagi が今日担当しました。 オープンos:macos performance
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
hajimehoshi/ebiten#4011 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
agent-butler-finding chore
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
jordansmall/spindrift#6318 ·
メンテナーはふだん 1 日以内に返信