Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gnome-shell gnome-shell
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,805
    • Issues 1,805
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 117
    • Merge requests 117
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • gnome-shellgnome-shell
  • Issues
  • #4159

Closed
Open
Created Apr 21, 2021 by Jonas Hahnfeld@hahnjo

High CPU usage since update to GNOME 40

Affected version

  • Arch Linux
  • gnome-shell 1:40.0+39+gd9e953e9-1
  • glib2 2.68.1-1
  • on i915, running Wayland

Bug summary

After a while (possibly related to the number of suspend-resume cycles), gnome-shell starts to use 100% CPU (one core).

Steps to reproduce

Just wait. It has occurred already three times after rebooting, but not immediately. May be related to suspend and resume cycles (I'm on a laptop).

What happened

The gnome-shell process starts to use 100% (one core) after a while.

What did you expect to happen

gnome-shell should use as little CPU as before the upgrade to 40.0 😃

Relevant logs, screenshots, screencasts etc.

When attaching with gdb and running thread apply all bt, I see that the LWP ID of one pool-gnome-shel thread is steadily increasing (spawning and killing them, I suppose). The stack trace is (sorry, no debugging symbols yet, but I'm not sure how helpful that would be):

#0 0x00007f3a8e1dba9d in syscall () at /usr/lib/libc.so.6
#1 0x00007f3a8eff106b in g_cond_wait_until () at /usr/lib/libglib-2.0.so.0
#2 0x00007f3a8ef728b3 in () at /usr/lib/libglib-2.0.so.0
#3 0x00007f3a8ef72a44 in g_async_queue_timeout_pop () at /usr/lib/libglib-2.0.so.0
#4 0x00007f3a8efd3d2a in () at /usr/lib/libglib-2.0.so.0
#5 0x00007f3a8efd10c1 in () at /usr/lib/libglib-2.0.so.0
#6 0x00007f3a8d71f299 in start_thread () at /usr/lib/libpthread.so.0
#7 0x00007f3a8e1e1053 in clone () at /usr/lib/libc.so.6

strace shows the following repeated sequence that may be responsible:

getpid()                                = 913
ioctl(16, DRM_IOCTL_I915_GEM_BUSY, 0x7fff77dd8bb0) = 0
getpid()                                = 913
ioctl(16, DRM_IOCTL_I915_GEM_EXECBUFFER2, 0x7fff77dd8b50) = 0
ioctl(16, DRM_IOCTL_I915_GEM_MADVISE, 0x7fff77dd8ac4) = 0
ioctl(16, DRM_IOCTL_I915_GEM_MADVISE, 0x7fff77dd8a74) = 0
ioctl(16, DRM_IOCTL_I915_GEM_BUSY, 0x7fff77dd899c) = 0
ioctl(16, DRM_IOCTL_I915_GEM_MADVISE, 0x7fff77dd899c) = 0
ioctl(16, DRM_IOCTL_SYNCOBJ_CREATE, 0x7fff77dd8ae0) = 0
ioctl(16, DRM_IOCTL_SYNCOBJ_DESTROY, 0x7fff77dd8c80) = 0
getpid()                                = 913
kcmp(913, 913, KCMP_FILE, 15, 16)       = 0
getpid()                                = 913
kcmp(913, 913, KCMP_FILE, 15, 16)       = 0
getpid()                                = 913
kcmp(913, 913, KCMP_FILE, 15, 16)       = 0
ioctl(11, DRM_IOCTL_MODE_ADDFB2, 0x7fff77dd8c00) = 0
ioctl(11, DRM_IOCTL_MODE_ATOMIC, 0x7fff77dd8c30) = 0
recvmsg(60, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily unavailable)
sendmsg(112, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="A\0\0\0\0\0\f\0\340\350\260\4\1\0\0\0\1\0\f\0A\0\0\0", iov_len=24}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 24
poll([{fd=4, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=11, events=POLLIN}, {fd=32, events=POLLIN}, {fd=38, events=POLLIN}, {fd=40, events=POLLIN}, {fd=47, events=POLLIN}, {fd=50, events=POLLIN}, {fd=54, events=POLLIN}, {fd=57, events=POLLIN}, {fd=60, events=POLLIN}, {fd=73, events=POLLIN}], 13, 46) = 1 ([{fd=11, revents=POLLIN}])
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
read(11, "\2\0\0\0 \0\0\0\360f\0x:\177\0\0n3\1\0\345\235\f\0\261OB\0H\0\0\0", 1024) = 32
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
recvmsg(60, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=11, events=POLLIN}, {fd=32, events=POLLIN}, {fd=38, events=POLLIN}, {fd=40, events=POLLIN}, {fd=47, events=POLLIN}, {fd=50, events=POLLIN}, {fd=54, events=POLLIN}, {fd=57, events=POLLIN}, {fd=60, events=POLLIN}, {fd=73, events=POLLIN}], 13, 0) = 1 ([{fd=4, revents=POLLIN}])
read(4, "\2\0\0\0\0\0\0\0", 16)         = 8
ioctl(11, DRM_IOCTL_MODE_RMFB, 0x7fff77dd92ec) = 0
recvmsg(60, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=11, events=POLLIN}, {fd=32, events=POLLIN}, {fd=38, events=POLLIN}, {fd=40, events=POLLIN}, {fd=47, events=POLLIN}, {fd=50, events=POLLIN}, {fd=54, events=POLLIN}, {fd=57, events=POLLIN}, {fd=60, events=POLLIN}, {fd=73, events=POLLIN}], 13, 35) = 1 ([{fd=7, revents=POLLIN}])
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
epoll_wait(7, [{events=EPOLLIN, data={u32=2081788848, u64=139889166619568}}], 32, 0) = 1
recvmsg(112, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="0\0\0\0\1\0\24\09\0\0\0\0\0\0\0\0\0\0\0000\0\0\0\10\0\f\0\1\0\0\0"..., iov_len=3092}, {iov_base="", iov_len=1004}], msg_iovlen=2, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_CMSG_CLOEXEC) = 188
ioctl(16, DRM_IOCTL_I915_GEM_BUSY, 0x7fff77dd8610) = 0
ioctl(16, DRM_IOCTL_I915_GEM_BUSY, 0x7fff77dd843c) = 0
ioctl(16, DRM_IOCTL_I915_GEM_MADVISE, 0x7fff77dd843c) = 0
ioctl(16, DRM_IOCTL_I915_GEM_SET_TILING, 0x7fff77dd84d0) = 0
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
recvmsg(60, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily unavailable)
sendmsg(112, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\0\0\0\1\0\f\0A\0\0\09\0\0\0\0\0\10\0", iov_len=20}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 20
poll([{fd=4, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=11, events=POLLIN}, {fd=32, events=POLLIN}, {fd=38, events=POLLIN}, {fd=40, events=POLLIN}, {fd=47, events=POLLIN}, {fd=50, events=POLLIN}, {fd=54, events=POLLIN}, {fd=57, events=POLLIN}, {fd=60, events=POLLIN}, {fd=73, events=POLLIN}], 13, 0) = 1 ([{fd=4, revents=POLLIN}])
read(4, "\4\0\0\0\0\0\0\0", 16)         = 8
getpid()                                = 913
ioctl(16, DRM_IOCTL_I915_GEM_BUSY, 0x7fff77dd8bb0) = 0
getpid()                                = 913
ioctl(16, DRM_IOCTL_I915_GEM_EXECBUFFER2, 0x7fff77dd8b50) = 0
ioctl(16, DRM_IOCTL_I915_GEM_MADVISE, 0x7fff77dd8ac4) = 0
ioctl(16, DRM_IOCTL_I915_GEM_MADVISE, 0x7fff77dd8a74) = 0
ioctl(16, DRM_IOCTL_I915_GEM_BUSY, 0x7fff77dd899c) = 0
ioctl(16, DRM_IOCTL_I915_GEM_MADVISE, 0x7fff77dd899c) = 0
ioctl(16, DRM_IOCTL_SYNCOBJ_CREATE, 0x7fff77dd8ae0) = 0
ioctl(16, DRM_IOCTL_SYNCOBJ_DESTROY, 0x7fff77dd8c80) = 0
getpid()                                = 913
kcmp(913, 913, KCMP_FILE, 15, 16)       = 0
getpid()                                = 913
kcmp(913, 913, KCMP_FILE, 15, 16)       = 0
getpid()                                = 913
kcmp(913, 913, KCMP_FILE, 15, 16)       = 0
Assignee
Assign to
Time tracking