You are not logged in.
After upgrading to 233-6, I can no longer run tmux from systemd-run. This works before (232-something)
systemd-run --scope --user tmux
systemd-run --scope --user tmux
Job for run-r23acdbe580484da0a18cc26e940c29b0.scope failed.
See "systemctl status run-r23acdbe580484da0a18cc26e940c29b0.scope" and "journalctl -xe" for details.
Jul 05 00:23:12 alive-pc systemd[424]: run-r23acdbe580484da0a18cc26e940c29b0.scope: Failed to add PIDs to scope's control group: Permission denied
Jul 05 00:23:12 alive-pc systemd[424]: Failed to start /usr/bin/tmux.
-- Subject: Unit UNIT has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit UNIT has failed.
--
-- The result is failed.
Jul 05 00:23:12 alive-pc systemd[424]: run-r23acdbe580484da0a18cc26e940c29b0.scope: Unit entered failed state.
Is this related to this issue?
Any hint appreciated.
EDIT: Workaround required. Read this post.
Last edited by alive4ever (2017-07-13 13:13:29)
Offline
This problem still present with systemd 233-7
Offline
This problem still persist on 233.75-3
Someone brought this issue to the list with no clear solution.
Any hint is appreciated.
Offline
I am observing something similar, not the exact same but with enough similarities to suggest the same underlying problem. Since updating (from 232-8 to 233.75-3) the timers started with
systemctl --user enable something.timer
terminate when I log out from the SSH session, even though I have not set KillUserProcesses in /etc/systemd/logind.conf. There is a tmux session that I started manually after logging in and that I can detach and re-attach to between SSH sessions. So processes not started as user unit survive between sessions.
I noticed the behaviour since one of the timers is supposed to run a backup service every few hours but instead runs with every login now, blocking the login for several seconds.
Offline
Ok, it seems that the distro package maintainer enabled systemd hybrid cgroup without kernel support.
For now, I can get systemd-run --user --scope tmux to run with additional kernel parameter below.
systemd.legacy_systemd_cgroup_controller=true
For those who experience the same issue, the temporary workaround is to add the kernel parameter above.
For grub boot loader, make the following modification on /etc/default/grub and regenerate the boot entry via grub-mkconfig.
GRUB_CMDLINE_LINUX_DEFAULT="quiet systemd.legacy_systemd_cgroup_controller=true"
Thanks to David Runge for providing the hint.
For now, I'll mark this thread as solved and open a new bug report regarding hybrid cgroup enablement without kernel support.
Offline
Here is the available hirearchy for systemd cgroup, which is needed to be enabled during compile time.
AC_ARG_WITH(default-hierarchy,
AS_HELP_STRING([--with-default-hierarchy=MODE],
[default cgroup hierarchy, defaults to "hybrid"]),
[DEFAULT_HIERARCHY="$withval"],
[DEFAULT_HIERARCHY="hybrid"])
AS_CASE("$DEFAULT_HIERARCHY",
[legacy], [mode=CGROUP_UNIFIED_NONE],
[hybrid], [mode=CGROUP_UNIFIED_SYSTEMD],
[unified], [mode=CGROUP_UNIFIED_ALL],
AC_MSG_ERROR(Bad default hierarchy mode ${DEFAULT_HIERARCHY}))
AC_DEFINE_UNQUOTED(DEFAULT_HIERARCHY, [$mode], [Default cgroup hierarchy])
AC_DEFINE_UNQUOTED(DEFAULT_HIERARCHY_NAME, ["$DEFAULT_HIERARCHY"],
[Default cgroup hierarchy as string])
Without explicitly setting the default hierarchy, hybrid is selected and causes systemd-run --user --scope to break.
Offline
This kernel parameter fixes my issue as well, thank you!
Can I find out when/if the official package is fixed just by looking at the package? I'd like to run such a test during login so I get a reminder to remove the kernel param once its no longer needed.
Again, thanks a lot for putting in the effort.
Offline
This kernel parameter fixes my issue as well, thank you!
Can I find out when/if the official package is fixed just by looking at the package? I'd like to run such a test during login so I get a reminder to remove the kernel param once its no longer needed.
Again, thanks a lot for putting in the effort.
Viewing systemd compile time definition can be achieved via this command.
$ systemctl --version
systemd 233
+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN default-hierarchy=hybrid
The hybrid default hierarchy is currently problematic, so that the cgroup issue occurs.
I think legacy should be used as default cgroup-hierarchy during compile time.
You may try removing boot parameter when either systemd or kernel package is upgraded and see what happens.
Offline
See the release notes wherein "hybrid" is the recommended option: https://lists.freedesktop.org/archives/ … 38419.html
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline