Bug 391258 - baloorunner stuck on file; using large percentage CPU
Summary: baloorunner stuck on file; using large percentage CPU
Status: RESOLVED FIXED
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.43.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: baloo-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-01 13:55 UTC by Ivar Erikson
Modified: 2018-10-16 19:13 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivar Erikson 2018-03-01 13:55:27 UTC
baloorunner get stuck using more than 25% CPU, resulting in ever increasing CPU temperatures. Killed in KSysGuard made temp go down and CPU usage gone.
Comment 1 Ivar Erikson 2018-03-06 07:57:22 UTC
Using 
qdbus org.kde.baloo /fileindexer org.kde.baloo.fileindexer.currentFile

I can see that it gets stuck on files, and keep 'working' at them. Consequently the CPU usage (as seen in KSysGUard) jumps to 25% (every time), while CPU temperature (seen via Thermal Monitor widget) show abnormal increase temperature on all CPU core monitors.

There seems to be a problem with invoking search (alt+space) when this is going on. I can search for applications, but if inputting the name of a spreadsheet, there's no dropdown window showing any result.
Killing the process 'baloorunner', and waiting a little bit (10-20 seconds) will make the search box and search results reappear. Temp/load will also drop back to normal.

Running the command 
qdbus org.kde.baloo /fileindexer org.kde.baloo.fileindexer.currentFile
will show it still stuck on the offending file (in this current case, a spreadsheet (.ods))
Comment 2 Ivar Erikson 2018-03-08 14:48:15 UTC
Saw another user having the same problem on reddit
https://www.reddit.com/r/kde/comments/82ozwh/baloorunner_takes_up_25_cpu_usage/

Tried what was proposed here.


>   § balooctl status
>   § balooctl stop
>   Confirm it's no longer using crazy amounts of CPU. If it still is (after a minute), kill the process.
Baloorunner did not stop using high CPU. Killed the process via KSysGuard.

>   § balooctl monitor 
>   in a seperate terminal.

Opened a new terminal window, and ran balooctl monitor. Following output:

balooctl monitor
Baloo is not running
Press ctrl+c to exit monitor
_ (blinking cursor here, as in 'working on it')

I then opened a new tab in the new CLI window and ran:
>   § balooctl start

Ran balooctl status a few times to check for any action.
Output:
Baloo File Indexer is not running
Indexed 22061 / 22061 files
Current size of index is 18,38 GiB

I then let the CLI window sit in the background, hoping for output.


Everything was quiet for about 8 hours, when I noticed temps rising, and found baloorunner back at 25% CPU.
Ran qdbus org.kde.baloo /fileindexer org.kde.baloo.fileindexer.currentFile and found it working on a file I've recently opened (a .jpg). I proceeded to delete (shift+del) the file, and running currentFile. Found it still at the deleted file.
No output in the terminal runnint balooctl monitor. Will try the process anew with this currenc spike.
Comment 3 Ivar Erikson 2018-03-08 14:50:13 UTC
Forgot to add my system information:

Kubuntu 17.10 with backports

KDE Plasma: 5.12.3
KDE Framework: 4.43
Kernel: 4.13.0-36-generic
OS: 64 bit
Comment 4 David Ing 2018-03-10 16:46:39 UTC
I seem to be having the same issue:  baloo_file_extractor is taking 25% CPU.

$ balooctl status
Baloo File Indexer is running
Indexer state: Indexing file content
Indexed 70220 / 70595 files
Current size of index is 1,007.02 MiB

$ balooctl disable
Disabling the File Indexer

$ balooctl status
Baloo is currently disabled. To enable, please run balooctl enable

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 17.10
Release:        17.10
Codename:       artful

$ uname -r
4.13.0-36-generic

$ plasmashell --version
plasmashell 5.12.2

$ kf5-config --version
Qt: 5.9.1
KDE Frameworks: 5.43.0
kf5-config: 1.0
Comment 5 naraesk 2018-03-11 12:24:02 UTC
Same here. baloorunner got stuck and uses 25% CPU without any progress. 

$qdbus org.kde.baloo /fileindexer org.kde.baloo.fileindexer.currentFile

$ balooctl monitor
Press ctrl+c to exit monitor

$ plasmashell --version
plasmashell 5.12.3

$ kf5-config --version
Qt: 5.10.1
KDE Frameworks: 5.43.0
kf5-config: 1.0
Comment 6 joergister 2018-05-01 12:55:16 UTC
This is an old bug that already existed in the backports of kubuntu 16.04.



It is already filed here https://bugs.kde.org/show_bug.cgi?id=333655 and here https://bugs.kde.org/show_bug.cgi?id=391258






according to dedoimedo this bug is still present in kubuntu 18.05 https://www.dedoimedo.com/computers/kubuntu-beaver.html
Comment 7 joergister 2018-05-01 13:00:27 UTC
Sorry I meant https://bugs.kde.org/show_bug.cgi?id=332421
Comment 8 joergister 2018-05-01 13:00:37 UTC
Sorry I meant https://bugs.kde.org/show_bug.cgi?id=332421
Comment 9 Stefan Brüns 2018-05-03 22:37:34 UTC
Git commit f57c4bc27b81f2b40d910d376a0bb531cd8472c6 by Stefan Brüns.
Committed on 03/05/2018 at 22:37.
Pushed by bruns into branch 'master'.

Avoid infinite loops when fetching the URL from DocumentUrlDB

Summary:
Some users apparently have DBs which contain infinite loops in the idTree
(a parentId pointing to itself or one of its children). This manifests in
either crashes due to exhausted memory and/or the process being stuck
with 100% CPU load.

The problem can only be completely solved by either recreating the DB, or
by cleaning the DB from any problematic records. As in interim solution,
stop the code from crashing.
Related: bug 378754, bug 385846, bug 393181

Reviewers: #baloo, michaelh, #frameworks, ngraham

Reviewed By: ngraham

Subscribers: ngraham, #frameworks

Tags: #frameworks, #baloo

Differential Revision: https://phabricator.kde.org/D12335

M  +10   -2    src/engine/documenturldb.cpp

https://commits.kde.org/baloo/f57c4bc27b81f2b40d910d376a0bb531cd8472c6