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

check_cgroup_changed infinite loop #221

Open
Prism019 opened this issue Jun 20, 2021 · 0 comments
Open

check_cgroup_changed infinite loop #221

Prism019 opened this issue Jun 20, 2021 · 0 comments

Comments

@Prism019
Copy link

Prism019 commented Jun 20, 2021

Expected behaviour

I'm unsure about the expected behaviour.

Actual behaviour

The program enters an infinite loop while checking to see if the cgroups of a process have changed.
The bug is in the check_cgroup_changed function in src/cgroups.cpp found here

Steps to reproduce the behaviour

Start mate-system-monitor while a process exists that:

  • Has the path as "/" for one of its cgroups
  • Has the controller as "" for the same cgroup
  • The "current_cgroup_set" for it is not null

The "special case for root cgroup" block will be entered, where the tmp variable will be incremented by 0 on each loop, as the controller is an empty string.
I am able to create a process that exhibits this behaviour by starting a QEMU virtual machine through virt-manager. The offending cgroup entry is 0::/ of the kvm-nx-lpage-re kernel module.

$ cat /proc/29363/cgroup
14:rdma:/
13:pids:/
12:hugetlb:/
11:net_prio:/
10:perf_event:/machine/qemu-4-devos.libvirt-qemu
9:net_cls:/machine/qemu-4-devos.libvirt-qemu
8:freezer:/machine/qemu-4-devos.libvirt-qemu
7:devices:/machine/qemu-4-devos.libvirt-qemu
6:memory:/machine/qemu-4-devos.libvirt-qemu
5:blkio:/machine/qemu-4-devos.libvirt-qemu
4:cpuacct:/machine/qemu-4-devos.libvirt-qemu/emulator
3:cpu:/machine/qemu-4-devos.libvirt-qemu/emulator
2:cpuset:/machine/qemu-4-devos.libvirt-qemu/emulator
1:name=openrc:/libvirtd
0::/

MATE general version

1.24.2

Package version

80640c9

Linux Distribution

Arch Linux x86_64

Link to bugreport of your Distribution (requirement)

Arch does not modify the build steps or source in any way. This is purely an issue with mate-system-monitor.

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

No branches or pull requests

1 participant