-
Notifications
You must be signed in to change notification settings - Fork 62
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
below 0.3.0 records an unclean exit (crash) #8122
Comments
What happens when you start with |
I think this might be similar to what I'm seeing as well:
I backported a few patches and have a PR (22894) in the Gentoo repository, which should fix this. |
I'm using the current Gentoo version 0.4.1 but the problem persists: While portage with cgroup support is running, I can no longer run below with user permission, only running as root works. The problem is that below cannot read the contents of the portage cgroup. This is only a problem during initialization of below. If it is already running, it seems to just ignore that problem, i.e. it does not crash. |
Can you add the output of the following commands? It should be similar to this:
Make sure to check that you are using v2 cgroups by setting |
If this is a Gentoo specific bug please report in the appropriate bug tracker. |
I'm using systemd, so there's no
Unified cgroups are enabled.
Portage mounts a different cgroup hierarchy while running. It uses it for PID tracking of build processes.
While it is running, it will create folders inside that latter directory for each package build:
|
I think this may be caused by Gentoo-specific handling of cgroup in portage but don't think that Gentoo's "below" should carry a Gentoo-specific patch because that usage of cgroups could occur in the wild even for non-Gentoo systems. OTOH, I'm not sure if the tmpfs should even be mounted to |
FWIW I was finally able to get a systemd based machine for testing and everything seems to work fine (ie non root user) for Here are the mounts:
And the
|
Please try running a longer emerge with
I'm not even sure if that needs a systemd machine - it probably doesn't. The simple fact is that programs can create custom cgroups for whatever reason they intent, in this example, portage does it. And below cannot handle that. |
I think the problem here is that we have another hierarchy under /sys/fs/cgroup and it's cgroup v1 not cgroup v2? I don't think there's generally anything in particular preventing users from mounting something under /sys/fs/cgroup. In this case, I wonder if we could make below ignore this nested hierarchies. |
Yes, I think it needs exactly that. Actually, Gentoo's portage just exposes that problem, it's really not Gentoo-specific. Portage uses it to track PIDs of build-processes in its sandbox to properly clean up when finished. Other software might use that cgroup feature for similar things. Actually, portage doesn't seem to do anything beyond with the cgroup, no controllers are enabled - it's just a plain cgroup. It might enable network namespacing and some other sandboxing features but that is probably not a cgroup feature by itself (actually, it can use namespaces even without the cgroup feature). As an example, we may see such nested cgroups if we run containers that spawn cgroup v1 mounts by themselves. So below probably needs to detect two situations:
To properly still detect errors, below probably needs to explicitly detect the v1 format and ignore that, and not assume that an error in a proposed v2 format is a v1 format, otherwise the v2 error detection is rendered useless. |
This happens when I'm emerging packages in Gentoo:
sys-fs-cgroup.tree.txt
The text was updated successfully, but these errors were encountered: