Since about a week, I’ve been experiencing very slow logins. It takes about five minutes for the menu-bar to appear on the KDE desktop. This happend after a system update around a week ago (September 9).
It seems like the login is trying to start rtkit-daemon, which consistently fails to start, with an error “eventfd(): Too many open files”.
I see this error repeated in the log a number of times, until it gives up starting rtkit-daemon and finally displays the desktop.
I’ve tried to raise the max number of open files allowed, but that didn’t make the error go away.
Has anyone else been experiencing problems with slow logins or rtkit failing to start during the last week or so?
Perhaps someone has any ideas of a workaround or bugfix?
Thanks for the hints.
I’ve applied the latest updates, removed ~/.config/pulse (and also ~/.pulse and ~/.pulse-cookie), in fact, I’ve even tried logging in with a new and clean user.
I also installed pavucontrol as you suggested.
Unfortuantley it didn’t help.
This is what I see repeated in the syslog from rtkit:
2017-09-18T17:24:54.813518+02:00 linux-nm5f systemd[1]: Starting RealtimeKit Scheduling Policy Service...
2017-09-18T17:24:54.872784+02:00 linux-nm5f dbus[1190]: [system] Successfully activated service 'org.freedesktop.RealtimeKit1'
2017-09-18T17:24:54.873065+02:00 linux-nm5f rtkit-daemon[2939]: Successfully called chroot.
2017-09-18T17:24:54.873341+02:00 linux-nm5f systemd[1]: Started RealtimeKit Scheduling Policy Service.
2017-09-18T17:24:54.873526+02:00 linux-nm5f rtkit-daemon[2939]: Successfully dropped privileges.
2017-09-18T17:24:54.873653+02:00 linux-nm5f rtkit-daemon[2939]: Successfully limited resources.
2017-09-18T17:24:54.873820+02:00 linux-nm5f rtkit-daemon[2939]: eventfd() failed: Too many open files
2017-09-18T17:24:54.873937+02:00 linux-nm5f rtkit-daemon[2939]: Demoting known real-time threads.
2017-09-18T17:24:54.874049+02:00 linux-nm5f rtkit-daemon[2939]: Demoted 0 threads.
2017-09-18T17:24:54.874761+02:00 linux-nm5f dbus[1190]: [system] Activating via systemd: service name='org.freedesktop.RealtimeKit1'
unit='rtkit-daemon.service'
2017-09-18T17:24:54.875751+02:00 linux-nm5f systemd[1]: Started RealtimeKit Scheduling Policy Service.
2017-09-18T17:24:54.901545+02:00 linux-nm5f systemd[1]: rtkit-daemon.service: Main process exited, code=exited, status=1/FAILURE
2017-09-18T17:24:54.901881+02:00 linux-nm5f systemd[1]: rtkit-daemon.service: Unit entered failed state.
2017-09-18T17:24:54.902052+02:00 linux-nm5f systemd[1]: rtkit-daemon.service: Failed with result 'exit-code'.
2017-09-18T17:25:19.890794+02:00 linux-nm5f dbus[1190]: [system] Failed to activate service 'org.freedesktop.RealtimeKit1': timed out
Before the updates last week, there were no rtkit-related errors in the syslog.
As indicated already, pulseaudio uses rtkit, and pulseaudio is started during login.
I’ve tried to raise the max number of open files allowed, but that didn’t make the error go away.
And how exactly did you do that?
Maybe you’d need to actually raise the allowed number of processes though (in /etc/security/limits.conf).
I.e. try to raise the values in these two lines:
# harden against fork-bombs* hard nproc 1700
* soft nproc 1200
The nproc limits are quite low in Leap 42.3, and there already are bug reports about that.
Has anyone else been experiencing problems with slow logins or rtkit failing to start during the last week or so?
Works fine here.
But if it is about the nproc limit, it likely depends on what else is started during login.
If you keep applications running on logout, they will get restarted on login. And especially Chromium is notorious for using a lot of processes…
But if it is about the nproc limit, it likely depends on what else is started during login.
If you keep applications running on logout, they will get restarted on login. And especially Chromium is notorious for using a lot of processes…
Thanks, I’ll try that the next reboot. However I don’t keep applications running on logout and I don’t have any database servers or application servers running on this machine, so I don’t expect much of a difference.
I’m also recently experiencing this problem on leap 42.2, i.e. getting
rtkit-daemon]: eventfd() failed: Too many open files
on journalctl -u rtkit-daemon -l
I fail to see, how increasing the processes limit will help for that error and doubt very much increasing nofiles in /etc/security/limits.conf will help either, as the log contains just a line above “Successfully limited resources.”.
That was just a suggestion, because there are problems with the too low process limit in Leap.
Many things in Linux are treated like files, so it might just be a misleading error message…
Of course the actual problem might just as well be something else completely.
I’m also on Leap 42.2 here but, without any Realtime Kit issues:
In systemd:
rtkit-daemon.service disabled
(It’s started by Pulse Audio when a user logs in.)
> systemctl status rtkit-daemon.service
● rtkit-daemon.service - RealtimeKit Scheduling Policy Service
Loaded: loaded (/usr/lib/systemd/system/rtkit-daemon.service; disabled; vendor preset: disabled)
Active: active (running) since Di 2017-09-19 08:16:41 CEST; 2h 58min ago
Main PID: 4682 (rtkit-daemon)
Tasks: 3 (limit: 512)
CGroup: /system.slice/rtkit-daemon.service
└─4682 /usr/lib/rtkit/rtkit-daemon
>
Systemd Journal – this-boot:
Sep 19 08:16:41 xxx dbus[1167]: [system] Activating via systemd: service name='org.freedesktop.RealtimeKit1' unit='rtkit-daemon.service'
Sep 19 08:16:41 xxx systemd[1]: Starting RealtimeKit Scheduling Policy Service...
Sep 19 08:16:41 xxx dbus[1167]: [system] Successfully activated service 'org.freedesktop.RealtimeKit1'
Sep 19 08:16:41 xxx systemd[1]: Started RealtimeKit Scheduling Policy Service.
Sep 19 08:16:41 xxx rtkit-daemon[4682]: Successfully called chroot.
Sep 19 08:16:41 xxx rtkit-daemon[4682]: Successfully dropped privileges.
Sep 19 08:16:41 xxx rtkit-daemon[4682]: Successfully limited resources.
Sep 19 08:16:41 xxx rtkit-daemon[4682]: Running.
Sep 19 08:16:41 xxx rtkit-daemon[4682]: Canary thread running.
Sep 19 08:16:41 xxx rtkit-daemon[4682]: Successfully made thread 4681 of process 4681 (/usr/bin/pulseaudio) owned by 'yy' high priority at nice level -11.
Sep 19 08:16:41 xxx rtkit-daemon[4682]: Supervising 1 threads of 1 processes of 1 users.
Sep 19 08:16:41 xxx rtkit-daemon[4682]: Watchdog thread running.
Sep 19 08:16:41 xxx polkitd[2897]: Registered Authentication Agent for unix-session:4 (system bus name :1.39 [/usr/lib64/libexec/polkit-kde-authentication-agent-1], object path /org/kde/PolicyKit1/AuthenticationAgent, locale de_DE.UTF-8)
Sep 19 08:16:41 xxx rtkit-daemon[4682]: Supervising 1 threads of 1 processes of 1 users.
Sep 19 08:16:41 xxx rtkit-daemon[4682]: Successfully made thread 4715 of process 4681 (/usr/bin/pulseaudio) owned by 'yy' RT at priority 5.
Sep 19 08:16:41 xxx rtkit-daemon[4682]: Supervising 2 threads of 1 processes of 1 users.
Sep 19 08:16:41 xxx rtkit-daemon[4682]: Supervising 2 threads of 1 processes of 1 users.
Sep 19 08:16:41 xxx rtkit-daemon[4682]: Successfully made thread 4726 of process 4681 (/usr/bin/pulseaudio) owned by 'yy' RT at priority 5.
Sep 19 08:16:41 xxx rtkit-daemon[4682]: Supervising 3 threads of 1 processes of 1 users.
Sep 19 08:16:41 xxx rtkit-daemon[4682]: Supervising 3 threads of 1 processes of 1 users.
Sep 19 08:16:41 xxx rtkit-daemon[4682]: Successfully made thread 4729 of process 4681 (/usr/bin/pulseaudio) owned by 'yy' RT at priority 5.
Sep 19 08:16:41 xxx rtkit-daemon[4682]: Supervising 4 threads of 1 processes of 1 users.
Vanilla Leap 42.2 – Apache and Samba servers are running – ‘/etc/security/limits.conf’ only has the default “harden against fork-bombs”
* hard nproc 1700
* soft nproc 1200
root hard nproc 3000
root soft nproc 1850
[HR][/HR]Suggestion: check the user’s ‘~/.cache/’ directory and the user files in ‘/tmp/’ and ‘/var/tmp/’ – there may be some extraneous files present from a previous crash or whatever.
Please post the (user) CLI output of ‘ulimit’ and ‘ulimit -a’.
On this vanilla Leap 42.3 Laptop – no servers running and, the “rtkit-daemon” journal entries are the same as those for the Leap 42.2 system posted previously – the outputs are:
> ulimit
unlimited
> ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 28471
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 1200
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
>
Just out of interest, I git cloned the RealtimeKit sources from http://git.0pointer.net/rtkit.git/tree/ and built it, then run the resulting executabe directly from the shell
Please show the ‘rtkit-daemon’ versions you currently have on your system.
What I have here on a vanilla Leap 42.3 Laptop with a functioning Realtime Kit is:
The source code of the rtkit-daemon (version 0.11) used Leap 42.3 still has the following “Drop removed ControlGroup stanza” code in ‘rtkit-daemon.service.in’:
# Work around the fact that the Linux currently doesn't assign any RT
# budget to CPU control groups that have none configured explicitly
ControlGroup=cpu:/
But, there’s an openSUSE Patch in the openSUSE Package RPM which removes this code segment:“rtkit-0.11_git201205151338/rtkit-daemon.service.in”
There’s a couple of other patches in the openSUSE RPM as well as and also . . .
Please perform a forced re-install of the ‘rtkit’ package from the main OSS openSUSE Leap 42.3 repository.
It may be that, the RPM database and Zypper caches are not quite as the should be; therefore the following is advised before the forced re-install of the ‘rtkit’ package is performed:
Please be aware that you should use the openSUSE Build Service (a public instance of the Open Build Service (OBS)) to compile code and build packages suitable for use on openSUSE systems: <https://build.opensuse.org/>.
And yes, there seems to be some differences to the code of the src.rpm compared with the git repo. There might also be differences in autconf- and build options that affects this issue.
With the rtkit from the Leap 42.3 OSS Repository, does the ‘rtkit-daemon’ start correctly or, not?
If so, then, there’s an issue with the openSUSE build of the “rtkit” package which has been provoked by your machine (other machines, mine included, do not seem to be able to flag this issue) and, therefore, you should submit an openSUSE Bug Report against the “rtkit” package build.