Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#1,127 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Daksha1611 ci sta già lavorando.

Dal 18/10/2026.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go
Ambito
backend, cli

Direzione di ricerca

Inizia con runcExec() in cmd/urunc/utils.go e segui come costruisce gli argomenti runc quando --root è assente. Controlla i percorsi create, start, kill e delete per confermare che usino la stessa root dello stato. Il lavoro è completo quando i container non unikernel possono completare questo ciclo di vita senza un --root esplicito; il report dice che l’autore lo ha testato localmente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Go
Stelle
306
Fork
214
Merge medio
2g 18h
PR unite (30g)
29

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di urunc-dev/urunc

Tutte le issue di urunc-dev/urunc

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.