Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 508556 - kde-base/krunner-4.13.0: desktop search consumes huge memory
Summary: kde-base/krunner-4.13.0: desktop search consumes huge memory
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-23 22:01 UTC by Kroz
Modified: 2014-08-13 17:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Screenshot with output of htop, iotop, vmstat and free commands (status.png,763.00 KB, image/png)
2014-04-23 22:01 UTC, Kroz
Details
emerge --info (emerge_info.txt,8.39 KB, text/plain)
2014-04-23 22:01 UTC, Kroz
Details
emerge --nodeps -pv `qlist -IC kde-base/*` (kde_packages.txt,12.26 KB, text/plain)
2014-04-23 22:02 UTC, Kroz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kroz 2014-04-23 22:01:03 UTC
Created attachment 375564 [details]
Screenshot with output of htop, iotop, vmstat and free commands

KDE 4.13. When using krunner (Alt+F2) with desktop search, sometimes it can consume a huge amount of memory, often freezing the system due to continuous swap.

Steps to reproduce (100% reproducible):
0. Ensure that "Desktop Search" plugin is active - check in settings of krunner.
1. Enter Krunner (Alt+F2)
2. Type "1+2+3"
Almost immediately the memory consumption will spike (from ~0.5G to ~1.4G in my case according to KDE widget). According to htop the memory is consumed by kdeinit4 processes. After closing krunner, the memory is not released. Logout/login (or Ctrl+Alt+Backspace when the system is frozen) helps to release the memory. The effect disappears a soon as "Desktop Search" plugin of the krunner is disabled.

Additional information:
semantic-desktop USE flag is disabled for whole system except kdelibs.
When semantic-desktop USE flag was enabled, eventually something (I guess it was desktop search) started to freeze my system (high memory consumption, aggressive swapping). I have hard-rebooted the system, added home directly to exception list (in System Settings > Desktop Search) and after that recompiled system without USE flag.

Attachments:
 - screenshot with the screen when the problem is there as well as output htop (sort criteria: %mem), iotop, vmstat, free before and after the problem.
 - versions and USE flags of kde packages.
 - emerge --info
Comment 1 Kroz 2014-04-23 22:01:36 UTC
Created attachment 375566 [details]
emerge --info
Comment 2 Kroz 2014-04-23 22:02:05 UTC
Created attachment 375568 [details]
emerge --nodeps -pv `qlist -IC kde-base/*`
Comment 3 Ubiquitine 2014-04-24 07:14:54 UTC
I confirm this on my Gentoo desktop running kde-4.13 with semantic-desktop USE-flag. Since I've added all my media library to desktop search, krunner consumes ~5Gb memory while reproducing those steps.
Comment 4 Johannes Huber (RETIRED) gentoo-dev 2014-05-13 19:48:25 UTC
KDE SC 4.13.1 is now in tree available. Please test.
Comment 5 Johannes Huber (RETIRED) gentoo-dev 2014-07-17 18:14:05 UTC
(In reply to Johannes Huber from comment #4)
> KDE SC 4.13.1 is now in tree available. Please test.

KDE SC 4.13.3 is in tree since yesterday. Please test.
Comment 6 Fatih 2014-08-09 14:01:54 UTC
(In reply to Johannes Huber from comment #5)
> (In reply to Johannes Huber from comment #4)
> > KDE SC 4.13.1 is now in tree available. Please test.
> 
> KDE SC 4.13.3 is in tree since yesterday. Please test.

This is not resolved in 4.13.3

I don't see a problem with 4 arithmetic ops. The problem is when calc.ing exponential numbers. Try to play with the numbers below. You will see 100-200MB sudden allocations and then left overs which are almost cleaned on next alt+f2 before new op. Then be prepared for the huge instant malloc (1-2GB) that will make your system unresponsive. If you can restore from there, you can also see 1-2GB leak (assuming krunner survived linux oom).

2^2
2^22
2^2222
22^2222 
222^2222 
22^2
2^22
Comment 7 Johannes Huber (RETIRED) gentoo-dev 2014-08-09 14:16:51 UTC
Does this happen only on calculation inputs?
Comment 8 Fatih 2014-08-13 07:44:53 UTC
(In reply to Johannes Huber from comment #7)
> Does this happen only on calculation inputs?

Interesting questions. 

I am actively using krunner for desktop search and almost for all other plugins. No complaint with other inputs (e.g. lock, mount, 508556, kcalc, etc.). 

But note this. Both the expressions 22^2 and =22^2 cause huge memory consumption whether Calculator plugin of krunner is *enabled* or *disabled*. 

This is fatal. It eats up the entire memory available, oom ends up killing system services after user apps to free space.
Comment 9 Johannes Huber (RETIRED) gentoo-dev 2014-08-13 14:48:55 UTC
(In reply to Fatih Tümen from comment #8)
> Interesting questions. 
> 
> I am actively using krunner for desktop search and almost for all other
> plugins. No complaint with other inputs (e.g. lock, mount, 508556, kcalc,
> etc.). 
> 
> But note this. Both the expressions 22^2 and =22^2 cause huge memory
> consumption whether Calculator plugin of krunner is *enabled* or *disabled*. 
> 
> This is fatal. It eats up the entire memory available, oom ends up killing
> system services after user apps to free space.

OK, please report this upstream as we can't do anything about it on distribution level.
Comment 10 Fatih 2014-08-13 17:58:31 UTC
(In reply to Johannes Huber from comment #9)
> (In reply to Fatih Tümen from comment #8)
> > Interesting questions. 
> > 
> > I am actively using krunner for desktop search and almost for all other
> > plugins. No complaint with other inputs (e.g. lock, mount, 508556, kcalc,
> > etc.). 
> > 
> > But note this. Both the expressions 22^2 and =22^2 cause huge memory
> > consumption whether Calculator plugin of krunner is *enabled* or *disabled*. 
> > 
> > This is fatal. It eats up the entire memory available, oom ends up killing
> > system services after user apps to free space.
> 
> OK, please report this upstream as we can't do anything about it on
> distribution level.

Thanks. It seems to be a rather long standing bug there. Joined the convo.

https://bugs.kde.org/show_bug.cgi?id=224287