Bug 321327 - Memory leak when entering specific calculation
Summary: Memory leak when entering specific calculation
Status: RESOLVED UPSTREAM
Alias: None
Product: krunner
Classification: Plasma
Component: calculator (show other bugs)
Version: 4.10.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: triaged
: 224287 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-06-18 19:51 UTC by Louis Moureaux
Modified: 2018-09-26 22:29 UTC (History)
14 users (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 Louis Moureaux 2013-06-18 19:51:37 UTC
When pasting from LibreOffice :
"= 6,67.10^-11 {65.6.10^24} over (6378.10^3)^2"
and editing it towards
"= 6,67*10^-11 (65*6*10^24) / (6378*10^3)^2",
Krunner begins eating my RAM. When I managed to kill it, it was using 1.6 GiB of memory. No result is shown.

Reproducible: Always

Steps to Reproduce:
1. Paste the following line into Krunner
= 6,67.10^-11 {65.6.10^24} over (6378.10^3)^2
2. Go to Konsole and check memory usage.
Actual Results:  
Memory gets eaten by Krunner.

Expected Results:  
Not so much memory should be used.

I'm using the Project Neon PPA on Ubuntu 12.10 64 bits. I got the same result twice.
The line "= 6,67.10^-11 {65.6.10^24} over (6357.10^3)^2" caused no problem.
Comment 1 Christoph Feck 2013-06-18 22:13:27 UTC
Cannot reproduce on today's master, using libqalculate 0.9.7. It displays "639,47182" and stays at ~15 MB RSS.
Comment 2 Christoph Feck 2013-06-18 22:14:59 UTC
It could depend on the modules you enabled in KRunner. Please click on the wrench icon in KRunner, and try disabling modules. If you can find a module causing the leak, please add a comment.
Comment 3 Louis Moureaux 2013-06-19 10:00:58 UTC
The calculation module causes the leak. I've libqalculate 0.9.7-8 installed.
Comment 4 Sergio Martins 2013-07-12 14:43:19 UTC
Confirmed in 4.10.5
Comment 5 Sergio Martins 2013-07-12 14:46:34 UTC
Can't reproduce in master, only 4.10.

I'd say we close this and reopen later if necessary.
Comment 6 GSC 2014-04-13 05:35:14 UTC
With this input: 10000^100000000, it is reproducable at archlinux KDE 4.12.4, libqalculate 0.9.7.
Comment 7 GSC 2014-04-13 05:39:05 UTC
Here' s some command line output of krunner:

krunner(11749)/kurifilter (plugins) KShortUriFilter::filterUri: "10000^1"
krunner(11749)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/var/tmp/kdecache-gsc/ksycoca4"
krunner(11749)/kurifilter (plugins) KShortUriFilter::filterUri: "10000^10"
krunner(11749)/kurifilter (plugins) KShortUriFilter::filterUri: "10000^100"
krunner(11749)/kurifilter (plugins) KShortUriFilter::filterUri: "10000^1000"
krunner(11749)/kurifilter (plugins) KShortUriFilter::filterUri: "10000^10000"
krunner(11749)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/var/tmp/kdecache-gsc/ksycoca4"
krunner(11749)/kurifilter (plugins) KShortUriFilter::filterUri: "10000^100000"
krunner(11749)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/var/tmp/kdecache-gsc/ksycoca4"
krunner(11749)/kurifilter (plugins) KShortUriFilter::filterUri: "10000^1000000"
krunner(11749)/kurifilter (plugins) KShortUriFilter::filterUri: "10000^10000000"
krunner(11749)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/var/tmp/kdecache-gsc/ksycoca4"
krunner(11749)/kurifilter (plugins) KShortUriFilter::filterUri: "10000^100000000"
krunner(11749)/kurifilter (plugins) KShortUriFilter::filterUri: "10000^1000000000"
krunner(11749)/kurifilter (plugins) KShortUriFilter::filterUri: "10000^10000000000"
krunner(11749)/kurifilter (plugins) KShortUriFilter::filterUri: "10000^100000000000"
krunner(11749)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/var/tmp/kdecache-gsc/ksycoca4"
krunner(11749)/kurifilter (plugins) KShortUriFilter::filterUri: "10000^1000000000000"
krunner(11749)/libplasma Plasma::AbstractRunner::performMatch: "calculator" runner is too slow, putting it on the back burner.
Comment 8 dev.dliw 2014-05-09 11:27:54 UTC
I don't know if this really is the same problem, but I encounter similar behavior with KDE 4.13.

Every time I enter a calculation (even the simplest one), krunner starts heavy IO operations, which slow down the whole system considerably.
The result is shown (almost everytime) and at the same time krunner starts eating up the whole memory, starting with ~ 1.2GB and increasing with a rate of ~ 100MB / s, which freezes the system almost immediately. 
The only way to stop the process was oom_kill via sysrq.

The jump to 1GB memory usage happens somewhere between the IO starting and the result being shown, usually krunner uses about 30MB of memory.

If I enter a number only (no calculation) there is also heavy IO going on as long as I keep krunner open, but there is no significant increase in memory consumption.

I'm using the latest packages in the openSUSE KDE:/Current/ repos.
Comment 9 nine 2014-05-13 11:28:06 UTC
I can easily reproduce this on openSUSE 13.1 with KDE 4.13 from the KDE:/Current repo. I attached gdb to krunner, did some calculations and interrupted krunner as it hit > 4GB of memory usage. This is a backtrace of all threads. Maybe it helps. If not, please tell me what I can do to help fix this.

Thread 19 (Thread 0x7fffdc5e6700 (LWP 2585)):
#0  0x00007ffff78beb3d in poll () from /lib64/libc.so.6
#1  0x00007fffec85c604 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fffec85c70c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007ffff46add76 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#4  0x00007ffff467fd0f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#5  0x00007ffff4680005 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007ffff457efef in QThread::exec() () from /usr/lib64/libQtCore.so.4
#7  0x00007ffff4661513 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007ffff458168f in ?? () from /usr/lib64/libQtCore.so.4
#9  0x00007ffff373d0db in start_thread () from /lib64/libpthread.so.0
#10 0x00007ffff78c790d in clone () from /lib64/libc.so.6

Thread 18 (Thread 0x7fffce8e9700 (LWP 2654)):
#0  0x00007ffff78beb3d in poll () from /lib64/libc.so.6
#1  0x00007fffec85c604 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fffec85c70c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007ffff46add76 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#4  0x00007ffff467fd0f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#5  0x00007ffff4680005 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007ffff457efef in QThread::exec() () from /usr/lib64/libQtCore.so.4
#7  0x00007ffff4661513 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007ffff458168f in ?? () from /usr/lib64/libQtCore.so.4
#9  0x00007ffff373d0db in start_thread () from /lib64/libpthread.so.0
#10 0x00007ffff78c790d in clone () from /lib64/libc.so.6

Thread 17 (Thread 0x7fffce0e8700 (LWP 2656)):
#0  0x00007ffff37410af in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007ffff4581b66 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fffef40979c in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x00007fffef40c233 in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x00007fffef40c24c in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x00007fffef40af4f in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#6  0x00007ffff458168f in ?? () from /usr/lib64/libQtCore.so.4
#7  0x00007ffff373d0db in start_thread () from /lib64/libpthread.so.0
#8  0x00007ffff78c790d in clone () from /lib64/libc.so.6

Thread 16 (Thread 0x7fffcd8e7700 (LWP 2657)):
#0  0x00007ffff37410af in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007ffff4581b66 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fffef40979c in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x00007fffef40c233 in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x00007fffef40af4f in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#5  0x00007ffff458168f in ?? () from /usr/lib64/libQtCore.so.4
#6  0x00007ffff373d0db in start_thread () from /lib64/libpthread.so.0
#7  0x00007ffff78c790d in clone () from /lib64/libc.so.6

Thread 15 (Thread 0x7fffcd0e6700 (LWP 2658)):
#0  0x00007ffff78c3729 in syscall () from /lib64/libc.so.6
#1  0x00007ffff4580163 in ?? () from /usr/lib64/libQtCore.so.4
#2  0x00007ffff457c74d in QMutex::lock() () from /usr/lib64/libQtCore.so.4
#3  0x00007fffc9f897b2 in Baloo::XapianSearchStore::exec(Baloo::Query const&) () from /usr/lib64/libbalooxapian.so.4
#4  0x00007fffd9e513e9 in Baloo::Query::exec() () from /usr/lib64/libbaloocore.so.4
#5  0x00007fffda05e593 in ?? () from /usr/lib64/kde4/krunner_baloosearchrunner.so
#6  0x00007ffff6e7b81e in Plasma::AbstractRunner::performMatch(Plasma::RunnerContext&) () from /usr/lib64/libplasma.so.3
#7  0x00007fffef40b5e2 in ?? () from /usr/lib64/libthreadweaver.so.4
#8  0x00007fffef40b79e in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#9  0x00007fffef40afeb in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#10 0x00007ffff458168f in ?? () from /usr/lib64/libQtCore.so.4
#11 0x00007ffff373d0db in start_thread () from /lib64/libpthread.so.0
#12 0x00007ffff78c790d in clone () from /lib64/libc.so.6

Thread 14 (Thread 0x7fffcc8e5700 (LWP 2659)):
#0  0x00007ffff37410af in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007ffff4581b66 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fffef40979c in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x00007fffef40c233 in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x00007fffef40c24c in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x00007fffef40af4f in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#6  0x00007ffff458168f in ?? () from /usr/lib64/libQtCore.so.4
#7  0x00007ffff373d0db in start_thread () from /lib64/libpthread.so.0
#8  0x00007ffff78c790d in clone () from /lib64/libc.so.6
---Type <return> to continue, or q <return> to quit---

Thread 13 (Thread 0x7fffcc0e4700 (LWP 2660)):
#0  0x00007ffff78c3729 in syscall () from /lib64/libc.so.6
#1  0x00007ffff4580163 in ?? () from /usr/lib64/libQtCore.so.4
#2  0x00007ffff457c74d in QMutex::lock() () from /usr/lib64/libQtCore.so.4
#3  0x00007fffc9f897b2 in Baloo::XapianSearchStore::exec(Baloo::Query const&) () from /usr/lib64/libbalooxapian.so.4
#4  0x00007fffd9e513e9 in Baloo::Query::exec() () from /usr/lib64/libbaloocore.so.4
#5  0x00007fffda05e593 in ?? () from /usr/lib64/kde4/krunner_baloosearchrunner.so
#6  0x00007ffff6e7b81e in Plasma::AbstractRunner::performMatch(Plasma::RunnerContext&) () from /usr/lib64/libplasma.so.3
#7  0x00007fffef40b5e2 in ?? () from /usr/lib64/libthreadweaver.so.4
#8  0x00007fffef40b79e in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#9  0x00007fffef40afeb in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#10 0x00007ffff458168f in ?? () from /usr/lib64/libQtCore.so.4
#11 0x00007ffff373d0db in start_thread () from /lib64/libpthread.so.0
#12 0x00007ffff78c790d in clone () from /lib64/libc.so.6

Thread 12 (Thread 0x7fffcb8e3700 (LWP 2661)):
#0  0x00007ffff37410af in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007ffff4581b66 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fffef40979c in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x00007fffef40c233 in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x00007fffef40c24c in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x00007fffef40af4f in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#6  0x00007ffff458168f in ?? () from /usr/lib64/libQtCore.so.4
#7  0x00007ffff373d0db in start_thread () from /lib64/libpthread.so.0
#8  0x00007ffff78c790d in clone () from /lib64/libc.so.6

Thread 11 (Thread 0x7fffcb0e2700 (LWP 2662)):
#0  0x00007ffff37410af in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007ffff4581b66 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fffef40979c in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x00007fffef40c233 in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x00007fffef40c24c in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x00007fffef40af4f in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#6  0x00007ffff458168f in ?? () from /usr/lib64/libQtCore.so.4
#7  0x00007ffff373d0db in start_thread () from /lib64/libpthread.so.0
#8  0x00007ffff78c790d in clone () from /lib64/libc.so.6

Thread 10 (Thread 0x7fffc7abc700 (LWP 2663)):
#0  0x00007ffff78c3729 in syscall () from /lib64/libc.so.6
#1  0x00007ffff4580163 in ?? () from /usr/lib64/libQtCore.so.4
#2  0x00007ffff457c74d in QMutex::lock() () from /usr/lib64/libQtCore.so.4
#3  0x00007fffc9f897b2 in Baloo::XapianSearchStore::exec(Baloo::Query const&) () from /usr/lib64/libbalooxapian.so.4
#4  0x00007fffd9e513e9 in Baloo::Query::exec() () from /usr/lib64/libbaloocore.so.4
#5  0x00007fffda05e593 in ?? () from /usr/lib64/kde4/krunner_baloosearchrunner.so
#6  0x00007ffff6e7b81e in Plasma::AbstractRunner::performMatch(Plasma::RunnerContext&) () from /usr/lib64/libplasma.so.3
#7  0x00007fffef40b5e2 in ?? () from /usr/lib64/libthreadweaver.so.4
#8  0x00007fffef40b79e in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#9  0x00007fffef40afeb in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#10 0x00007ffff458168f in ?? () from /usr/lib64/libQtCore.so.4
#11 0x00007ffff373d0db in start_thread () from /lib64/libpthread.so.0
#12 0x00007ffff78c790d in clone () from /lib64/libc.so.6

Thread 9 (Thread 0x7fffc72bb700 (LWP 2664)):
#0  0x00007ffff78c3729 in syscall () from /lib64/libc.so.6
#1  0x00007ffff4580163 in ?? () from /usr/lib64/libQtCore.so.4
#2  0x00007ffff457c74d in QMutex::lock() () from /usr/lib64/libQtCore.so.4
#3  0x00007fffc9f897b2 in Baloo::XapianSearchStore::exec(Baloo::Query const&) () from /usr/lib64/libbalooxapian.so.4
#4  0x00007fffd9e513e9 in Baloo::Query::exec() () from /usr/lib64/libbaloocore.so.4
#5  0x00007fffda05e593 in ?? () from /usr/lib64/kde4/krunner_baloosearchrunner.so
#6  0x00007ffff6e7b81e in Plasma::AbstractRunner::performMatch(Plasma::RunnerContext&) () from /usr/lib64/libplasma.so.3
#7  0x00007fffef40b5e2 in ?? () from /usr/lib64/libthreadweaver.so.4
#8  0x00007fffef40b79e in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#9  0x00007fffef40afeb in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#10 0x00007ffff458168f in ?? () from /usr/lib64/libQtCore.so.4
#11 0x00007ffff373d0db in start_thread () from /lib64/libpthread.so.0
#12 0x00007ffff78c790d in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7fffc6aba700 (LWP 2665)):
#0  0x00007ffff37410af in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007ffff4581b66 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fffef40979c in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x00007fffef40c233 in ?? () from /usr/lib64/libthreadweaver.so.4
---Type <return> to continue, or q <return> to quit---
#4  0x00007fffef40c24c in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x00007fffef40af4f in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#6  0x00007ffff458168f in ?? () from /usr/lib64/libQtCore.so.4
#7  0x00007ffff373d0db in start_thread () from /lib64/libpthread.so.0
#8  0x00007ffff78c790d in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7fffc62b9700 (LWP 2666)):
#0  0x00007ffff78c3729 in syscall () from /lib64/libc.so.6
#1  0x00007ffff4580163 in ?? () from /usr/lib64/libQtCore.so.4
#2  0x00007ffff457c74d in QMutex::lock() () from /usr/lib64/libQtCore.so.4
#3  0x00007fffc9f897b2 in Baloo::XapianSearchStore::exec(Baloo::Query const&) () from /usr/lib64/libbalooxapian.so.4
#4  0x00007fffd9e513e9 in Baloo::Query::exec() () from /usr/lib64/libbaloocore.so.4
#5  0x00007fffda05e593 in ?? () from /usr/lib64/kde4/krunner_baloosearchrunner.so
#6  0x00007ffff6e7b81e in Plasma::AbstractRunner::performMatch(Plasma::RunnerContext&) () from /usr/lib64/libplasma.so.3
#7  0x00007fffef40b5e2 in ?? () from /usr/lib64/libthreadweaver.so.4
#8  0x00007fffef40b79e in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#9  0x00007fffef40afeb in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#10 0x00007ffff458168f in ?? () from /usr/lib64/libQtCore.so.4
#11 0x00007ffff373d0db in start_thread () from /lib64/libpthread.so.0
#12 0x00007ffff78c790d in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7fffc5ab8700 (LWP 2667)):
#0  0x00007ffff78c3729 in syscall () from /lib64/libc.so.6
#1  0x00007ffff4580163 in ?? () from /usr/lib64/libQtCore.so.4
#2  0x00007ffff457c74d in QMutex::lock() () from /usr/lib64/libQtCore.so.4
#3  0x00007fffc9f897b2 in Baloo::XapianSearchStore::exec(Baloo::Query const&) () from /usr/lib64/libbalooxapian.so.4
#4  0x00007fffd9e513e9 in Baloo::Query::exec() () from /usr/lib64/libbaloocore.so.4
#5  0x00007fffda05e593 in ?? () from /usr/lib64/kde4/krunner_baloosearchrunner.so
#6  0x00007ffff6e7b81e in Plasma::AbstractRunner::performMatch(Plasma::RunnerContext&) () from /usr/lib64/libplasma.so.3
#7  0x00007fffef40b5e2 in ?? () from /usr/lib64/libthreadweaver.so.4
#8  0x00007fffef40b79e in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#9  0x00007fffef40afeb in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#10 0x00007ffff458168f in ?? () from /usr/lib64/libQtCore.so.4
#11 0x00007ffff373d0db in start_thread () from /lib64/libpthread.so.0
#12 0x00007ffff78c790d in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7fffc52b7700 (LWP 2668)):
#0  0x00007ffff37410af in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007ffff4581b66 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fffef40979c in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x00007fffef40c233 in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x00007fffef40c24c in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x00007fffef40af4f in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#6  0x00007ffff458168f in ?? () from /usr/lib64/libQtCore.so.4
#7  0x00007ffff373d0db in start_thread () from /lib64/libpthread.so.0
#8  0x00007ffff78c790d in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7fffc4ab6700 (LWP 2669)):
#0  0x00007ffff78c3729 in syscall () from /lib64/libc.so.6
#1  0x00007ffff4580163 in ?? () from /usr/lib64/libQtCore.so.4
#2  0x00007ffff457c74d in QMutex::lock() () from /usr/lib64/libQtCore.so.4
#3  0x00007fffc9f897b2 in Baloo::XapianSearchStore::exec(Baloo::Query const&) () from /usr/lib64/libbalooxapian.so.4
#4  0x00007fffd9e513e9 in Baloo::Query::exec() () from /usr/lib64/libbaloocore.so.4
#5  0x00007fffda05e593 in ?? () from /usr/lib64/kde4/krunner_baloosearchrunner.so
#6  0x00007ffff6e7b81e in Plasma::AbstractRunner::performMatch(Plasma::RunnerContext&) () from /usr/lib64/libplasma.so.3
#7  0x00007fffef40b5e2 in ?? () from /usr/lib64/libthreadweaver.so.4
#8  0x00007fffef40b79e in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#9  0x00007fffef40afeb in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#10 0x00007ffff458168f in ?? () from /usr/lib64/libQtCore.so.4
#11 0x00007ffff373d0db in start_thread () from /lib64/libpthread.so.0
#12 0x00007ffff78c790d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fff87fff700 (LWP 2670)):
#0  OrPostList::get_termfreq_est (this=0x7ffe5ac3ea30) at matcher/orpostlist.cc:295
#1  0x00007fff870b84c9 in OrPostList::get_termfreq_est (this=0x7ffe5b56c690) at matcher/orpostlist.cc:295
#2  0x00007fff870b84e0 in OrPostList::get_termfreq_est (this=0x7ffe5bbe7bd0) at matcher/orpostlist.cc:296
#3  0x00007fff870b84e0 in OrPostList::get_termfreq_est (this=0x7ffe5bfc3ef0) at matcher/orpostlist.cc:296
#4  0x00007fff870b84c9 in OrPostList::get_termfreq_est (this=0x7ffe5c175230) at matcher/orpostlist.cc:295
#5  0x00007fff870b84c9 in OrPostList::get_termfreq_est (this=0x7ffe5c241ef0) at matcher/orpostlist.cc:295
#6  0x00007fff870b84e0 in OrPostList::get_termfreq_est (this=0x7ffe5c2e6950) at matcher/orpostlist.cc:296
#7  0x00007fff870b84c9 in OrPostList::get_termfreq_est (this=0x7ffe5c31c410) at matcher/orpostlist.cc:295
#8  0x00007fff870b84c9 in OrPostList::get_termfreq_est (this=0x7ffe5c337a70) at matcher/orpostlist.cc:295
#9  0x00007fff870b84e0 in OrPostList::get_termfreq_est (this=0x7ffe5c343b30) at matcher/orpostlist.cc:296
---Type <return> to continue, or q <return> to quit---
#10 0x00007fff870b84e0 in OrPostList::get_termfreq_est (this=0x7ffe5c34ac70) at matcher/orpostlist.cc:296
#11 0x00007fff870b84c9 in OrPostList::get_termfreq_est (this=0x7ffe5c34f6b0) at matcher/orpostlist.cc:295
#12 0x00007fff870bc7c5 in operator() (this=<synthetic pointer>, b=0x7ffe5c34f6b0, a=<optimized out>) at matcher/queryoptimiser.cc:328
#13 std::__adjust_heap<__gnu_cxx::__normal_iterator<Xapian::PostingIterator::Internal**, std::vector<Xapian::PostingIterator::Internal*, std::allocator<Xapian::PostingIterator::Internal*> > >, long, Xapian::PostingIterator::Internal*, ComparePostListTermFreqAscending> (__first=, __holeIndex=2, __holeIndex@entry=0, __len=102, 
    __value=0x7ffe5c351750, __comp=__comp@entry=...) at /usr/include/c++/4.8/bits/stl_heap.h:312
#14 0x00007fff870bc420 in __pop_heap<__gnu_cxx::__normal_iterator<Xapian::PostingIterator::Internal**, std::vector<Xapian::PostingIterator::Internal*> >, ComparePostListTermFreqAscending> (__result=..., __last=..., __first=..., __comp=...) at /usr/include/c++/4.8/bits/stl_heap.h:341
#15 pop_heap<__gnu_cxx::__normal_iterator<Xapian::PostingIterator::Internal**, std::vector<Xapian::PostingIterator::Internal*> >, ComparePostListTermFreqAscending> (
    __last=..., __first=..., __comp=...) at /usr/include/c++/4.8/bits/stl_heap.h:372
#16 QueryOptimiser::do_or_like (this=this@entry=0x7fff87ffdf90, query=<optimized out>, factor=factor@entry=0) at matcher/queryoptimiser.cc:412
#17 0x00007fff870bc64d in QueryOptimiser::do_synonym (this=this@entry=0x7fff87ffdf90, query=<optimized out>, factor=factor@entry=1) at matcher/queryoptimiser.cc:437
#18 0x00007fff870bb16e in QueryOptimiser::do_subquery (this=this@entry=0x7fff87ffdf90, query=0x7fff7115c8e0, factor=factor@entry=1) at matcher/queryoptimiser.cc:93
#19 0x00007fff870bc15d in QueryOptimiser::do_or_like (this=0x7fff87ffdf90, query=0x7fff7115c940, factor=factor@entry=1) at matcher/queryoptimiser.cc:351
#20 0x00007fff870bb2aa in QueryOptimiser::do_subquery (this=this@entry=0x7fff87ffdf90, query=0x7fff7115c940, factor=factor@entry=1) at matcher/queryoptimiser.cc:87
#21 0x00007fff870bbb71 in QueryOptimiser::do_and_like (this=this@entry=0x7fff87ffdf90, query=0x7fff70f87840, factor=factor@entry=1, 
Python Exception <type 'exceptions.IndexError'> list index out of range: 
    and_plists=std::vector of length 2, capacity 2 = {...}, pos_filters=empty std::list) at matcher/queryoptimiser.cc:257
