Bug#956837: libwebkit2gtk-4.0-37: excess wakeups since 2.28.0-2

Tomas Janousek tomi at nomi.cz
Wed Apr 15 20:23:40 BST 2020


Package: libwebkit2gtk-4.0-37
Version: 2.28.1-1
Severity: normal
Tags: upstream
Forwarded: https://bugs.webkit.org/show_bug.cgi?id=210561

Since upgrading to 2.28.0-2, /usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/WebKitWebProcess
polls like mad and causes excessive wakeups, draining my laptop battery:

$ ps axfu
[...]
tomi      243322 15.0  0.2 102683612 96224 ?     Sl   17:53   0:00 liferea
tomi      243332  4.7  0.2 102722076 90816 ?     SLl  17:53   0:00  \_ /usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/WebKitWebProcess 7 19
tomi      243333  1.5  0.1 103007620 53204 ?     SLl  17:53   0:00  \_ /usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/WebKitNetworkProcess 8 1

$ LANG=C strace -f -p 243332
strace: Process 243332 attached with 11 threads
[pid 243360] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 243359] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 243357] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 243356] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 243355] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 243344] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 243343] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 243342] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 243341] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 243340] futex(0x7f14fb18c7cc, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 243332] restart_syscall(<... resuming interrupted read ...>) = 0
[pid 243332] recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 243332] poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}], 2, 17) = 0 (Timeout)
[pid 243332] recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 243332] poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}], 2, 16) = 0 (Timeout)
[pid 243332] recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 243332] poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}], 2, 16) = 0 (Timeout)
[pid 243332] recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 243332] poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}], 2, 16) = 0 (Timeout)
[pid 243332] recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 243332] poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}], 2, 15) = 0 (Timeout)
[pid 243332] recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 243332] poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}], 2, 16) = 0 (Timeout)
[pid 243332] recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 243332] poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}], 2, 16) = 0 (Timeout)
[pid 243332] recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 243332] poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}], 2, 16) = 0 (Timeout)

I originally thought this is a regression since 2.26.4-1~deb10u2, as that
works just fine:

$ LANG=C strace -f -p 253200
strace: Process 253200 attached with 11 threads
[pid 253226] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 253223] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 253222] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 253221] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 253220] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 253212] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 253211] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 253210] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 253209] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 253208] futex(0x7fcbcfee040c, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 253200] restart_syscall(<... resuming interrupted read ...>) = 0
[pid 253200] recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 253200] poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}], 2, 19885 <unfinished ...>

But it turns out visiting
https://en.wikipedia.org/wiki/GIF#/media/File:Rotating_earth_(large).gif using
surf and webkit 2.26.4-1~deb10u2 makes its WebKitWebProcess start polling like
crazy as well, and forever, even after switching to about:blank.

I went a bit further, found a probable cause and filed this upstream at
https://bugs.webkit.org/show_bug.cgi?id=210561 as I'm quite certain this is
affecting all distributions that use webgit2gtk.

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (990, 'testing'), (990, 'stable'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable-debug'), (500, 'unstable'), (500, 'stable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.4.0-4-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_USER, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=cs_CZ.UTF-8, LC_CTYPE=cs_CZ.UTF-8 (charmap=UTF-8), LANGUAGE=cs_CZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libwebkit2gtk-4.0-37 depends on:
ii  bubblewrap                      0.4.1-1
ii  libatk1.0-0                     2.36.0-2
ii  libc6                           2.30-4
ii  libcairo2                       1.16.0-4
ii  libegl1                         1.3.1-1
ii  libenchant-2-2                  2.2.8-1
ii  libfontconfig1                  2.13.1-2+b1
ii  libfreetype6                    2.10.1-2
ii  libgcc-s1                       10-20200324-1
ii  libgcrypt20                     1.8.5-5
ii  libgdk-pixbuf2.0-0              2.40.0+dfsg-4
ii  libgl1                          1.3.1-1
ii  libglib2.0-0                    2.64.1-1
ii  libgstreamer-gl1.0-0            1.16.2-4
ii  libgstreamer-plugins-base1.0-0  1.16.2-4
ii  libgstreamer1.0-0               1.16.2-2
ii  libgtk-3-0                      3.24.18-1
ii  libharfbuzz-icu0                2.6.4-1
ii  libharfbuzz0b                   2.6.4-1
ii  libhyphen0                      2.8.8-7
ii  libicu63                        63.2-3
ii  libjavascriptcoregtk-4.0-18     2.28.1-1
ii  libjpeg62-turbo                 1:1.5.2-2+b1
ii  libnotify4                      0.7.9-1
ii  libopenjp2-7                    2.3.1-1
hi  libpango-1.0-0                  1.42.4-8
ii  libpng16-16                     1.6.37-2
ii  libseccomp2                     2.4.3-1+b1
ii  libsecret-1-0                   0.20.2-1
ii  libsoup2.4-1                    2.70.0-1
ii  libsqlite3-0                    3.31.1-4
ii  libstdc++6                      10-20200324-1
ii  libtasn1-6                      4.16.0-2
ii  libwayland-client0              1.18.0-1
ii  libwayland-egl1                 1.18.0-1
ii  libwayland-server0              1.18.0-1
ii  libwebp6                        0.6.1-2+b1
ii  libwebpdemux2                   0.6.1-2+b1
ii  libwoff1                        1.0.2-1+b1
ii  libwpe-1.0-1                    1.6.0-1
ii  libwpebackend-fdo-1.0-1         1.6.0-1
ii  libx11-6                        2:1.6.9-2
ii  libxcomposite1                  1:0.4.4-2
ii  libxdamage1                     1:1.1.5-1
ii  libxml2                         2.9.10+dfsg-4
ii  libxslt1.1                      1.1.34-4
ii  xdg-dbus-proxy                  0.1.2-1
ii  zlib1g                          1:1.2.11.dfsg-2

Versions of packages libwebkit2gtk-4.0-37 recommends:
ii  gstreamer1.0-gl            1.16.2-4
ii  gstreamer1.0-libav         1.16.2-2
ii  gstreamer1.0-plugins-good  1.16.2-3
ii  gstreamer1.0-pulseaudio    1.16.2-3
ii  libgl1-mesa-dri            19.3.3-1

libwebkit2gtk-4.0-37 suggests no packages.

-- no debconf information

-- 
Tomáš Janoušek, a.k.a. Pivník, a.k.a. Liskni_si, http://work.lisk.in/



More information about the Pkg-webkit-maintainers mailing list