Bug 375396

Summary: Opening files with krunner can spawn subprocesses which use 100% CPU
Product: [Plasma] krunner Reporter: kafei <matthewisrippin>
Component: generalAssignee: Kai Uwe Broulik <kde>
Status: RESOLVED FIXED    
Severity: major    
Priority: NOR    
Version First Reported In: 5.8.5   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: htop screenshot of krunner cpu usage
Open file handles for krunner parent and child

Description kafei 2017-01-22 00:55:09 UTC
Created attachment 103579 [details]
htop screenshot of krunner cpu usage

My system was acting sluggish today, so I opened htop to discover that krunner had pegged all 4 of my cores at 100% usage! It seemed to have spawned 4 subprocesses, each of which was using 100% of a core.

I restarted my PC and my CPU usage was normal again. I managed to reproduce the bug as follows (with opening krunner by pressing alt+space):

* Start okular through krunner: CPU usage normal
* Search for a PDF through krunner and open it in the previous okular instance: one core starts running at 100%
* Search and open a second PDF: a second core starts running at 100%
* Try opening a few more PDFs: no change in CPU usage, still 2 cores pegged at 100%
* Open gwenview through krunner: no change
* Try opening another PDF: a third core starts running at 100%
* Open spectacle through krunner: a fourth core starts running at 100%

So the bug is reproducible after using krunner enough times, but not every usage results in another subprocess being spawned using 100% CPU.

I've attached a screenshot of htop, as well as the open file handles for both the parent krunner process and one of the children using 100% CPU. Bug 364268 also seems to describe this problem, however I can confirm that the bug does not only happen when opening OpenGL apps.

System specs:
Kernel version: 4.8.13-1-ARCH
plasma version: 5.8.5
kf5 version: 5.30.0
kapps version: 16.12.1
CPU: i5-4690K
GPU: Nvidia GTX 970 with proprietary driver, version 375.26
Comment 1 kafei 2017-01-22 00:59:05 UTC
Created attachment 103580 [details]
Open file handles for krunner parent and child

It's strange how krunner has open file handles to /dev/nvidia0 and the like... I suppose krunner somehow uses GPU acceleration?
Comment 2 Christoph Feck 2017-01-25 02:27:27 UTC
Yes, krunner uses QtQuick, which uses OpenGL GPU for rendering.
Comment 3 kafei 2017-02-08 01:40:44 UTC
I seem to be unable to reproduce this bug after updating to Plasma 5.9.1. There isn't much in the changelog related to krunner, but perhaps the bug was elsewhere.
Comment 4 kafei 2017-02-15 06:44:01 UTC
I still haven't been able to reproduce this over the past week, and can't reproduce it now with Plasma 5.9.2, so I'm going to close this.