Bug 383443 - Infinite loop in baloo_file_extr due to incorrect parentId
Summary: Infinite loop in baloo_file_extr due to incorrect parentId
Status: RESOLVED FIXED
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: Baloo File Daemon (show other bugs)
Version: 5.34.0
Platform: Gentoo Packages Linux
: NOR grave
Target Milestone: ---
Assignee: Pinak Ahuja
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-13 06:31 UTC by Marco Leise
Modified: 2018-10-31 17:32 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 Marco Leise 2017-08-13 06:31:44 UTC
I think it was after using git stash [pop] a few times that Baloo started running an infinite loop here: https://github.com/KDE/baloo/blob/v5.34.0/src/engine/documenturldb.cpp#L141
Apparently two file name IDs became each other's parents forming an infinite loop. I can't tell how it got there, but here is a reconstruction of the file path data structure from the top level to the loop:

                                      docId   :29280948130416642 ->
name:"helpers.new.2",                 parentId:29280922360612866 ->
name:"generate unicode tables.dproj", parentId:29278212236249090 ->
name:"mono-d",                        parentId:29280922360612866 -> [loop]

On the filesystem I have sort of a backup copy of a few files including all of the above. So a first hint is that it might have to do with name collisions:

./source/fast/internal/helpers.new.2
./mono-d/generate unicode tables.dproj
./delme/helpers.new.2
./delme/mono-d/generate unicode tables.dproj

There are more files in the directories, but these are all which match the names I could extract from debugging. The grave issue with this is that it will not only keep one CPU core busy, but also consume all system memory from concatenating path elements ad infinitum.
Comment 1 Stefan Brüns 2018-10-31 17:32:05 UTC
https://phabricator.kde.org/D12335