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

FlakyTest: TestNotifyOnOOM #1228

Closed
cyphar opened this issue Dec 15, 2016 · 0 comments · Fixed by #1556
Closed

FlakyTest: TestNotifyOnOOM #1228

cyphar opened this issue Dec 15, 2016 · 0 comments · Fixed by #1556

Comments

@cyphar
Copy link
Member

cyphar commented Dec 15, 2016

I've seen this test fail a few times quite recently:

--- FAIL: TestNotifyOnOOM (0.00s)
	notify_linux_test.go:98: expected event control to be closed
hqhq added a commit to hqhq/runc that referenced this issue Aug 14, 2017
Fixes: opencontainers#1228

It can be reproduced by applying this patch:
```diff
@@ -45,6 +46,7 @@ func registerMemoryEvent(cgDir string, evName string, arg string) (<-chan struct
        go func() {
                defer func() {
                        close(ch)
+                       <-time.After(1 * time.Second)
                        eventfd.Close()
                        evFile.Close()
                }()
```

We can close channel after fds were closed.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
stefanberger pushed a commit to stefanberger/runc that referenced this issue Sep 7, 2017
Fixes: opencontainers#1228

It can be reproduced by applying this patch:
```diff
@@ -45,6 +46,7 @@ func registerMemoryEvent(cgDir string, evName string, arg string) (<-chan struct
        go func() {
                defer func() {
                        close(ch)
+                       <-time.After(1 * time.Second)
                        eventfd.Close()
                        evFile.Close()
                }()
```

We can close channel after fds were closed.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
stefanberger pushed a commit to stefanberger/runc that referenced this issue Sep 8, 2017
Fixes: opencontainers#1228

It can be reproduced by applying this patch:
```diff
@@ -45,6 +46,7 @@ func registerMemoryEvent(cgDir string, evName string, arg string) (<-chan struct
        go func() {
                defer func() {
                        close(ch)
+                       <-time.After(1 * time.Second)
                        eventfd.Close()
                        evFile.Close()
                }()
```

We can close channel after fds were closed.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
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.

1 participant