#22 0x00007fff870bbcf0 in QueryOptimiser::do_and_like (this=0x7fff87ffdf90, query=<optimized out>, factor=factor@entry=1) at matcher/queryoptimiser.cc:186
#23 0x00007fff870bb282 in QueryOptimiser::do_subquery (this=this@entry=0x7fff87ffdf90, query=0x7fff70f87840, factor=factor@entry=1) at matcher/queryoptimiser.cc:82
#24 0x00007fff870abc0f in optimise_query (query=<optimized out>, this=0x7fff87ffdf90) at matcher/queryoptimiser.h:115
#25 LocalSubMatch::get_postlist_and_term_info (this=0x7fff80002850, matcher=0x7fff87ffe630, termfreqandwts=<optimized out>, total_subqs_ptr=0x7fff87ffe0dc)
    at matcher/localsubmatch.cc:82
#26 0x00007fff870aedac in MultiMatch::get_mset (this=this@entry=0x7fff87ffe630, first=first@entry=0, maxitems=5, check_at_least=check_at_least@entry=5, mset=..., stats=..., 
    mdecider=mdecider@entry=0x0, matchspy_legacy=matchspy_legacy@entry=0x0, sorter=0x0) at matcher/multimatch.cc:371
#27 0x00007fff86fa2995 in Xapian::Enquire::Internal::get_mset (this=0x7fff80116f30, first=<optimized out>, maxitems=<optimized out>, check_at_least=<optimized out>, 
    rset=<optimized out>, mdecider=mdecider@entry=0x0, matchspy_legacy=matchspy_legacy@entry=0x0) at api/omenquire.cc:683
