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 789634 - Inputting in Chrome URL Bar Triggering UI Freeze, pegged CPU and Major Memory Leak
Inputting in Chrome URL Bar Triggering UI Freeze, pegged CPU and Major Memory...
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: general
3.26.x
Other Linux
: Normal major
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2017-10-29 21:19 UTC by zhangwe0117
Modified: 2021-07-05 14:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The screenshot right before the bug occurs (188.38 KB, image/png)
2017-10-29 21:37 UTC, zhangwe0117
Details
Script that automatically disables key repeat when gnome-shell trips up (868 bytes, text/x-shellscript; charset=us-ascii)
2017-11-20 09:20 UTC, Chow Loong Jin
Details

Description zhangwe0117 2017-10-29 21:19:28 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
Comment 1 zhangwe0117 2017-10-29 21:37:33 UTC
Created attachment 362499 [details]
The screenshot right before the bug occurs

The screenshot right before the bug occurs
Comment 2 zhangwe0117 2017-10-29 21:39:39 UTC
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.
Comment 3 Jonas Ådahl 2017-11-07 02:06:19 UTC
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.
Comment 4 Chow Loong Jin 2017-11-20 09:17:52 UTC
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.
Comment 5 Chow Loong Jin 2017-11-20 09:20:50 UTC
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.
Comment 6 GNOME Infrastructure Team 2021-07-05 14:12:44 UTC
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.