GNOME Bugzilla – Bug 789634
Inputting in Chrome URL Bar Triggering UI Freeze, pegged CPU and Major Memory Leak
Last modified: 2021-07-05 14:12:44 UTC
OS: Ubuntu 17.10 (Linux weilong-Ubuntu 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux) GNOME version: GNOME Shell 3.26.1 Chrome version: Version 62.0.3202.75 (Official Build) (64-bit) Description: This may very likely have something to do with my Chinese input method (iBus). I encounter this consistently while the system input method is Chinese (WubiHaifeng86) but the mode within the input method is English. Inputting in Chrome URL bar is triggering UI freeze and major memory meak. The whole UI freezes and won't respond to either mouse or keyboard. Can't switch to console by Ctrl+Alt+Fx. Was able to ssh in from another machine and gather information. Reproduce Steps: 1. Switch system input method to Chinese (WubiHaifeng86) 2. Switch to English inputting mode (while system input method is still Chinese). 3. Open Chrome 4. Input some characters in URL bar and the bug should occur. If not, use Backspace to delete some and input some more. Some info: top: top - 11:35:02 up 23 min, 3 users, load average: 2.70, 2.10, 1.20 Tasks: 221 total, 4 running, 217 sleeping, 0 stopped, 0 zombie %Cpu(s): 59.1 us, 2.9 sy, 0.0 ni, 37.9 id, 0.0 wa, 0.0 hi, 0.1 si, 0.0 st KiB Mem : 8161428 total, 1386928 free, 5591952 used, 1182548 buff/cache KiB Swap: 472404 total, 472404 free, 0 used. 2244372 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 870 weilong 20 0 7634048 3.726g 100292 R 116.9 47.9 6:50.39 gnome-shell 1376 weilong 20 0 399472 40320 8032 R 91.0 0.5 4:19.32 ibus-daemon 1591 weilong 20 0 273556 32908 14976 S 26.2 0.4 1:18.30 python3 1805 weilong 20 0 1513112 260204 119888 S 10.6 3.2 1:35.11 chrome 256 root 20 0 88024 13660 12756 S 1.3 0.2 0:05.23 systemd-journal 922 weilong 20 0 732384 66480 53788 S 1.3 0.8 0:21.74 Xwayland 2211 weilong 20 0 1316096 169220 58552 S 1.0 2.1 0:13.77 chrome 2078 weilong 20 0 1164120 99948 59080 S 0.7 1.2 0:06.08 chrome 35 root 20 0 0 0 0 S 0.3 0.0 0:02.60 kworker/2:1 syslogs: Oct 29 12:58:59 weilong-Ubuntu google-chrome.desktop[10633]: Created new window in existing browser session. Oct 29 12:59:21 weilong-Ubuntu org.gnome.Shell.desktop[5354]: Key repeat discarded, Wayland compositor doesn't seem to be processing events fast enough! Oct 29 12:59:24 weilong-Ubuntu org.gnome.Shell.desktop[5354]: message repeated 105 times: [ Key repeat discarded, Wayland compositor doesn't seem to be processing events fast enough!] Oct 29 12:59:24 weilong-Ubuntu org.gnome.Shell.desktop[5354]: Key repeat discarded, Wayland compositor doesn't seem to be processing events fast enough! ^C
Created attachment 362499 [details] The screenshot right before the bug occurs The screenshot right before the bug occurs
Attaching a screenshot seconds before the issue would occur. Notice at the right top corner, the system input method is Chinese but in English inputting mode (showing a "英" character to indicate English inputting mode with Chinese Input method selected) Also, I found swapping step 2 and step 3 in reproducing steps might help reproduce the issue.
After reproducing and accessing via ssh, could you try to attach gdb and see what it is doing? You need debug symbols in order to do that. After haing installed debug symbols and the issue is happening, from the ssh session do the following: sudo gdb -p `pgrep -U $USER -x gnome-shell` Then when you are presented with a (gdb) prompt, type: thread apply all backtrace then attach the output of that as a attachment to this bug. After that you can continue it with the command "quit". The next thing that would be useful is to run the following command: perf record -e cycles:u -g --call-graph=lbr -p `pgrep -u $USER -x gnome-shell` Let it run for a few seconds, then stop it with Ctl+c Then run perf report -i perf.data > perf.txt and attach perf.txt to this bug report.
It's not only affected by Chinese input -- it can be triggered simply by cranking up key repeat rate (3ms interval), and then repeating backspace in chromium's location bar. See https://bugs.launchpad.net/gnome-shell/+bug/1731420 for alternative reproduction instructions. I'll try running the above steps when I get time later.
Created attachment 364031 [details] Script that automatically disables key repeat when gnome-shell trips up This is the kludge I'm using for the time being to avoid needing to SysRq to another TTY to recover my session every time this happens.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/ Thank you for your understanding and your help.