Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 644834 - sys-auth/elogind-235.2 fails to start, cannot determine cgroup
Summary: sys-auth/elogind-235.2 fails to start, cannot determine cgroup
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andreas Sturmlechner
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-17 07:57 UTC by DJ Dunn
Modified: 2024-01-29 11:41 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DJ Dunn 2018-01-17 07:57:58 UTC
sys-auth/elogind-235.2

[ 2249.099480] elogind[11346]: Cannot determine cgroup we are running in: No medium found
[ 2249.099707] elogind[11346]: Out of memory.
Comment 1 DJ Dunn 2018-01-17 07:59:21 UTC
rc_cgroup_mode="legacy"
Comment 2 DJ Dunn 2018-01-17 08:53:24 UTC
works with 

rc_cgroup_mode="unified"

and

rc_cgroup_mode="hybrid"
Comment 3 Andreas Sturmlechner gentoo-dev 2018-01-17 09:22:05 UTC
Sven, you know probably best here.
Comment 4 Sven Eden 2018-01-17 11:57:25 UTC
(In reply to DJ Dunn from comment #2)
> works with 
> 
> rc_cgroup_mode="unified"
> 
> and
> 
> rc_cgroup_mode="hybrid"

If it works with hybrid, it must work with legacy, because the two are basically the same. However, hybrid is detected first, and legacy if it is not hybrid...

(In reply to DJ Dunn from comment #0)

> [ 2249.099480] elogind[11346]: Cannot determine cgroup we are running in:
> No medium found

This error code would mean, that /sys/fs/cgroup is not mounted, or that it has the wrong FS type.

I'll go peeking whether there are any updates or changes in the cgroup detection code in systemd. Maybe I have missed something important.
Comment 5 Attila Tóth 2018-01-17 12:08:38 UTC
(In reply to Sven Eden from comment #4)
> (In reply to DJ Dunn from comment #2)
> > works with 
> > 
> > rc_cgroup_mode="unified"
> > 
> > and
> > 
> > rc_cgroup_mode="hybrid"
> 
> If it works with hybrid, it must work with legacy, because the two are
> basically the same. However, hybrid is detected first, and legacy if it is
> not hybrid...
> 
> (In reply to DJ Dunn from comment #0)
> 
> > [ 2249.099480] elogind[11346]: Cannot determine cgroup we are running in:
> > No medium found
> 
> This error code would mean, that /sys/fs/cgroup is not mounted, or that it
> has the wrong FS type.
> 
> I'll go peeking whether there are any updates or changes in the cgroup
> detection code in systemd. Maybe I have missed something important.

I'd like to confirm, that hybrid works (default), but explicit legacy became problematic sint the recent update to 235.x.
Comment 6 Sven Eden 2018-01-18 08:48:32 UTC
(In reply to Attila Tóth from comment #5)
> I'd like to confirm, that hybrid works (default), but explicit legacy became
> problematic sint the recent update to 235.x.

And I found out why. When I am back home tonight, I'll push a fix. It can then be pre-tested using the elogind-9999 ebuild from "seden overlay" (via layman).

The reason was a misunderstanding on my side. systemd-login works differently, because it can assume that systemd runs the show - but that doesn't set up legacy cgroups like everybody else...

Before the next release I'll have to fix a few tiny issues for void linux. But I am pretty sure it won't be long.

I knew this wouldn't work for everybody on the first shot. At least I am happy that elogind has enough acceptance now, that feedback on bugs comes in quick'n'dirty. ;-)
Comment 7 Attila Tóth 2018-01-18 12:14:00 UTC
(In reply to Sven Eden from comment #6)
> I knew this wouldn't work for everybody on the first shot. At least I am
> happy that elogind has enough acceptance now, that feedback on bugs comes in
> quick'n'dirty. ;-)

Elogind is something necessary to be able to stay away from systemd - besides eudev and openrc. It is essential part of the non-systemd toolkit. Thank you so much for developing an maintaining it!
Comment 8 Sven Eden 2018-01-18 22:05:49 UTC
This bug should be fixed with commit https://github.com/elogind/elogind/commit/003ece7
Comment 9 Simon 2018-01-19 09:27:09 UTC
What's the path to get this in a testing ebuild? Myself, and I guess some other people as well, have non-booting systems with 235.2. Maybe it should be dropped from ~? I've masked it for now.
Comment 10 Sven Eden 2018-01-19 10:13:19 UTC
(In reply to Simon from comment #9)
> What's the path to get this in a testing ebuild? Myself, and I guess some
> other people as well, have non-booting systems with 235.2. Maybe it should
> be dropped from ~? I've masked it for now.

First: Everything worked without any problems on my testing machine, I just forgot to actually boot in pure "legacy" mode.

In the meantime you can either

A) change /etc/rc.conf to start cgroups in hybrid mode. The problem only occurs in pure legacy mode. And Hybrid is basically the same. Applications which support it can use cgroups2 via /sys/fs/cgroups/unified then.

or

B) Downgrade elogind. The machine still boots, only elogind is not working, but you can log in as root and downgrade elogind. It just takes a while until PAM times out.

Sorry for the inconvenience!
Comment 11 Andreas Sturmlechner gentoo-dev 2018-01-19 10:33:08 UTC
Thanks, I was just waiting for one positive test report here, currently away from an elogind system.
Comment 12 Larry the Git Cow gentoo-dev 2018-01-19 10:40:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d52408198b8a5b11e319801f7b947b17801178c

commit 8d52408198b8a5b11e319801f7b947b17801178c
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2018-01-19 10:38:29 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2018-01-19 10:40:13 +0000

    sys-auth/elogind: Fix boot w/ legacy-cgroupmode
    
    Closes: https://bugs.gentoo.org/644834
    Package-Manager: Portage-2.3.19, Repoman-2.3.6

 sys-auth/elogind/elogind-235.2-r1.ebuild           | 128 +++++++++++++++++++++
 .../files/elogind-235.2-legacy-cgroupmode.patch    |  56 +++++++++
 2 files changed, 184 insertions(+)