Skip to content

fix: eventfd leak#3956

Merged
AkihiroSuda merged 2 commits intocontainerd:masterfrom
sethp-nr:fix/eventfd-leak
Jan 14, 2020
Merged

fix: eventfd leak#3956
AkihiroSuda merged 2 commits intocontainerd:masterfrom
sethp-nr:fix/eventfd-leak

Conversation

@sethp-nr
Copy link
Copy Markdown
Contributor

Only start watching the cgroup for OOMs when the first process starts instead of on every process.

In my testing this addresses the repro steps in #3949 and resolves the leak we were observing for kubernetes pods that have an exec healthcheck.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Jan 10, 2020

Build succeeded.

@estesp
Copy link
Copy Markdown
Member

estesp commented Jan 11, 2020

Thanks for the PR! Can you sign your commit? git commit --amend -s and re-push should do it!

@AkihiroSuda
Copy link
Copy Markdown
Member

Do we need this for v2/runc/v2/service.go as well?

Only start watching the cgroup for OOMs when the first process starts
instead of on every process.

Signed-off-by: Seth Pellegrino <spellegrino@newrelic.com>
@sethp-nr
Copy link
Copy Markdown
Contributor Author

@estesp fixed!

@AkihiroSuda It looks like it to me, though I'm not quite sure how to test the matrix of "v2 runtime with v1/v2 cgroups." That said, it looks like there's no OOM monitoring implemented for v2 cgroups, so I'm happy to move that if block down as part of this PR as well.

@AkihiroSuda
Copy link
Copy Markdown
Member

Sorry I'm talking about cgroup v1 monitor in runc/v2.

There's no OOM monitoring for the v2 cgroups yet, so it seems unlikely
that there was a leak in that case.

Signed-off-by: Seth Pellegrino <spellegrino@newrelic.com>
@codecov-io
Copy link
Copy Markdown

codecov-io commented Jan 13, 2020

Codecov Report

Merging #3956 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3956   +/-   ##
=======================================
  Coverage   42.63%   42.63%           
=======================================
  Files         130      130           
  Lines       14759    14759           
=======================================
  Hits         6292     6292           
  Misses       7548     7548           
  Partials      919      919
Flag Coverage Δ
#linux 46% <ø> (ø) ⬆️
#windows 38.22% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a767b62...6650858. Read the comment docs.

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This looks like the right fix to me. Would love @crosbymichael's view, but he is out on leave for the time being.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Jan 13, 2020

Build succeeded.

@AkihiroSuda AkihiroSuda merged commit c55bd87 into containerd:master Jan 14, 2020
@AkihiroSuda
Copy link
Copy Markdown
Member

Do you mind opening cherry-pick PR for release/1.3 branch?

@sethp-nr sethp-nr deleted the fix/eventfd-leak branch January 14, 2020 18:54
@sethp-nr
Copy link
Copy Markdown
Contributor Author

Sure thing: #3961

Thanks all!

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 this pull request may close these issues.

4 participants