Skip to content

Creating a container right after another one exits fails #10

@akerouanton

Description

@akerouanton

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 and krun_add_disk, they both return ENOENT when libkrun's global CTX_MAP doesn't contain the ctx_id passed as first argument to both functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions