Bug 370963 - baloo_file_extractor stalls searching while still consuming 100% CPU
Summary: baloo_file_extractor stalls searching while still consuming 100% CPU
Status: RESOLVED FIXED
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: Baloo File Daemon (show other bugs)
Version: 5.18.0
Platform: Kubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Pinak Ahuja
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-16 16:01 UTC by Stephan Herrmann
Modified: 2018-10-31 17:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann 2016-10-16 16:01:08 UTC
This may have started with the upgrade of Kubuntu to version 16.04 (16.04.1 to be precise):
System is stressed by baloo_file_extractor.

I would actually like to give baloo a chance, so I looked a little deeper:

balooctl status shows a constant number of indexed files, here "Indexed 75139 / 201948 files".
The first number will never increase, although baloo_file_extractor shows in top with high CPU consumption.

Next, I tried to figure out if it stops at a particular file, so I run baloo_file_extractor through strace. Interestingly it never touches any files in my home directory aside from some configuration files (and searching ~/bin for some executables).

Here's the last interesting stuff before it goes into what looks like an infinite loop:

stat64("/home/stephan/.local/share/baloo", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
stat64("/home/stephan/.local/share/baloo/index", {st_mode=S_IFREG|0664, st_size=136454144, ...}) = 0
open("/home/stephan/.local/share/baloo/index-lock", O_RDWR|O_CREAT|O_CLOEXEC, 0664) = 15
open("/home/stephan/.local/share/baloo/index", O_RDWR|O_CREAT, 0664) = 16
open("/home/stephan/.local/share/baloo/index", O_RDWR|O_DSYNC) = 17
stat64("", 0xbfc509fc)                  = -1 ENOENT (No such file or directory)
stat64("", 0xbfc509fc)                  = -1 ENOENT (No such file or directory)
stat64("/usr/lib/i386-linux-gnu/qt5/plugins/accessible/.", 0xbfc5066c) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/accessible/.", 0xbfc5066c) = -1 ENOENT (No such file or directory)
stat64("", 0xbfc509fc)                  = -1 ENOENT (No such file or directory)
stat64("", 0xbfc509fc)                  = -1 ENOENT (No such file or directory)

(quickly creating millions of entries of the last kind).

At one point lsof told me that baloo_file_extractor holds a handle to .xsession-errors which was also growing very large, but I cannot prove that this is due to baloo. Here's a typical entry in .xsession-errors (repeated no end):
log_kioremote: RemoteDirNotify::FilesChanged
()
()
()
log_kioremote: RemoteDirNotify::FilesChanged
()
()



Reproducible: Always

Steps to Reproduce:
Running Kubuntu with no baloo-related configuration changes.
Comment 1 Stefan Brüns 2018-10-31 17:48:32 UTC
Running baloo_file_extractor on its own is pointless as it receives the list of files via pipe from its parent process.

Lack of progress hints at a crashed indexer process, which has been fixed:
https://phabricator.kde.org/D16266