Containers handed over to runc cannot be started, killed or deleted when urunc runs without --root
メンテナーはふだん 1 日以内に返信
@Daksha1611 がすでに取り組んでいます。
2026年10月18日 から。
評価
調査の方向性
cmd/urunc/utils.go の runcExec() から始め、--root がない場合に runc の引数をどのように組み立てるかを追ってください。create、start、kill、delete の各パスを確認し、同じ状態ルートを使っていることを確かめてください。明示的な --root なしで非 unikernel コンテナがこのライフサイクルを完了できれば完了です。報告には、作者がローカルでテストしたと記されています。
索引モデルが issue の本文から書いたものです。
説明
Description
When urunc is called without --root, it picks its own default root:
/run/urunc, or $XDG_RUNTIME_DIR/urunc when running rootless. For
containers that are not unikernels, urunc hands over to runc by exec'ing it
with the original arguments. Since these do not contain --root either, runc
falls back to its own default root: /run/runc, or $XDG_RUNTIME_DIR/runc.
As a result, urunc create succeeds, but every following urunc start,
urunc kill and urunc delete looks for state.json under urunc's root. It
does not find it, so it returns an error before it can hand the command over
to runc. The runc container stays in the created state and is never
cleaned up.
containerd always passes --root, so setups through containerd (nerdctl,
Kubernetes, Docker) are not affected. Rootless podman does not pass
--root, so every non-unikernel image fails to run with
podman --runtime urunc. Based on the code, the same happens for rootful
callers that do not pass --root (/run/urunc vs /run/runc), but I have
only reproduced the rootless case.
System info
- Urunc version: e45d556 (main), built from source
- Arch: x86_64
- VMM: N/A (non-unikernel container, handed over to runc)
- Unikernel: N/A
- runc 1.3.6, podman 5.8.2, Fedora 43, kernel 7.0.4
Steps to reproduce
With rootless podman
podman --runtime /path/to/urunc run --rm docker.io/library/alpine:3.20 echo hellorunc list
Without podman
As a non-root user, with any plain OCI bundle (created with
runc spec --rootless) whose process binary exists in the rootfs:
urunc create ctr, from inside the bundle directory, without--rootrunc list, which showsctrascreatedin runc's default rooturunc start ctrurunc kill ctr KILLurunc delete ctrrunc list
Logs / output
Rootless podman
$ podman --runtime /path/to/urunc run --rm docker.io/library/alpine:3.20 echo hello-from-runc
time="2026-10-18T15:22:09+05:30" level=error msg="open /run/user/1000/urunc/985dfc4934dbbd29875d73a70f9f416f80a5cec104423eea94ca247552cebcba/state.json: no such file or directory"
Error: `/path/to/urunc start 985dfc4934dbbd29875d73a70f9f416f80a5cec104423eea94ca247552cebcba` failed: exit status 1
$ echo $?
126
$ runc list
ID PID STATUS BUNDLE
985dfc4934dbbd29875d73a70f9f416f80a5cec104423eea94ca247552cebcba 585968 created /home/<user>/.local/share/containers/storage/overlay-containers/985dfc49.../userdata
The arguments that rootless podman passes to the runtime contain no --root:
--systemd-cgroup create --bundle <bundle> --pid-file <pidfile> <id>
start <id>
delete --force <id>
Direct calls
$ urunc create xdg-repro
$ echo $?
0
$ runc list
ID PID STATUS BUNDLE
xdg-repro 585455 created /home/<user>/bundle
$ urunc start xdg-repro
time="2026-10-18T15:21:30+05:30" level=error msg="open /run/user/1000/urunc/xdg-repro/state.json: no such file or directory"
$ urunc kill xdg-repro KILL
time="2026-10-18T15:21:30+05:30" level=error msg="open /run/user/1000/urunc/xdg-repro/state.json: no such file or directory"
$ urunc delete xdg-repro
time="2026-10-18T15:21:30+05:30" level=error msg="open /run/user/1000/urunc/xdg-repro/state.json: no such file or directory"
$ runc list
ID PID STATUS BUNDLE
xdg-repro 585455 created /home/<user>/bundle
With an explicit urunc --root <dir>, the same bundle goes through
create, start, kill and delete without errors, and nothing is left
behind.
Possible fix
runcExec() in cmd/urunc/utils.go could pass urunc's root to runc when
--root was not given in the command line. Then both runtimes would use
the same state directory, which is what already happens under containerd.
I tested this change locally: the podman command above prints its output
and exits with 0, and the direct create/start/kill/delete sequence
works without --root.
Related
While testing the change above, I noticed that podman calls
urunc delete --force with no PATH set, so exec.LookPath("runc") fails
during podman's cleanup. That is a separate problem, which I will report in
its own issue.
- 主要言語
- Go
- スター
- 307
- フォーク
- 219
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 32
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
urunc-dev/urunc のほかの issue
-
urunc-deploy cleanup never labels the node, so the cleanup DaemonSet does not run対応中かも @Sarthak-Shreshtha01 が 8 日前に担当しました。 オープンbug K8s/Tools
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
FreeBSD: docs update and rootfs detection対応中かも @yug105 が 3 日前に担当しました。 オープンdocumentation enhancement Storage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
urunc-dev/urunc#1108 · コメント 6 件 ·
メンテナーはふだん 1 日以内に返信
-
Rumprun guests receive &, < and > as \u0026, \u003c and \u003e対応中かも @Sarthak-Shreshtha01 が 14 日前に担当しました。 オープンbug Guests
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
urunc-dev/urunc#1074 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
Hooks run concurrently instead of in the listed order対応中かも @anishmehta24 が 19 日前に担当しました。 オープンCore enhancement OCI
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
urunc-dev/urunc#1066 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Flag to keep pulled images on local runs of e2e対応中かも @slash-init が 15 日前に担当しました。 オープンdev
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
urunc-dev/urunc#1057 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
urunc-dev/urunc の issue をすべて見る
似ている issue
-
Project submission:オープン
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
slavakurilyak/awesome-ai-agents#845 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
JakeChampion/lang#13132 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] deploy.restart_policy without condition drops the restart policy対応中かも @akshat-lakhera が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
docker/compose#14383 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信