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

[CI] not ok 135 runc run with tmpfs perms #4029

Closed
lifubang opened this issue Sep 26, 2023 · 4 comments · Fixed by #4095
Closed

[CI] not ok 135 runc run with tmpfs perms #4029

lifubang opened this issue Sep 26, 2023 · 4 comments · Fixed by #4095

Comments

@lifubang
Copy link
Member

lifubang commented Sep 26, 2023

ci / test (ubuntu-20.04, 1.21.x, rootless, -race) (pull_request) Failing after 3m

not ok 135 runc run with tmpfs perms
# (in test file tests/integration/run.bats, line 119)
#   `[ "$output" = "710" ]' failed
# runc spec --rootless (status=0):
#
# runc run test_tmpfs (status=0):
# 444
# runc run test_tmpfs (status=0):
# 444
# runc run test_tmpfs (status=0):
# 710
@lifubang lifubang changed the title [Flaky CI] not ok 135 runc run with tmpfs perms [CI] not ok 135 runc run with tmpfs perms Sep 26, 2023
@lifubang
Copy link
Member Author

lifubang commented Oct 26, 2023

https://github.com/opencontainers/runc/actions/runs/6639817702/job/18038954312
It happended again. I have seen it several times.

ok 139 runc run with tmpfs # skip test requires root
not ok 140 runc run with tmpfs perms
# (in test file tests/integration/run.bats, line 104)
#   `[ "$output" = "444" ]' failed
# runc spec --rootless (status=0):
#
# runc run test_tmpfs (status=0):
# 444

@kolyshkin
Copy link
Contributor

I think this is a manifestation of the same issue as in #2425 (a race in runc tty driver). I tried to solve it a few years ago (see #2723), albeit unsuccessfully (see #2749).

Maybe someone else can untangle this knot; I really tried.

As for the test case, a fix is simple, see #4095.

@kolyshkin
Copy link
Contributor

kolyshkin commented Oct 26, 2023

I think this is a manifestation of the same issue as in #2425 (a race in runc tty driver). I tried to solve it a few years ago (see #2723), albeit unsuccessfully (see #2749).

Maybe someone else can untangle this knot; I really tried.

@lifubang if you want to give it a try, the repro is really simple:

  1. Remove the t.Skip from the TestExecInTTY:
diff --git a/libcontainer/integration/execin_test.go b/libcontainer/integration/execin_test.go
index c5c32413..43eebeaf 100644
--- a/libcontainer/integration/execin_test.go
+++ b/libcontainer/integration/execin_test.go
@@ -234,7 +234,7 @@ func TestExecInTTY(t *testing.T) {
        if testing.Short() {
                return
        }
-       t.Skip("racy; see https://github.com/opencontainers/runc/issues/2425")
+       //      t.Skip("racy; see https://github.com/opencontainers/runc/issues/2425")
        config := newTemplateConfig(t, nil)
        container, err := newContainer(t, config)
        ok(t, err)
  1. Run the test many times:
$ cd libcontainer/integration
$ go test -v -count 1000 -exec sudo -run ExecInTTY

Eventually you will see it failing.

I guess another way is to do runc run with a short-lived process (same as in "runc run with tmpfs perms"), as this is what we are seeing in CI.

@kolyshkin
Copy link
Contributor

Another manifestation of the same bug: #4074

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

Successfully merging a pull request may close this issue.

2 participants