#28 0x00007fff86fa2cd6 in Xapian::Enquire::get_mset (this=0x7fff87ffe8b0, first=<optimized out>, maxitems=<optimized out>, check_at_least=<optimized out>, 
    rset=<optimized out>, mdecider=0x0) at api/omenquire.cc:1034
#29 0x00007fffc9f89628 in Baloo::XapianSearchStore::exec(Baloo::Query const&) () from /usr/lib64/libbalooxapian.so.4
#30 0x00007fffd9e513e9 in Baloo::Query::exec() () from /usr/lib64/libbaloocore.so.4
#31 0x00007fffda05e593 in ?? () from /usr/lib64/kde4/krunner_baloosearchrunner.so
#32 0x00007ffff6e7b81e in Plasma::AbstractRunner::performMatch(Plasma::RunnerContext&) () from /usr/lib64/libplasma.so.3
#33 0x00007fffef40b5e2 in ?? () from /usr/lib64/libthreadweaver.so.4
#34 0x00007fffef40b79e in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#35 0x00007fffef40afeb in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#36 0x00007ffff458168f in ?? () from /usr/lib64/libQtCore.so.4
#37 0x00007ffff373d0db in start_thread () from /lib64/libpthread.so.0
#38 0x00007ffff78c790d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fff7f7fe700 (LWP 2671)):
#0  0x00007ffff78c3729 in syscall () from /lib64/libc.so.6
#1  0x00007ffff4580163 in ?? () from /usr/lib64/libQtCore.so.4
#2  0x00007ffff457c74d in QMutex::lock() () from /usr/lib64/libQtCore.so.4
#3  0x00007fffc9f897b2 in Baloo::XapianSearchStore::exec(Baloo::Query const&) () from /usr/lib64/libbalooxapian.so.4
#4  0x00007fffd9e513e9 in Baloo::Query::exec() () from /usr/lib64/libbaloocore.so.4
#5  0x00007fffda05e593 in ?? () from /usr/lib64/kde4/krunner_baloosearchrunner.so
#6  0x00007ffff6e7b81e in Plasma::AbstractRunner::performMatch(Plasma::RunnerContext&) () from /usr/lib64/libplasma.so.3
#7  0x00007fffef40b5e2 in ?? () from /usr/lib64/libthreadweaver.so.4
#8  0x00007fffef40b79e in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#9  0x00007fffef40afeb in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#10 0x00007ffff458168f in ?? () from /usr/lib64/libQtCore.so.4
#11 0x00007ffff373d0db in start_thread () from /lib64/libpthread.so.0
#12 0x00007ffff78c790d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7ffff7f90880 (LWP 2584)):
#0  0x00007ffff78beb3d in poll () from /lib64/libc.so.6
#1  0x00007fffec85c604 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fffec85c70c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007ffff46add55 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#4  0x00007ffff512c936 in ?? () from /usr/lib64/libQtGui.so.4
#5  0x00007ffff467fd0f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007ffff4680005 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#7  0x00007ffff468513b in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#8  0x00007ffff7bb8735 in kdemain (argc=1, argv=0x7fffffffd938) at /usr/src/debug/kde-workspace-4.11.9/krunner/main.cpp:64
#9  0x00007ffff7801be5 in __libc_start_main () from /lib64/libc.so.6
#10 0x0000000000400761 in _start () at ../sysdeps/x86_64/start.S:122
Comment 10 dev.dliw 2014-05-14 20:09:58 UTC
Things work well for me again with KDE 4.13.1.

