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

fix: exec config leak in cri exec #3000

Merged
merged 1 commit into from
Nov 20, 2019

Conversation

zhuangqh
Copy link
Contributor

mark execConfig as exited and used when start exec fails
exec gc will collect this config

Signed-off-by: zhuangqh zhuangqhc@gmail.com

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

exec config object would leak in memory after CRI ExecSync

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

Ⅳ. Describe how to verify it

  1. crictl exec into a container
  2. inspect container and execconfig will be empty after several minutes.

Ⅴ. Special notes for reviews

mark execConfig as exited and used when start exec fails
exec gc will collect this config

Signed-off-by: zhuangqh <zhuangqhc@gmail.com>
@codecov
Copy link

codecov bot commented Nov 19, 2019

Codecov Report

Merging #3000 into master will increase coverage by 0.62%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3000      +/-   ##
==========================================
+ Coverage   67.41%   68.03%   +0.62%     
==========================================
  Files         291      291              
  Lines       18660    18663       +3     
==========================================
+ Hits        12579    12697     +118     
+ Misses       4572     4484      -88     
+ Partials     1509     1482      -27
Flag Coverage Δ
#criv1alpha2_test 34.44% <11.11%> (-0.22%) ⬇️
#integration_test_0 36.4% <11.11%> (-0.01%) ⬇️
#integration_test_1 35.48% <100%> (+0.02%) ⬆️
#integration_test_2 36.37% <11.11%> (+0.01%) ⬆️
#integration_test_3 35.8% <11.11%> (?)
#node_e2e_test 34.01% <11.11%> (-0.21%) ⬇️
#unittest 26.68% <0%> (-0.01%) ⬇️
Impacted Files Coverage Δ
daemon/mgr/container_exec.go 80% <100%> (+0.42%) ⬆️
ctrd/watch.go 72.72% <0%> (-5.2%) ⬇️
ctrd/container.go 50.62% <0%> (-0.36%) ⬇️
apis/server/router.go 91.95% <0%> (+0.57%) ⬆️
daemon/mgr/spec_linux.go 79.26% <0%> (+1%) ⬆️
daemon/mgr/container_stats.go 71.66% <0%> (+1.11%) ⬆️
daemon/mgr/image.go 61.17% <0%> (+1.3%) ⬆️
ctrd/supervisord/daemon.go 49.12% <0%> (+1.31%) ⬆️
daemon/mgr/container_validation.go 40.09% <0%> (+1.8%) ⬆️
registry/auth.go 55.14% <0%> (+1.86%) ⬆️
... and 14 more

Copy link
Contributor

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

@fuweid fuweid merged commit 4e21ef5 into AliyunContainerService:master Nov 20, 2019
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.

None yet

2 participants