View previous topic :: View next topic |
Author |
Message |
brendlefly62 Apprentice


Joined: 19 Dec 2009 Posts: 169
|
Posted: Fri May 09, 2025 4:57 pm Post subject: user.name in rc-status |
|
|
Hi, on some of my systems, I've noticed a new thing ("user.<username>" service in "failed" status, shown in output of rc-status, under manual and hotplugged dynamic runlevels --
Code: | Dynamic Runlevel: hotplugged
user.joe [ failed ]
Dynamic Runlevel: needed/wanted
Dynamic Runlevel: manual
user.joe [ failed ] |
I suspect an openRC supervisor daemon? but I did not intentionally ask for this.
I am not sure when this started, where it comes from, or what to change to make it "go away"
Edit: (see below) seems to be coming from sys-apps/openrc-0.62.2 (currently in ~ status)
insights?
Last edited by brendlefly62 on Mon Jun 02, 2025 12:19 pm; edited 1 time in total |
|
Back to top |
|
 |
szatox Advocate

Joined: 27 Aug 2013 Posts: 3655
|
Posted: Fri May 09, 2025 5:08 pm Post subject: |
|
|
Supervisor reports itself differently. This thing looks related to an interactive user session, in particularly considering that something very similar has been a part of systemd for years by now.
I also only noticed it recently and haven't looked into it yet though. Try reading /etc/init.d/user, it might provide some clues.
Still, there's something really weird going in with your system. Why is a user session flagged as failed? _________________ Make Computing Fun Again |
|
Back to top |
|
 |
brendlefly62 Apprentice


Joined: 19 Dec 2009 Posts: 169
|
Posted: Mon Jun 02, 2025 12:14 pm Post subject: |
|
|
Thanks, szatox. This is not happening on all of my systems -- only on systems on which I am running openrc with ~arch (more specifically, where I am running with ACCEPT_KEYWORDS="~arm64") -- and I noticed that only on those systems on which it does happen, does /etc/init.d/user exist (owned by sys-apps/openrc-0.62.2 (which is currently in ~ status for arm64). So, as you suggested, I inspected that file --
Code: | #!/sbin/openrc-run
# Copyright (c) 2017 The OpenRC Authors.
# See the Authors file at the top-level directory of this distribution and
# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
#
# This file is part of OpenRC. It is subject to the license terms in
# the LICENSE file found in the top-level directory of this
# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
# This file may not be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
supervisor=supervise-daemon
description="starts an openrc session for an user"
user="${RC_SVCNAME#*.}"
command="/usr/libexec/rc/bin/openrc-user"
command_args="$user"
notify="fd:3"
# If it's rapidly failing, usually due to XDG_RUNTIME_DIR being unset,
# we should just quit fast.
respawn_max=3
respawn_period=5
start_pre() {
if [ "$user" = "$RC_SVCNAME" ]; then
eerror "${RC_SVCNAME} cannot be started directly. You must create"
eerror "symbolic links to it for the users you want to start"
return 1
fi
}
|
I note that eerror message that says it won't work if not symlinked. I haven't symlinked it and don't recall getting instructions to do so. So it isn't surprising that it shows "failed" on most of my systems. However, (curiously) on all but one of my five ~arm64 systems, rc-status reports that "user.joe" failed (as shown in OP) -- but on one (a rock-5c board with rk3588s SOC, that is running plasma 6 gui) it shows that it is up -
Code: | # rc-status
Runlevel: default
sysklogd [ started ]
dhcpcd [ started ]
dbus [ started ]
net.wlan0 [ started ]
netmount [ started ]
sshd [ started ]
apache2 [ started ]
chronyd [ started ]
cronie [ started ]
gpm [ started ]
display-manager [ started ]
distccd [ started ]
openvpn.remote [ started ]
rsyncd [ started ]
local [ started ]
Dynamic Runlevel: hotplugged
user.joe [ started 1 day(s) 22:03:58 (0) ] <=======
Dynamic Runlevel: needed/wanted
display-manager-setup [ started ]
Dynamic Runlevel: manual |
On that rock-5c system, as with the others, I did not create a (and there is no) symlink in /etc/init.d/ for user.joe; there is only /etc/init.d/user. I also note that display-manager-setup is the only other service shown in a "Dynamic Runlevel" part of rc-status output. So I suspect that this only working on this system because of the integration with user-login needed by the display manager on that system (and it isn't yet working on my "headless" systems that don't have that integration.
Digging deeper, I found nothing in current logs, related to "user.joe" but zgrep -i 'user.joe' /var/log/old_logs/* returned this --
Code: | /var/log # zgrep -i 'user.joe' ./old_logs/*
...
./old_logs/syslog-20250601.gz:May 31 09:36:42 rock5c6403 supervise-daemon[31995]: Supervisor command line: supervise-daemon user.joe --start --respawn-max 3 --respawn-period 5 --notify fd:3 /usr/libexec/rc/bin/openrc-user -- joe
./old_logs/syslog-20250601.gz:May 31 09:36:42 rock5c6403 supervise-daemon[31997]: Child command line: /usr/libexec/rc/bin/openrc-user joe |
So it does appear that this "interactive user session" service was started by supervise-daemon as part of some such new integration work being done on sys-apps/openrc ...
I have minimal systemd knowledge/experience, so I don't yet follow your reference to systemd doing something similar for years.
I found this bug in gentoo-BZ https://bugs.gentoo.org/347695 (open since 2010) -- summary: "We need a way for s-s-d [start-stop-daemon] to respect the limits of a user but not drop privs."
Possibly related? |
|
Back to top |
|
 |
GDH-gentoo Veteran


Joined: 20 Jul 2019 Posts: 1892 Location: South America
|
Posted: Mon Jun 02, 2025 2:09 pm Post subject: Re: user.name in rc-status |
|
|
brendlefly62 wrote: | insights? |
I believe that the user.username service in hotplugged dynamic runlevel is started by a PAM module if version 20250228 of sys-auth/pambase is installed. Currently only users on the testing branch would have that version.
EDIT: if I'm reading the code correctly (not going to install packages from the testing branch), PAM module pam_openrc would create the appropriate user.username symlink for a new logged in user in /run/openrc/init.d _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer  |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though  |
|
|
Back to top |
|
 |
Zucca Moderator


Joined: 14 Jun 2007 Posts: 4109 Location: Rasi, Finland
|
Posted: Sun Jun 08, 2025 8:23 am Post subject: |
|
|
Hm.
If I guess correctly then /run should be a zram backed mount or tmpfs.
I've moved my XDG_RUNTIME_DIR into /tmp/xdg/$USER, so there's very little happening under /run. I think OpenRC mounts it as tmpfs if it isn't already at some point in the boot process. I hope so.
I'd like to keep that in this way, in fact. Having system runtime files under /run, and users somewhere else. _________________ ..: Zucca :..
My gentoo installs: | init=/sbin/openrc-init
-systemd -logind -elogind seatd |
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|