Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync race issue in nsexec.c #1236

Closed
hqhq opened this issue Dec 19, 2016 · 1 comment
Closed

sync race issue in nsexec.c #1236

hqhq opened this issue Dec 19, 2016 · 1 comment

Comments

@hqhq
Copy link
Contributor

hqhq commented Dec 19, 2016

When I use the latest runc with docker, got a lot of failure in integration tests, they all failed with exit status 25, full output looks like:

FAIL: docker_cli_run_test.go:3631: DockerSuite.TestRunAbsoluteInvalidCgroupParent

docker_cli_run_test.go:3642:
    // XXX: This may include a daemon crash.
    c.Fatalf("unexpected failure when running container with --cgroup-parent option - %s\n%v", string(out), err)
... Error: unexpected failure when running container with --cgroup-parent option - /go/src/github.com/docker/docker/bundles/1.11.2/test-integration-cli/../dynbinary/docker: Error response from daemon: rpc error: code = 2 desc = "oci runtime error: container_linux.go:247: starting container process caused \"process_linux.go:272: running exec setns process for init caused \\\"exit status 25\\\"\"\n".

exit status 125

To be explicit, we failed at: https://github.com/opencontainers/runc/blob/master/libcontainer/nsenter/nsexec.c#L579-L581

The code was added by: #1154
But I don't think it introduced this issue, it's probably because we are using the same socketpair to sync with child and grandchild, so there is race condition that parent read data in the wrong sequence.

@hqhq
Copy link
Contributor Author

hqhq commented Dec 19, 2016

ping @cyphar , I'm working on a fix now.

hqhq added a commit to hqhq/runc that referenced this issue Dec 19, 2016
hqhq added a commit to hqhq/runc that referenced this issue Jan 20, 2017
georgethebeatle pushed a commit to cloudfoundry-attic/runc that referenced this issue Jan 23, 2017
georgethebeatle pushed a commit to cloudfoundry-attic/runc that referenced this issue Jan 23, 2017
stevenh pushed a commit to stevenh/runc that referenced this issue Feb 1, 2017
stevenh pushed a commit to stevenh/runc that referenced this issue Feb 1, 2017
stevenh pushed a commit to stevenh/runc that referenced this issue Feb 3, 2017
karampok pushed a commit to cloudfoundry-attic/runc that referenced this issue Feb 3, 2017
stevenh pushed a commit to stevenh/runc that referenced this issue Feb 6, 2017
georgethebeatle pushed a commit to cloudfoundry-attic/runc that referenced this issue Feb 7, 2017
hqhq added a commit to hqhq/runc that referenced this issue Feb 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant