ibus-* randomly use high CPU

Bug #1766503 reported by Daniel van Vugt
62
This bug affects 13 people
Affects Status Importance Assigned to Milestone
GNOME Shell
Fix Released
Unknown
The Ubuntu Power Consumption Project
Confirmed
Undecided
Unassigned
gnome-shell (Ubuntu)
Opinion
Undecided
Unassigned
ibus (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

ibus-* randomly use high CPU in Ubuntu 18.04

In fact, I think it's now using more CPU overall than the shell itself is to redraw a 4K screen:

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 3308 dan 20 0 4009804 192676 84804 R 45.7 2.4 1:13.65 gnome-shell
 3352 dan 20 0 384364 26796 20552 S 13.9 0.3 0:22.81 ibus-x11
 3372 dan 20 0 217944 10620 7764 S 10.9 0.1 0:16.20 ibus-engin+
 3350 dan 20 0 293828 10384 7516 R 10.6 0.1 0:16.54 ibus-dconf
 3346 dan 20 0 374572 11944 8268 S 10.3 0.1 0:15.93 ibus-daemon

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: ibus 1.5.17-3ubuntu4
ProcVersionSignature: Ubuntu 4.15.0-19.20-generic 4.15.17
Uname: Linux 4.15.0-19-generic x86_64
ApportVersion: 2.20.9-0ubuntu6
Architecture: amd64
Date: Tue Apr 24 15:29:07 2018
InstallationDate: Installed on 2017-12-12 (133 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20171211)
SourcePackage: ibus
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Revision history for this message
Stelios (st-roum) wrote :

i have multiple instances of ibus-x11 running simultaneously in Bionic 18.04. Up to 40% of CPU is used by them. Once i run htop, the processes automatically disappear a few seconds later and everything goes back to normal. In fact, i run htop now after every boot to deal with the problem. If i use System Activity (KDE) instead of htop, i see one entry, systemd, using up to 40% of CPU. If i kill it from there, it will reappear few minutes later.

System: Host: MyLinuxPC Kernel: 4.15.0-20-generic x86_64 bits: 64 Desktop: KDE Plasma 5.12.4
           Distro: Ubuntu 18.04 LTS
CPU: 8 core AMD FX-8320 Eight-Core (-MCP-) cache: 16384 KB

Graphics: Card: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon RX 470/480]
           Display Server: x11 (X.Org 1.19.6 ) drivers: ati,amdgpu (unloaded: modesetting,fbdev,vesa,radeon)
           Resolution: 2560x1440@59.95hz
           OpenGL: renderer: AMD Radeon RX 480 Graphics (POLARIS10 / DRM 3.23.0 / 4.15.0-20-generic, LLVM 6.0.0)
           version: 4.5 Mesa 18.0.0-rc5

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ibus (Ubuntu):
status: New → Confirmed
Changed in ubuntu-power-consumption:
status: New → Confirmed
Revision history for this message
Jay Garcia (jayg-ubu27) wrote :

I am experiencing the exact same issue as Stelios. I can run htop and everything goes back to normal.

SPECS:

Processor : 2x AMD Athlon(tm) Dual Core Processor 5050e
Memory : 4046MB
OS : Ubuntu 16.04.4 LTS

-Display-
Resolution : 2560x1024 pixels
OpenGL Renderer : GeForce GT 630/PCIe/SSE2
X11 Vendor : The X.Org Foundation
DBUS-X11 ver : 1.10.6-1ubuntu3.3

Revision history for this message
promet (prometx) wrote :

Ditto, also, I have similar experiences with "sysctrl", and a handful of "dbus" processes. It is odd how top (which I run, rather than htop), "dispells" these seconds after launch.

I am actually having thermal shutdowns in 18.04 that I have begun to attribute to these runaway background processes. I think running top may become my first line of defense as well.

Revision history for this message
Michal (michal-dobkowski) wrote :

Same here. If i open system monitor or htop app sysctrl or ibus disappear and cpu goes back to normal.

Revision history for this message
Michal (michal-dobkowski) wrote :

OK. I got it. In my case processes starts in similar way /tmp/XXX-XXX... that's was suspicious after search info about similar cases I found this:

https://ubuntuforums.org/showthread.php?t=2389313
https://www.reddit.com/r/Addons4Kodi/comments/8eto78/people_using_unofficial_kodi_addon_on_linux/

Please check if ~/.config/autostart/dbus-daemon.desktop exists.

After cleaning ~/.config/autostart/ folder situation is better also i found suspicious inictl file in ~/.cache/fontconfig

I will check files with ClamAV but this will take some time.

For now CPU usage looks good for me.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

That comment is slightly off topic here. This bug is about the ibus-* processes.

I can't reproduce the issue right now, but also have never used Kodi. I also don't use PPAs on this development system.

Revision history for this message
richud (richud.com) wrote :

