[Devel] [PATCH vz7] ve/cgroup: do not link a CT cpu cgroup twice into ve_root_list
Andrey Ryabinin
aryabinin at virtuozzo.com
Wed Sep 5 13:12:58 MSK 2018
On 09/04/2018 06:55 PM, Konstantin Khorenko wrote:
> Container's cpu cgroup is linked to "ve_root_list" on CT start.
> But if someone holds CT's cpu cgroup while CT is being stopped,
> next CT start tries to create same cpu cgroup (fails, already exists)
> and links this cpu cgroup to the "ve_root_list", thus corrupting it.
>
> As a consequence calc_load_ve() goes in an endless loop.
>
> Minimal patch is to add a marker to task_group linked/unlinked
> and skip redundant linking.
>
> How to reproduce:
>
> # vzctl start 200
> # echo $$ > /sys/fs/cgroup/cpu/machine.slice/200/tasks
> # vzctl stop 200
> // At this moment VE cgroup got destroyed, but cpu cgroup is still alive
> // and linked to "ve_root_list" list
>
> # vzctl start 200
> // double add of same tg (same cpu cgroup) to "ve_root_list" list =>
> // list corruption => endless loop in next calc_load_ve() call
>
> https://jira.sw.ru/browse/PSBM-88251
>
> Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
> ---
Reviewed-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
More information about the Devel
mailing list