Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Containers handed over to runc cannot be started, killed or deleted when urunc runs without --root

オープン 初心者向け
#1,127 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Daksha1611 がすでに取り組んでいます。

2026年10月18日 から。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
backend, cli

調査の方向性

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
  1. podman --runtime /path/to/urunc run --rm docker.io/library/alpine:3.20 echo hello
  2. runc 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:

  1. urunc create ctr, from inside the bundle directory, without --root
  2. runc list, which shows ctr as created in runc's default root
  3. urunc start ctr
  4. urunc kill ctr KILL
  5. urunc delete ctr
  6. runc 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

urunc-dev/urunc のほかの issue

urunc-dev/urunc の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。