Seems my problem was related to
https://bugs.kde.org/show_bug.cgi?id=334512 or
https://bugs.kde.org/show_bug.cgi?id=332253
Comment 11 dev.dliw 2014-05-14 20:18:07 UTC
As for the original bug report with specific "steps to reproduce":
I can confirm that with latest KDE 4.13.1, krunner immediately uses over 600MB of memory.

Btw. sorry for hijacking this bug report.
Comment 12 Luke Johnstone 2014-05-27 07:04:09 UTC
I too am experiencing this on Kubuntu 14.04 fully up to date.

Any use of the calc module causes all my free ram to be used.

Let me know if there is any form of bug report or log I can post to aid in this.
Comment 13 Craig Millar 2014-06-10 14:59:56 UTC
Experiencing similar on 4.13.0 Kubuntu 14.04 - since I used krunner as a calculator several times every day it's causing me hell by rendering my system unusable.
Comment 14 Vishesh Handa 2015-02-05 15:02:02 UTC
*** Bug 224287 has been marked as a duplicate of this bug. ***
Comment 15 Vishesh Handa 2015-03-25 12:00:30 UTC
Can you please try disabling the Baloo runner and see if this still occurs?
Comment 16 Louis Moureaux 2015-03-26 23:21:56 UTC
Still reproducible : pasting the formula triggers the leak.