same issue in 19.10 / 5.3.0-24-generic , opening system monitor does fix it, wierd.

Revision history for this message
Bruno Lustosa (bruno-lustosa) wrote :

Although not using Ubuntu directly, I am using Mint, which is based on it (Tina - 19.2, based on Bionic, MATE edition). Might be the same problem. If not applicable, then please ignore my comment.
I can reproduce this in all machines I have, in a few simple steps:

1-Open a terminal and leave 'top' open to check the processes;
2-Open 'xed'
3-Press shift inside of xed
4-Look at the terminal running top
5-To make it stop using 100% cpu, simply change focus to any window other than xed (the terminal, for example).

This happens everytime, and is really annoying. If I try to copy text (ctrl-c), it triggers the bug as well, and forces me to change focus to have the system become usable again.
I have attached a screenshot of my top output while the bug is happening. Before triggering it, all processes were running below 1% according to top.

Revision history for this message
ABIX - Adam Jurkiewicz (a-jurkiewicz) wrote :

I can confirm. My system is:

adasiek@mint-desktop:~$ lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description: Linux Mint 19.3 Tricia
Release: 19.3
Codename: tricia
adasiek@mint-desktop:~$ uname -a
Linux mint-desktop 5.0.0-32-generic #34~18.04.2-Ubuntu SMP Thu Oct 10 10:36:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

I have quite good machine:
processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 94
model name : Intel(R) Core(TM) i7-6770HQ CPU @ 2.60GHz
stepping : 3
microcode : 0xd6
cpu MHz : 1191.362
cache size : 6144 KB
physical id : 0
siblings : 8
core id : 3
cpu cores : 4

and ibus daemon is running randomly about 100% cpu. Keeping htop opened in terminal helps.

Revision history for this message
ABIX - Adam Jurkiewicz (a-jurkiewicz) wrote :

One comment. This situation does NOT happen, when I use Atom to edit.
It is happening only with Xed Editor.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Actually I have seen this a couple of times in the past week or so. I'll reconfirm if and when it happens again.

tags: added: focal
Revision history for this message
Charles Lohr (cnlohr) wrote :

I have observed this is happening Mint Mate 19.3 but also only when using Xed. I have been unable to track down this problem any further.

Revision history for this message
Charles Lohr (cnlohr) wrote :

New note. As commented here: https://github.com/linuxmint/xed/issues/237 you can make it happen by pressing control key is pressed in rapid succession.

Revision history for this message
Jadzia (jadzia2341) wrote :

Same problem here on Linux Mate 19.3 with Xed and Ibus using large amounts (up to 200 %) of CPU usage. Opening system monitor or htop stops the problem temporarily.

Revision history for this message
Dominique (scanny) wrote :

I have a
Using Linux Mint mate (Linux Mint 19.1 Tessa)
Linux 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

We are in Belgium (and ibus-deamon configured for FR-BE keyboard) where we use lot of é, è, à and sometime other likes û.
As I'm typing quite quickly and make typing faults, I also use a lot the backspace and ctrl+backspace.
As I'm also using the terminals, Shift+Ctrl+v and Shift+Ctrl+v are used a lots (sometime by mistake in regular editor like xed). Note that <Control><Shift>e is configured for emoticones in the ibus-deamon.

When taping text in xed (2.0.2)... and usually with xed, the ibus-deamon became crazy and heating CPU. It is not difficult to me identify it, computer quicly raise from 55°C to 80°C (in ~30 seconds).
This happens almost each time with xed, sometine in a minute, sometime after a while.
That's completely boring... after several weeks I did need to stop using xed !

As I'm a coder, I also use AtomIDE and I did NEVER have the issue under AtomIDE... but XED + iBus-deamon are still firing my CPU.

Kind regards,
Dominique

I

Changed in gnome-shell (Ubuntu):
status: New → Opinion
Revision history for this message
valentin cozma (vcozma) wrote :

Hi,

I'm using Mint 19.2 , I noticed if I do CTRL-z ( undo ) either in xed or gnome-calc , this will trigger high usage in ibus-daemon, ibus-x11 and xed

However, in pluma it does not .

After some seconds the CPU goes down . I noticed it in the CPU monitor applet .

100% reproductible .

xed is 2.2.3+tina
gnome-calculator is 1:3.28.2 ~ubuntu 18.04.3
ibus is 1.5.17-3ubuntu5.3

pluma is 1.20.1-3ubuntu1

lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description: Linux Mint 19.2 Tina
Release: 19.2
Codename: tina

uname -a
Linux valyelitebook 4.15.0-96-generic #97-Ubuntu SMP Wed Apr 1 03:25:46 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Hope it helps, it's really frustrating , and I think it affects more applications

( Idea IDE and Android Studio also have strange behaviours - they did not on 18.x )

Revision history for this message
valentin cozma (vcozma) wrote :

Just after finished previous comment, gnome-calculator crashed ( most probably related to CTRL-z ) .

