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

restore: cleanup cgroup properly in error path #1541

Merged
merged 1 commit into from
Jul 8, 2021

Conversation

liusdu
Copy link

@liusdu liusdu commented Jul 5, 2021

Cgroup yard is setup in crtools_prepare_shared. But it is not cleaned up
properly in some code path, which leads cgroup mountpoint leaking.

We can see this type of errors in runc's issue:opencontainers/runc#3042

@codecov-commenter
Copy link

codecov-commenter commented Jul 5, 2021

Codecov Report

Merging #1541 (d5ae18e) into criu-dev (15266a4) will increase coverage by 0.05%.
The diff coverage is 66.23%.

❗ Current head d5ae18e differs from pull request most recent head f69ac4e. Consider uploading reports for the commit f69ac4e to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##           criu-dev    #1541      +/-   ##
============================================
+ Coverage     69.22%   69.28%   +0.05%     
============================================
  Files           135      136       +1     
  Lines         32784    32800      +16     
============================================
+ Hits          22696    22724      +28     
+ Misses        10088    10076      -12     
Impacted Files Coverage Δ
criu/cgroup.c 77.73% <ø> (ø)
criu/mem.c 85.68% <ø> (+3.60%) ⬆️
criu/cr-restore.c 66.47% <50.00%> (-0.05%) ⬇️
criu/pidfd-store.c 66.18% <66.18%> (ø)
criu/cr-service.c 63.92% <75.00%> (+0.13%) ⬆️
criu/cr-dump.c 75.80% <100.00%> (+0.05%) ⬆️
criu/uffd.c 79.27% <0.00%> (-0.32%) ⬇️
criu/sk-unix.c 74.20% <0.00%> (-0.03%) ⬇️
compel/src/lib/infect.c 55.40% <0.00%> (+0.12%) ⬆️
... and 3 more

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 15266a4...f69ac4e. Read the comment docs.

@liusdu liusdu force-pushed the cgroup branch 2 times, most recently from bd1619a to a97ec56 Compare July 6, 2021 01:51
@liusdu liusdu force-pushed the cgroup branch 3 times, most recently from 379884b to a295e2b Compare July 7, 2021 02:35
Cgroup yard is setup in crtools_prepare_shared. But it is not cleaned up
properly in some code path, which leads cgroup mountpoint leaking.

Signed-off-by: Liu Hua <[email protected]>
@adrianreber adrianreber merged commit f29a02a into checkpoint-restore:criu-dev Jul 8, 2021
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.

5 participants