Version: unspecified (using KDE 4.6.4) OS: Linux If calculations that are typed into krunner that are to complex, it starts to calculate and (in my case) uses full system ressources, so that the whole system stops responding. Even if i would configurate it this way, that it has restricted ressources, such a calculation doesn't make sense. Reproducible: Always Steps to Reproduce: type into krunner: =2^2^2^2^2^2 Warning, do not try it on a productive system. Actual Results: top shows a CPU usage of 200%, after a while swapping starts and makes system unrespondable. Expected Results: matlab shows "inf" after a while bc shows "Runtime error (func=(main), adr=23): exponent too large in raise" i would consider this as a better result.
I see similar behavior on KDE 4.8.3. In my experience it is only the power function that is problematic. For example: (20.1)^(1.3333333) gives high cpu+mem+wait, and it gets worse the more digits in the exponent. (20.1)*(1.3333333) no problem Strangely enough (pi)^(1.333333) gives no problem.
Futher info: Krunner process keeps eating memory after deleting the offending digits.
This is a major stability issue that is still occurring. When trying to calculate 2^137438953472, I didn't get an answer, so I assumed that number was way too large, closed krunner, and went on with my business. A few moments later I noticed that my memory usage plasmoid was indicating that almost all of the 8 Gigabytes of memory was being used, so I opened my system monitor and found that krunner was using 100% CPU and almost all my memory. Luckily, krunner crashed before it could cause my computer to freeze. There really needs to be some sanity checks like (I assume that) KCalc does. If someone could, please at least mark this as confirmed for future reference to other people. XD
Confirmed on Plasma5.
Doesn't do that for me, I just get "Infinity" as a result but it doesn't eat up CPU
(In reply to Vishesh Handa from comment #4) > Confirmed on Plasma5. The problem is still here for 5.26.0 and plasma 5.8.5. This is a nasty bug, because it also appears on quite innocuous-seeming calculations, which then requires krunner to be killed, which is bothersome, as all applications started through krunner are then also killed. (I don't understand why applications launched in krunner become sub-processes; that seems like a bad idea; I'll see if a bug about that exists.) (In reply to Kai Uwe Broulik from comment #5) > Doesn't do that for me, I just get "Infinity" as a result but it doesn't eat > up CPU Hmm, when I type 2^2^2^2... I get, while typing, 1, 4, 16,... until at some point one core is hogged and my memory consumption starts to increase, and I have to kill krunner. If this doesn't happen for you, the backend must be different, perhaps?
Probably depends on whether you have Qalculate or not. I just entered "=2^2^2^2^2..." and now krunner is eating all RAM.
(In reply to Kai Uwe Broulik from comment #7) > Probably depends on whether you have Qalculate or not. > I just entered "=2^2^2^2^2..." and now krunner is eating all RAM. To be clear, you now get the issue as well because you have qalculate installed (as I do)? If that is the case, then this is probably a qalculate bug.
Reported to libqalculate https://github.com/Qalculate/libqalculate/issues/16
Git commit df7f1ed1eb7df7e3c039dc19db4893ca01b3327f by Kai Uwe Broulik. Committed on 27/03/2017 at 16:57. Pushed by broulik into branch 'master'. [Calculator Runner] Use "approximate" approximation mode The runner calculator isn't entitled for being a scientifically correct calculator. This keeps seemingly innocent calculations such as "2^0.333333333" from eating all RAM until it crashes. A hint is added to the result if it is only an approximation. FIXED-IN: 5.10.0 Differential Revision: https://phabricator.kde.org/D4290 M +7 -3 runners/calculator/calculatorrunner.cpp M +1 -1 runners/calculator/calculatorrunner.h M +9 -1 runners/calculator/qalculate_engine.cpp M +1 -1 runners/calculator/qalculate_engine.h https://commits.kde.org/plasma-workspace/df7f1ed1eb7df7e3c039dc19db4893ca01b3327f
Git commit 34b74d7b5dac9dd458a960e392954ac6c30df3d2 by Kai Uwe Broulik. Committed on 28/03/2017 at 08:26. Pushed by broulik into branch 'Plasma/5.8'. [Calculator Runner] Use "approximate" approximation mode The runner calculator isn't entitled for being a scientifically correct calculator. This keeps seemingly innocent calculations such as "2^0.333333333" from eating all RAM until it crashes. A hint is added to the result if it is only an approximation. FIXED-IN: 5.8.7 CCMAIL: kde-i18n-doc@kde.org Differential Revision: https://phabricator.kde.org/D4290 (cherry picked from commit df7f1ed1eb7df7e3c039dc19db4893ca01b3327f) M +7 -3 runners/calculator/calculatorrunner.cpp M +1 -1 runners/calculator/calculatorrunner.h M +9 -1 runners/calculator/qalculate_engine.cpp M +1 -1 runners/calculator/qalculate_engine.h https://commits.kde.org/plasma-workspace/34b74d7b5dac9dd458a960e392954ac6c30df3d2