update hooks infinite recursion makes kded5 use excessive memory
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | kubuntu-notification-helper (Ubuntu) |
High
|
Harald Sitter | ||
Bug Description
After upgrading to vivid kded 5 started randomly crashing. There were also severe delays as my disk was permanently spinning like some huge amount ao data was being read/written. The problem seems to be that without any warning and aparent cause, kded5 goes from using 204MB of memory to using all of the available memory and then some swap and finally crashing. This seems to happen at least once every half an hour. The latest updates to frameworks 5.8.0 does not seem to help.
Related branches
| Oscar (orojas518) wrote : | #2 |
Confirming this, after some minutes of use kded5 starts using all available RAM and makes the system unusable.
I decided to do a quick debugging and used cgroups to limit kded5 memory usage (to prevent it from freezing everything) and started paying attention to the memory usage on KSysGuard, when memory usage started increasing without control I sent an interrupt signal to the process and attached gdb, and well, there it was, over 2000 calls to Hook::getField from kded_notificati
| affects: | kded (Ubuntu) → kubuntu-notification-helper (Ubuntu) |
| summary: |
- kded5 suddenly grabs all the available memory and crashes + infinite recursion makes kded5 use excessive memory |
| Ubuntu Foundations Team Bug Bot (crichton) wrote : Re: infinite recursion makes kded5 use excessive memory | #3 |
The attachment "Gets rid of recursion by calling another function to actually search for the field in m_fields" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]
| tags: | added: patch |
| Rohan Garg (rohangarg) wrote : | #4 |
Please submit this patch upstream to KDE for review.
| Oscar (orojas518) wrote : | #5 |
How exactly? Sorry, I'm new here... Also, please notice that this is a bug in kubuntu-
| Rohan Garg (rohangarg) wrote : | #6 |
Ah, sorry, I didn't read the bug report properly, I'll assign Harald who can look into it on Monday
| Changed in kubuntu-notification-helper (Ubuntu): | |
| assignee: | nobody → Harald Sitter (apachelogger) |
This just started with mine today, after updates.
| Changed in kubuntu-notification-helper (Ubuntu): | |
| importance: | Undecided → High |
| milestone: | none → ubuntu-15.04 |
| tags: | added: kubuntu |
| Harald Sitter (apachelogger) wrote : | #8 |
I feel like this change needs a unit test
| summary: |
- infinite recursion makes kded5 use excessive memory + update hooks infinite recursion makes kded5 use excessive memory |
| Luke Johnstone (john-wella) wrote : | #9 |
What a disaster this has been today. Completely hanging the system after a few minutes after login. Removed the package 'kubuntu-
| Wojciech Wieckowski (xplwowi) wrote : | #10 |
After yesterday's system update plasma runs smoothly only ~2 minutes. After that kded5 eats all ram and swap file and freezes the system. I had to switch to openbox which is a real pain.
| Changed in kubuntu-notification-helper (Ubuntu): | |
| status: | Confirmed → Fix Committed |
| Jonathan Riddell (jr) wrote : | #11 |
fix uploaded
| Launchpad Janitor (janitor) wrote : | #12 |
This bug was fixed in the package kubuntu-
---------------
kubuntu-
* Fix infinite recursion and language lookup in hooks LP: #1434226
+ New class Locale to rip apart an input locale and build possible
language value combinations from it. This is needed as some hooks use
the encoding as part of the language identifier, which the previous code
entirely disregarded.
+ Fix inifinte recursion when reading hook fields that broke in the qt5
port as two functions differing by argument were folded into one causing
infinite recursion when trying to read the actual values out of the map.
+ Defer the actual reading from the map to QMap#value which is really what
should have been used all along (use case: read value, but fall back to
default if key is not present).
+ Introduce a simple test case for hook reading checking invalidity and
validity and actually reading fields along with 2 localized versions in
the formats I have seen in use.
+ Introduce a test case for the new locale class ensuring that locale
parsing is working as well as combination construction is correct and
returns a list with correct order.
* Import translations from launchpad.
* Fix kcmshell4 -> kcmshell5 call.
-- Harald Sitter <email address hidden> Wed, 01 Apr 2015 16:13:56 +0200
| Changed in kubuntu-notification-helper (Ubuntu): | |
| status: | Fix Committed → Fix Released |
| Luke Johnstone (john-wella) wrote : | #13 |
Happy to report that the fix is working on my system :) Thank you for the speedy fix :)
| Georg Grabler (ggrabler) wrote : | #14 |
Interesting, I didn't get the update on any of my machines. I decided to reinstall one of the machines, works great, did get notification-helper update.
The one I "updated" from beta1 didn't get it and still has the issue - using the main server, why does that one not get the update?
Ofc, another problem, but still interesting :D. Anyway, I forced the kded5 update copying the .deb from the fresh installed one to the updated one and installing it, and the issue was gone. Still strange why I didn't get the update (neither muon nor apt-get did tell there was an update available).


Status changed to 'Confirmed' because the bug affects multiple users.