krunner 5.8.0, libqalculate 0.9.7 (Arch packages)
Comment 17 Felix W 2016-05-24 13:30:24 UTC
Still reproducible with krunner 5.6.4 (Arch package 5.22.0), all runners except calculator disabled.
Comment 18 Christoph Cullmann 2016-09-11 20:55:13 UTC
IMHO Xapian is dead and no longer in baloo, therefore fixed.
Comment 19 Christoph Feck 2016-09-15 00:17:52 UTC
Previous comments state that the calculator runner alone triggers the bug. Reopening.
Comment 20 Louis Moureaux 2016-09-15 12:36:56 UTC
Could reproduce with krunner 5.7.5 (Arch package says 5.25.0) and libqalculate 0.9.10 (package version).

When entering 10000^1000... by hand, everything goes well (read: the answer updates quickly) until I hit the 10000^1000000 bar. At this point, krunner uses 100% of one CPU core for a while, and doesn't give any result. Each additional zero triggers a new thread, and at 10000^10000000000000 my 8 CPU cores are saturated. Memory usage goes up on the long term, but may sometimes drop by hundreds of MB.

Pasting 10000^10000000000000 directly, memory usage went up to 5.5 GB before I decided to kill krunner (I can't go much above that without swapping). Only one thread was spawned.
Comment 21 Louis Moureaux 2016-09-15 23:12:31 UTC
Digging further, I found that all libqalculate-based applications share the same memory usage issue. I was able to trace it down to a call to the cln::expt function from the cln library [1]. I mailed them [2] in order to understand the problem better (and let them know about it).

If they say it's a bug on their side I'll set this report to RESOLVED UPSTREAM (tell me if it's not appropriate). Else I'll see with the libqalculate people what can be done about it. Anyway now I think it's NEEDSINFO WAITINGFORINFO.

[1] http://www.ginac.de/CLN/
[2] Once approved, my post will appear in the cln-list@ginac.de archives at http://www.ginac.de/pipermail/ginac-list/
Comment 22 Andrew Crouthamel 2018-09-26 22:13:09 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 23 Louis Moureaux 2018-09-26 22:29:02 UTC
Can't reproduce in Plasma 5.13.5, libqalculate 2.6.2.