gdm uses 100% cpu on aarch64 (fedora 33)
I'm observing that gdm
uses 100% cpu on aarch64 architecture.
Tasks: 230 total, 2 running, 228 sleeping, 0 stopped, 0 zombie
%Cpu0 : 1.2 us, 1.2 sy, 0.0 ni, 97.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu1 : 1.2 us, 0.0 sy, 0.0 ni, 98.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu2 : 73.5 us, 26.5 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu3 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 3792.1 total, 1128.8 free, 832.5 used, 1830.8 buff/cache
MiB Swap: 1896.0 total, 1896.0 free, 0.0 used. 2745.1 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
466 root 20 0 470044 8396 7336 R 100.0 0.2 247:11.42 gdm
3501 dw 20 0 236072 4268 3620 R 3.7 0.1 0:00.07 top
1 root 20 0 173528 12824 9476 S 0.0 0.3 0:05.95 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.03 kthreadd
3 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_gp
4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_par_gp
6 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/0:0H-kblockd
$ sudo strace -p 466
strace: Process 466 attached
ppoll([{fd=7, events=POLLIN}, {fd=10, events=POLLPRI}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}], 6, {tv_sec=0, tv_nsec=0}, NULL, 0) = 0 (Timeout)
ppoll([{fd=7, events=POLLIN}, {fd=10, events=POLLPRI}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}], 6, {tv_sec=0, tv_nsec=0}, NULL, 0) = 0 (Timeout)
ppoll([{fd=7, events=POLLIN}, {fd=10, events=POLLPRI}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}], 6, {tv_sec=0, tv_nsec=0}, NULL, 0) = 0 (Timeout)
ppoll([{fd=7, events=POLLIN}, {fd=10, events=POLLPRI}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}], 6, {tv_sec=0, tv_nsec=0}, NULL, 0) = 0 (Timeout)
ppoll([{fd=7, events=POLLIN}, {fd=10, events=POLLPRI}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}], 6, {tv_sec=0, tv_nsec=0}, NULL, 0) = 0 (Timeout)
ppoll([{fd=7, events=POLLIN}, {fd=10, events=POLLPRI}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}], 6, {tv_sec=0, tv_nsec=0}, NULL, 0) = 0 (Timeout)
ppoll([{fd=7, events=POLLIN}, {fd=10, events=POLLPRI}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}], 6, {tv_sec=0, tv_nsec=0}, NULL, 0) = 0 (Timeout)
ppoll([{fd=7, events=POLLIN}, {fd=10, events=POLLPRI}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}], 6, {tv_sec=0, tv_nsec=0}, NULL, 0) = 0 (Timeout)
ppoll([{fd=7, events=POLLIN}, {fd=10, events=POLLPRI}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}], 6, {tv_sec=0, tv_nsec=0}, NULL, 0) = 0 (Timeout)
ppoll([{fd=7, events=POLLIN}, {fd=10, events=POLLPRI}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}], 6, {tv_sec=0, tv_nsec=0}, NULL, 0) = 0 (Timeout)
ppoll([{fd=7, events=POLLIN}, {fd=10, events=POLLPRI}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}], 6, {tv_sec=0, tv_nsec=0}, NULL, 0) = 0 (Timeout)
ppoll([{fd=7, events=POLLIN}, {fd=10, events=POLLPRI}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}], 6, {tv_sec=0, tv_nsec=0}, NULL, 0) = 0 (Timeout)
$ sudo gdb -p 466
GNU gdb (GDB) Fedora 10.1-2.fc33
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Attaching to process 466
[New LWP 468]
[New LWP 469]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x0000007f93a745c0 in __GI___poll (fds=0x557e63b720, nfds=6, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:41
41 return SYSCALL_CANCEL (ppoll, fds, nfds, timeout_ts_p, NULL, 0);
(gdb) info thr
Id Target Id Frame
* 1 Thread 0x7f933c4010 (LWP 466) "gdm" 0x0000007f93a745c0 in __GI___poll (fds=0x557e63b720, nfds=6, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:41
2 Thread 0x7f84efeff0 (LWP 468) "gmain" 0x0000007f93a745c0 in __GI___poll (fds=0x557e5d8470, nfds=1, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:41
3 Thread 0x7f7fffeff0 (LWP 469) "gdbus" 0x0000007f93a745c0 in __GI___poll (fds=0x557e620540, nfds=3, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:41
(gdb) bt 2
#0 0x0000007f93a745c0 in __GI___poll (fds=0x557e63b720, nfds=6, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:41
#1 0x0000007f93eed840 in g_main_context_poll (priority=<optimized out>, n_fds=6, fds=0x557e63b720, timeout=<optimized out>, context=0x557e5e3af0) at ../glib/gmain.c:4422
(More stack frames follow...)
(gdb) bt
#0 0x0000007f93a745c0 in __GI___poll (fds=0x557e63b720, nfds=6, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:41
#1 0x0000007f93eed840 in g_main_context_poll (priority=<optimized out>, n_fds=6, fds=0x557e63b720, timeout=<optimized out>, context=0x557e5e3af0) at ../glib/gmain.c:4422
#2 g_main_context_iterate.constprop.0 (context=0x557e5e3af0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4114
#3 0x0000007f93e96ff0 in g_main_loop_run (loop=0x557e5f1f90) at ../glib/gmain.c:4317
#4 0x000000555c18fed8 in main (argc=<optimized out>, argv=<optimized out>) at ../daemon/main.c:395
(gdb) fr 1
#1 0x0000007f93eed840 in g_main_context_poll (priority=<optimized out>, n_fds=6, fds=0x557e63b720, timeout=<optimized out>, context=0x557e5e3af0) at ../glib/gmain.c:4422
l4422 ret = (*poll_func) (fds, n_fds, timeout);
(gdb) l
4417 LOCK_CONTEXT (context);
4418
4419 poll_func = context->poll_func;
4420
4421 UNLOCK_CONTEXT (context);
4422 ret = (*poll_func) (fds, n_fds, timeout);
4423 errsv = errno;
4424 if (ret < 0 && errsv != EINTR)
4425 {
4426 #ifndef G_OS_WIN32
(gdb) fr 2
#2 g_main_context_iterate.constprop.0 (context=0x557e5e3af0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4114
4114 g_main_context_poll (context, timeout, max_priority, fds, nfds);
(gdb) p timeout
$1 = 0
Versions: (fully updated fedora 33 to updates-testing
):
$ rpm -qa | grep -e '^gdm' -e '^gnome' | sort
gdm-3.38.2.1-1.fc33.aarch64
gdm-debuginfo-3.38.2.1-1.fc33.aarch64
gdm-debugsource-3.38.2.1-1.fc33.aarch64
gnome-abrt-1.3.6-5.fc33.aarch64
gnome-autoar-0.2.4-4.fc33.aarch64
gnome-backgrounds-3.38.0-1.fc33.noarch
gnome-bluetooth-3.34.3-1.fc33.aarch64
gnome-bluetooth-libs-3.34.3-1.fc33.aarch64
gnome-calculator-3.38.2-1.fc33.aarch64
gnome-calendar-3.38.2-1.fc33.aarch64
gnome-characters-3.34.0-4.fc33.aarch64
gnome-classic-session-3.38.2-1.fc33.noarch
gnome-clocks-3.38.0-1.fc33.aarch64
gnome-color-manager-3.36.0-3.fc33.aarch64
gnome-contacts-3.38.1-1.fc33.aarch64
gnome-control-center-3.38.2-2.fc33.aarch64
gnome-control-center-filesystem-3.38.2-2.fc33.noarch
gnome-desktop3-3.38.2-1.fc33.aarch64
gnome-disk-utility-3.38.1-1.fc33.aarch64
gnome-font-viewer-3.34.0-5.fc33.aarch64
gnome-getting-started-docs-3.38.0-1.fc33.noarch
gnome-icon-theme-3.12.0-14.fc33.noarch
gnome-initial-setup-3.38.2-1.fc33.aarch64
gnome-keyring-3.36.0-4.fc33.aarch64
gnome-keyring-pam-3.36.0-4.fc33.aarch64
gnome-logs-3.36.0-3.fc33.aarch64
gnome-maps-3.38.2-1.fc33.aarch64
gnome-menus-3.36.0-3.fc33.aarch64
gnome-online-accounts-3.38.0-1.fc33.aarch64
gnome-online-miners-3.34.0-4.fc33.aarch64
gnome-photos-3.38.0-1.fc33.aarch64
gnome-remote-desktop-0.1.9-2.fc33.aarch64
gnome-screenshot-3.38.0-1.fc33.aarch64
gnome-session-3.38.0-1.fc33.aarch64
gnome-session-wayland-session-3.38.0-1.fc33.aarch64
gnome-session-xsession-3.38.0-1.fc33.aarch64
gnome-settings-daemon-3.38.1-1.fc33.aarch64
gnome-shell-3.38.2-5.fc33.aarch64
gnome-shell-extension-apps-menu-3.38.2-1.fc33.noarch
gnome-shell-extension-background-logo-3.37.3-2.fc33.noarch
gnome-shell-extension-common-3.38.2-1.fc33.noarch
gnome-shell-extension-horizontal-workspaces-3.38.2-1.fc33.noarch
gnome-shell-extension-launch-new-instance-3.38.2-1.fc33.noarch
gnome-shell-extension-places-menu-3.38.2-1.fc33.noarch
gnome-shell-extension-window-list-3.38.2-1.fc33.noarch
gnome-software-3.38.0-2.fc33.aarch64
gnome-system-monitor-3.38.0-1.fc33.aarch64
gnome-terminal-3.38.1-2.fc33.aarch64
gnome-terminal-nautilus-3.38.1-2.fc33.aarch64
gnome-themes-extra-3.28-9.fc33.aarch64
gnome-tour-3.38.0-2.fc33.aarch64
gnome-user-docs-3.38.2-1.fc33.noarch
gnome-user-share-3.34.0-4.fc33.aarch64
gnome-video-effects-0.5.0-3.fc33.noarch
gnome-weather-3.36.1-2.fc33.noarch
Similar issue: https://www.reddit.com/r/gnome/comments/k96wzy/help_fedora_33_gdm_use_100_cpu/