Bug 443693

Summary: Clicking pause indexer should pause the Baloo indexer, but it doesn't
Product: systemsettings Reporter: Adam Fontenot <adam.m.fontenot+kde>
Component: kcm_balooAssignee: baloo-bugs-null
Status: RESOLVED FIXED    
Severity: normal CC: nate, plasma-bugs
Priority: NOR    
Version: 5.22.5   
Target Milestone: ---   
Platform: Archlinux Packages   
OS: Linux   
Latest Commit: Version Fixed In: 5.24

Description Adam Fontenot 2021-10-14 06:24:15 UTC
SUMMARY

When clicking "Pause Indexer" to pause file indexing in the File Search KCM, most users will expect indexing to be paused. But if the indexer is in the middle of extracting text from a file, clicking the button seemingly does nothing at all.

STEPS TO REPRODUCE
1. Get into a situation where baloo_file_extractor is using way too much CPU or memory and needs to be paused because it's slowing the rest of the system down.
2. Click "Pause Indexer".

OBSERVED RESULT

Nothing at all happens. In my case, I verified with lsof that baloo_file_extractor was working on one specific file continuously. It was using 100% of one CPU core and about 1 GB of memory. After clicking the button, it continued using 100% of one CPU core and 1 GB of memory for several minutes. I gave up and SIGKILLed it.

EXPECTED RESULT

Baloo *instantly* terminates all running baloo_file_extractor instances until the appropriate time to unpause the indexer. (When is that, exactly? The KCM interface provides no hints.)

If for some reason that is not possible (e.g. the state of the extractor must be kept in memory or be lost completely, and the latter is considered unacceptable), at the very least the process should be sent a signal to sleep until woken up so that it won't use any CPU.

Reasoning: ordinary users should not be expected to have to terminate system processes that are malfunctioning. Those who do are likely to be frustrated when some time later, Baloo starts indexing again and they run into the same problem. Rather, managing Baloo should be possible in the GUI without disabling it completely. This means that it needs to instantly respond to the user's commands, even if this behavior seems suboptimal from the point of view of the program.

SOFTWARE/OS VERSIONS
Linux: Arch Linux x86_64 (kernel 5.14.9)
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Comment 1 Nate Graham 2021-10-14 23:18:27 UTC
Yeah this does sometimes happen.
Comment 2 Nate Graham 2022-01-04 04:10:29 UTC
Fixed by Yerrey Dev with https://invent.kde.org/plasma/plasma-desktop/-/commit/7206fd574e636fe1d5056f398182e6e3439045d1 in Plasma 5.24!