From syslog :

Sep 11 10:44:58 valyelitebook kernel: [1645692.175240] traps: gnome-calculato[9355] trap int3 ip:7f302aceeea1 sp:7ffca1a8ae90 error:0 in libglib-2.0.so.0.5600.4[7f302ac9d000+114000]
Sep 11 10:44:58 valyelitebook systemd[1]: Started Process Core Dump (PID 13784/UID 0).
Sep 11 10:44:58 valyelitebook systemd-coredump[13785]: Process 9355 (gnome-calculato) of user 1002 dumped core.#012#012Stack trace of thread 9355:#012#0 0x00007f302aceeea1 n/a (libglib-2.0.so.0)#012#1 0x00007f302acf1819 g_log_writer_default (libglib-2.0.so.0)#012#2 0x00007f302acefa8e g_log_structured_array (libglib-2.0.so.0)#012#3 0x00007f302acf04ce g_log_structured_standard (libglib-2.0.so.0)#012#4 0x00007f3029eabc41 n/a (libgdk-3.so.0)#012#5 0x00007f3029eb8ac3 n/a (libgdk-3.so.0)#012#6 0x00007f30279068fa _XError (libX11.so.6)#012#7 0x00007f302790382b n/a (libX11.so.6)#012#8 0x00007f30279038d5 n/a (libX11.so.6)#012#9 0x00007f3027904830 _XReply (libX11.so.6)#012#10 0x00007f30276ba004 XIGetClientPointer (libXi.so.6)#012#11 0x00007f3029ea7030 n/a (libgdk-3.so.0)#012#12 0x00007f3029ea85a4 n/a (libgdk-3.so.0)#012#13 0x00007f3029eb3810 n/a (libgdk-3.so.0)#012#14 0x00007f3029eb3329 n/a (libgdk-3.so.0)#012#15 0x00007f3029e7dd70 gdk_display_get_event (libgdk-3.so.0)#012#16 0x00007f3029eb2f82 n/a (libgdk-3.so.0)#012#17 0x00007f302ace9417 g_main_context_dispatch (libglib-2.0.so.0)#012#18 0x00007f302ace9650 n/a (libglib-2.0.so.0)#012#19 0x00007f302ace96dc g_main_context_iteration (libglib-2.0.so.0)#012#20 0x00007f3029928efd g_application_run (libgio-2.0.so.0)#012#21 0x00005613cd84fbd3 n/a (gnome-calculator)#012#22 0x00007f30286c9b97 __libc_start_main (libc.so.6)#012#23 0x00005613cd84de3a n/a (gnome-calculator)#012#012Stack trace of thread 9358:#012#0 0x00007f30287bccf9 __GI___poll (libc.so.6)#012#1 0x00007f302ace95c9 n/a (libglib-2.0.so.0)#012#2 0x00007f302ace96dc g_main_context_iteration (libglib-2.0.so.0)#012#3 0x00007f30173bc36d n/a (libdconfsettings.so)#012#4 0x00007f302ad11175 n/a (libglib-2.0.so.0)#012#5 0x00007f302821e6db start_thread (libpthread.so.0)#012#6 0x00007f30287c9a3f __clone (libc.so.6)#012#012Stack trace of thread 9356:#012#0 0x00007f30287bccf9 __GI___poll (libc.so.6)#012#1 0x00007f302ace95c9 n/a (libglib-2.0.so.0)#012#2 0x00007f302ace96dc g_main_context_iteration (libglib-2.0.so.0)#012#3 0x00007f302ace9721 n/a (libglib-2.0.so.0)#012#4 0x00007f302ad11175 n/a (libglib-2.0.so.0)#012#5 0x00007f302821e6db start_thread (libpthread.so.0)#012#6 0x00007f30287c9a3f __clone (libc.so.6)#012#012Stack trace of thread 9357:#012#0 0x00007f30287bccf9 __GI___poll (libc.so.6)#012#1 0x00007f302ace95c9 n/a (libglib-2.0.so.0)#012#2 0x00007f302ace9962 g_main_loop_run (libglib-2.0.so.0)#012#3 0x00007f3029955276 n/a (libgio-2.0.so.0)#012#4 0x00007f302ad11175 n/a (libglib-2.0.so.0)#012#5 0x00007f302821e6db start_thread (libpthread.so.0)#012#6 0x00007f30287c9a3f __clone (libc.so.6)

Revision history for this message
valentin cozma (vcozma) wrote :

Wait, there's more

If I do multiple CTRL-z + Enter in gnome-calculator, the CPU goes HIGHER , and it stays there until ANY action is made ( either opening an app ( mouse or kbd shortcut, doesn't matter ) , or switch window by alt-tab or mouse )

Seems like an ibus (big?) problem .

Also seems ibus is running on multiple processes/cores ( and hangs on all of them in the end ) , is this intended ?

Changed in gnome-shell:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.