Skip to content

CRIU failure message names the rootful runtime root for a rootless daemon, and a work/criu-work/dump.log that is never written #14443

Closed as not planned

Description

@aitrawog

Summary

When a CRIU checkpoint create fails on the rootless containerd daemon, the
error message containerd prints names a log path that does not exist — the
rootful runtime root — plus a second path that is never written. A reader who
follows the printed path concludes the CRIU log was never written.

Measured on a host running containerd v2.4.1 and CRIU 4.2.1, with the rootless
daemon and the rootful daemon side by side.

The message

criu failed: type DUMP errno 0 path= /run/containerd/io.containerd.runtime.v2.task/default/<id>/criu-dump.log

What is actually true

The rootless daemon's runtime root is /run/user/<uid>/containerd, so the log the
daemon really wrote is at:

/run/user/1000/containerd/io.containerd.runtime.v2.task/default/<id>/criu-dump.log

Verified on the same host, in the same session:

  • the path in containerd's own error message — does not exist;
  • the rootless runtime-root path — exists, and carries the CRIU dump log
    (26 KB of it, ending in Error (criu/cr-dump.c:1975): Dumping FAILED.).

The message also names work/criu-work/dump.log, which is never written on this
path.

Why the rootful path is used

The rootless daemon reports the rootful runtime root in the error text. The
runtime root differs per daemon instance (/run/containerd for rootful,
/run/user/<uid>/containerd for rootless), and the failure text is built from the
rootful one.

Impact

The error is the only place a user can learn why the checkpoint failed — the
CRIU log carries the real mechanism (in the measured case:
Error (compel/src/lib/ptrace.c:27): suspending seccomp failed: Operation not permitted, the kernel's PTRACE_O_SUSPEND_SECCOMP gate being
capable(CAP_SYS_ADMIN) in the init user namespace, which a rootless daemon
cannot satisfy). Pointing the reader at a non-existent path sends them to
re-derive the cause from scratch, and the second path in the message
(work/criu-work/dump.log) compounds it.

Reproduction

# the rootless daemon
nerdctl --address /run/user/1000/containerd/containerd.sock \
        run -d --name probe alpine sleep 3600
nerdctl --address /run/user/1000/containerd/containerd.sock \
        checkpoint create --leave-running probe cp-probe
# → the error above, naming the rootful path

A second, related observation

The rootless daemon's runtime directory is drwx------ root root, so a plain user
cannot read the CRIU log of their own rootless container even at the correct
path. That may be intentional; it is reported here because it interacts with the
path bug above — the user is sent to a path they cannot open, at a path that does
not exist.

Activity

  1. AkihiroSuda commented on Oct 21, 2026

    @AkihiroSuda
    Member

    The error message is correct, as ${XDG_RUNTIME_DIR}/containerd is mounted on /run/containerd in the daemon's user+mount namespaces

    https://github.com/containerd/nerdctl/blob/5cb79efedb44bc675c2584120d95189d13fc18e4/extras/rootless/containerd-rootless.sh#L195-L197

    This is because /run/containerd is hard-coded, e.g., in

    // SocketAddress returns a socket address in the default state directory
    //
    // TODO: Consider deprecating for CreateSocketAddress
    func SocketAddress(ctx context.Context, socketPath, id string, debug bool) (string, error) {
    return CreateSocketAddress(ctx, filepath.Join(defaults.DefaultStateDir, "s"), socketPath, id, debug)
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions