After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 748039 - wayland: gdm burns cpu time while inactive
wayland: gdm burns cpu time while inactive
Status: RESOLVED DUPLICATE of bug 747339
Product: gdm
Classification: Core
Component: general
3.16.x
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2015-04-17 11:19 UTC by Marek Chalupa
Modified: 2016-01-11 18:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Marek Chalupa 2015-04-17 11:19:43 UTC
When I log into gnome-wayland from gdm in F22 (both on hardware or in VM), then top shows that process gnome-shell --mode=gdm takes relatively big portion of CPU time (while should be rather inactive). Strace reveals that the process runs this syscalls in a loop:

recvmsg(43, 0x7fff5bf946a0, 0)          = -1 EAGAIN
poll([{fd=4, events=POLLIN}, ..., 14, 98) = 0 (Timeout)
recvmsg(43, 0x7fff5bf946a0, 0)          = -1 EAGAIN 
poll([{fd=4, events=POLLIN}, ..., 14, 0) = 0 (Timeout)
open("/proc/self/stat", O_RDONLY)       = 12
fstat(12, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
fcntl(12, F_GETFL)                      = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat(12, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fcc0c623000
read(12, "1334 (gnome-shell) R 1318 1312 1"..., 4096) = 351
read(12, "", 3072)                      = 0
close(12)                               = 0
munmap(0x7fcc0c623000, 4096)            = 0

The poll called from g_main_loop from meta_run() and the recvmsg's callstack is:

  • #0 recvmsg
    at ../sysdeps/unix/syscall-template.S line 81
  • #1 _xcb_in_read
    at xcb_in.c line 904
  • #2 poll_for_next_event
    at xcb_in.c line 639
  • #3 xcb_poll_for_event
    at xcb_in.c line 648
  • #4 poll_for_event
    at xcb_io.c line 257
  • #5 poll_for_response
    at xcb_io.c line 289
  • #6 _XEventsQueued
    at xcb_io.c line 363
  • #7 XPending
    at Pending.c line 55
  • #8 gdk_event_source_prepare
  • #9 g_main_context_prepare
    at gmain.c line 3410
  • #10 g_main_context_iterate
    at gmain.c line 3788
  • #11 g_main_loop_run
    at gmain.c line 4002
  • #12 meta_run
    at core/main.c line 437
  • #13 main
    at main.c line 463

Comment 1 Clément Guérin 2015-05-07 07:08:40 UTC
It also uses around 100MB of ram for nothing, which is quite a lot for <2GB systems.

What is the motivation for keeping gdm always running?
Comment 2 Michael Catanzaro 2016-01-11 18:17:19 UTC
(In reply to Clément Guérin from comment #1)
> It also uses around 100MB of ram for nothing, which is quite a lot for <2GB
> systems.
> 
> What is the motivation for keeping gdm always running?

See comment 20 in bug #747339.

*** This bug has been marked as a duplicate of bug 747339 ***