Skip to content

scripts/ci: create test cgroup controllers once#1780

Merged
avagin merged 2 commits intocheckpoint-restore:criu-devfrom
avagin:zdtm-cgroups2
Mar 21, 2022
Merged

scripts/ci: create test cgroup controllers once#1780
avagin merged 2 commits intocheckpoint-restore:criu-devfrom
avagin:zdtm-cgroups2

Conversation

@avagin
Copy link
Copy Markdown
Member

@avagin avagin commented Mar 21, 2022

zdtm.py mounts two named controllers for tests. In CI, we run zdtm.py a few
times, so we can mount (create) these controllers once from the ci script to
avoid any unwanted effects.

Fixes: #1774

avagin added 2 commits March 20, 2022 22:11
The idea that each zdtm.py should have own helder, so that two zdtm.py that are
running on the same host don't effect each other.

Fixes: checkpoint-restore#1774
Signed-off-by: Andrei Vagin <[email protected]>
zdtm.py mounts two named controllers for tests. In CI, we run zdtm.py a few
times, so we can mount (create) these controllers once to avoid any unwanted
effects.

Signed-off-by: Andrei Vagin <[email protected]>
@avagin avagin requested a review from adrianreber March 21, 2022 05:16
Copy link
Copy Markdown
Member

@adrianreber adrianreber left a comment

Choose a reason for hiding this comment

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

I always had a suspicion that it might be something like this, but I was able to reproduce it locally without any other zdtm process running in parallel.

From what I have seen it is less about two zdtm running in parallel and more about a cgroup being lazily removed from the kernel and while zdtm re-creates the cgroup the kernel still removes the previous cgroup.

This sounds like something that could help and so far CI is happy.

LGTM as it seems to provide a fix for the problem we are seeing.

@avagin
Copy link
Copy Markdown
Member Author

avagin commented Mar 21, 2022

From what I have seen it is less about two zdtm running in parallel and more about a cgroup being lazily removed from the kernel and while zdtm re-creates the cgroup the kernel still removes the previous cgroup.

Yes, it looks like this and it is why the second patch is here. The case when we create and remove cgroup controllers back and forth isn't common in real life. Usually, controllers are created once and are never destroyed.

@avagin avagin merged commit a72589d into checkpoint-restore:criu-dev Mar 21, 2022
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.

cgroup related tests seem to be failing more often in CI

2 participants