runc icon indicating copy to clipboard operation
runc copied to clipboard

container.Start failed to start the process

Open ruqqq opened this issue 10 years ago • 5 comments

This is related to issue #973. Creating new issue because I cannot reopen the issue and it is a related but separate issue.

I am using @hushan's gist (after modification for nsenter) from the issue above against the current runC master repo but can't seem to spawn the exec process successfully. After debugging, it shows that code execution for "init" process stops/freeze at syscall.Openat in standard_init_linux.go hence the exec didn't get called.

Any ideas?

ruqqq avatar Sep 22 '16 11:09 ruqqq

it's meant to block on the creation of the exec FIFO, so are you sure that you're using the libcontainer API correctly? Can you please post the actual code you're using?

cyphar avatar Sep 22 '16 11:09 cyphar

@cyphar I am using exactly the same code as the above mentioned issue. Here's the gist for easy reference: https://gist.github.com/hushan/67e1ddd22d4f2a686fb97a01e7299388

EDIT: I checked if the ps process is spawned by doing ps aufx on the host to read the process tree.

ruqqq avatar Sep 22 '16 11:09 ruqqq

@ruqqq You're missing this import (which was the solution for the issue you linked):

import _ "github.com/opencontainers/runc/libcontainer/nsenter"

It's necessary because we do some pretty dodgy cgo magic.

cyphar avatar Sep 23 '16 00:09 cyphar

@cyphar Yes, as mentioned in first post, I am using the gist plus the "magic" line.

ruqqq avatar Sep 23 '16 01:09 ruqqq

Closing as outdated.

AkihiroSuda avatar Jun 02 '20 18:06 AkihiroSuda