Skip to content

no such file or directory on forwardIO(stderr) #58

Open

Description

@hsiangkao

Try to play nerdbox on Linux host:

nerdctl run --debug --runtime="io.containerd.nerdbox.v1" --snapshotter=erofs -it --rm docker.1ms.run/library/ubuntu:latest /bin/bash
DEBU[0000] verifying process skipped
DEBU[0000] generated log driver: binary:///usr/bin/nerdctl?_NERDCTL_INTERNAL_LOGGING=%2Fvar%2Flib%2Fnerdctl%2F1935db59
DEBU[0000] remote introspection plugin filters           filters="[type==io.containerd.snapshotter.v1, id==erofs]"
FATA[0000] failed to create shim task: containerd-shim: opening file "/run/containerd/fifo/2365072660/6de4ba46f2d7fa683bed82a0ed4cb30071a5c0c1437801d11ffeb57ef15c5647
-stderr" failed: open /run/containerd/fifo/2365072660/6de4ba46f2d7fa683bed82a0ed4cb30071a5c0c1437801d11ffeb57ef15c5647-stderr: no such file or director

It seems the following change can workaround it but I don't look into it:

diff --git a/internal/shim/task/io.go b/internal/shim/task/io.go
index 080c114d9cf5..d9c85fb778d0 100644
--- a/internal/shim/task/io.go
+++ b/internal/shim/task/io.go
@@ -247,7 +247,7 @@ func copyStreams(ctx context.Context, streams [3]io.ReadWriteCloser, stdin, stdo
                                i.dest(sameFile, nil)
                                continue
                        }
-                       if fw, err = os.OpenFile(i.name, syscall.O_WRONLY|syscall.O_APPEND, 0); err != nil {
+                       if fw, err = os.OpenFile(i.name, syscall.O_WRONLY|syscall.O_APPEND|syscall.O_CREAT, 0); err != nil {
                                return fmt.Errorf("containerd-shim: opening file %q failed: %w", i.name, err)
                        }
                        if stdout == stderr {

Activity

  1. changed the title [-]no such file or director on forwardIO(stderr)[/-] [+]no such file or directory on forwardIO(stderr)[/+] on Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions