Bug 419043 - baloo_file_extractor seemingly hangs in infinite loop due to DB problems, hogs CPU
Summary: baloo_file_extractor seemingly hangs in infinite loop due to DB problems, hog...
Status: RESOLVED DUPLICATE of bug 425017
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: Baloo File Daemon (show other bugs)
Version: 5.67.0
Platform: Other Linux
: HI major
Target Milestone: ---
Assignee: Stefan Brüns
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-20 10:39 UTC by Sebastian
Modified: 2020-08-06 02:24 UTC (History)
1 user (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 Sebastian 2020-03-20 10:39:34 UTC
SUMMARY
baloo_file_extractor consumes excessive amounts of CPU time while failing to put some data into the DB; which is failing for a few hours now.

This is a company workstation, hence I can't just check the users files. As a workaround we're now outright disabling baloo system-wide.

> KiB Mem : 32821712 total,   240112 free, 29828712 used,  2752888 buff/cache
> KiB Swap: 16779260 total, 13479084 free,  3300176 used.  2507532 avail Mem 
>   
>     PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                        
> 2247542 redacted  39  19  270,6g  13,9g   9668 S  32,9  44,3 336:46.12 baloo_file_extr                                                                                                
> 2247541 redacted  39  19  270,7g  13,3g   9552 S  31,2  42,5 325:26.98 baloo_file_extr                                                                                                
>  646542 root      20   0  454160 273636 272428 S  22,9   0,8 288:38.48 systemd-journal

Note the two processes for baloo_file_extract (for the same user). Might be some locking issue, or just a red herring.

journalctl is full of
> Mar 20 10:34:15 walle baloo_file_extractor[2247542]: org.kde.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
> Mar 20 10:34:15 walle baloo_file_extractor[2247542]: org.kde.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
> Mar 20 10:34:15 walle baloo_file_extractor[2247542]: org.kde.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
> Mar 20 10:34:15 walle baloo_file_extractor[2247542]: org.kde.baloo.engine: Transaction::commit MDB_BAD_TXN: Transaction must abort, has a child, or is invalid


EXPECTED RESULT
Whatever causes the underlying database problems, the process should probably give up after a few thousand database errors and try to log a sane error message - instead of hogging the CPU.

SOFTWARE/OS VERSIONS
Manjaro Linux 5.4.15-2-MANJARO
balooctl --version reports 5.67.0
I'm remote, plasmashell doesn't seem to have a --version or -v, but should be a recent version.
The release notes at https://kde.org/announcements/kde-frameworks-5.68.0.php don't mention anything like this, and git log comments also don't look like it (I did not look at the actual commits).
Comment 1 Stefan Brüns 2020-08-06 02:24:14 UTC
See 425017. Fixed in KF 5.73

*** This bug has been marked as a duplicate of bug 425017 ***