containerd / containerd/nerdbox
Creating a container right after another one exits fails
- Dominant language
- Go
- Stars
- 185
- Forks
- 30
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 20
Description
Whenever I create a new container right after exiting another one, the shim stalls for ~27 seconds and then returns an error indicating it failed on `krun_add_virtiofs` (on Linux) or `krun_add_disk` (on macOS):
```
$ ctr run -t --rm --snapshotter erofs --runtime io.containerd.nerdbox.v1 docker.io/nicolaka/netshoot:latest test /bin/bash
(none):~# exit
exit
$ time ctr run -t --rm --snapshotter erofs --runtime io.containerd.nerdbox.v1 docker.io/nicolaka/netshoot:latest test /bin/bash
ctr: failed to create shim task: failed to add virtiofs: krun_add_disk failed: -2
ctr run -t --rm --snapshotter erofs --runtime io.containerd.nerdbox.v1 test 0.04s user 0.03s system 0% cpu 27.430 total
```
Looking at [`krun_add_virtiofs`](https://github.com/containers/libkrun/blob/219b5552a86f83775956f542ec0ab700b197f4d7/src/libkrun/src/lib.rs#L582) and [`krun_add_disk`](https://github.com/containers/libkrun/blob/219b5552a86f83775956f542ec0ab700b197f4d7/src/libkrun/src/lib.rs#L662), they both return `ENOENT` when libkrun's global `CTX_MAP` doesn't contain the `ctx_id` passed as first argument to both functions.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.