Created attachment 111107 [details] baloo_file gdb trace with thread apply all bt I've detected that there's always a running baloo_file process belonging to my userid even if I've logout from Xorg, and no sessions are still running. We tried to fix it (see proposed patch) but there's still problems. Can we have some inputs from upstream ?
Created attachment 111108 [details] Patch helping in closing baloo_file
Created attachment 111109 [details] baloo_file lsof example Here the list of file open by baloo_file
balooctl status Baloo File Indexer is running Indexer state: Idle Indexed 186431 / 186431 files Current size of index is 11,41 GiB balooctl indexSize Actual Size: 11,41 GiB Expected Size: 8,73 GiB PostingDB: 2,19 GiB 298.355 % PosistionDB: 3,50 GiB 477.935 % DocTerms: 1,66 GiB 226.418 % DocFilenameTerms: 17,77 MiB 2.366 % DocXattrTerms: 0 B 0.000 % IdTree: 3,45 MiB 0.460 % IdFileName: 13,59 MiB 1.811 % DocTime: 8,30 MiB 1.106 % DocData: 20,01 MiB 2.666 % ContentIndexingDB: 0 B 0.000 % FailedIdsDB: 0 B 0.000 % MTimeDB: 3,84 MiB 0.512 % To be clear, if I issue the balooctl stop command the process die correctly. But that should be the case if I logout of plasma5.
Same for me. It has been on my to-do list for quite some time now. Regarding your patch, thanks, I'll test it. If you post it on phabricator.kde.org within the next few days and it's valid, you'll get all the merits. Otherwise I will :-)
Hi Michael, unfortunately the patch is not ok. the gdb attached is after applying it. And credits goes to Fabian. We can eventually work on phab, but I guess once we have a real and complete solution. If you find complementary code to fix, I can quite easily integrate it, build and test.
(In reply to Michael Heidelbach from comment #4) > Same for me. > It has been on my to-do list for quite some time now. > > Regarding your patch, thanks, I'll test it. If you post it on > phabricator.kde.org within the next few days and it's valid, you'll get all > the merits. Otherwise I will :-) The patch is just a workaround for two bugs: a) The quit() method on FileContentIndexer doesn't exit the event loop of the thread. b) The ExtractorProcess gets stuck if the QProcess dies for whatever reason. The workaround for a) will just terminate the event loop, whatever side effects that might cause. The workaround for b) emits done() if the process dies or quits, which isn't good either.
(In reply to Bruno Friedmann from comment #3) > To be clear, if I issue the balooctl stop command the process die correctly. > But that should be the case if I logout of plasma5. It also exits with this: $ cat <<EOF>~/.config/plasma-workspace/shutdown/stop-baloo #!/bin/bash balooctl stop EOF $ chmod +x ~/.config/plasma-workspace/shutdown/stop-baloo A workaround, of course.
This will be fixed in Plasma 5.21 with systemd startup; Baloo is now run as a systemd unit all of whose children will be stopped on logout.