Bug 358359

Summary: HIgh cpu consumption and apt-check process infinte fork
Product: [Applications] muon Reporter: Christophe Caillet <christophe.caillet>
Component: notifierAssignee: Jonathan Thomas <echidnaman>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, ales, andry.dp92, bugs, iadzhubey, idebal, jon33040, kitts.mailinglists, lari.natri, notz76, rafaelalcantaraperez, rene.marth, s.kenn, sitter, ste, stephan.diestelhorst, third-impact, tom-kde.bugs, wegwerf-1-2-3, wolfram.koehn, yofel, yzhernand, zmogas
Priority: NOR    
Version: 5.5.3   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Christophe Caillet 2016-01-22 09:15:35 UTC
When executing apt update command on Konsole I've the following behaviour :
High CPU consumption
Memory consumption due to fork of apt-check processes
When I remove package plasma-discover-updater this issue dissapear

Reproducible: Always

Steps to Reproduce:
1. apt update on Konsole
2.
3.

Actual Results:  
High memory consumption
HIgh CPU consumption: actually all cores of CPU are at 100%

Expected Results:  
no High memory or CPU consumption 

With plasma 5.4.3 and Framework 5.15 no problem
Problem occurs when upgrading with ppa:kubuntu-ppa/backports packages
Comment 1 stef 2016-01-22 14:04:02 UTC
Same behaviour here:
http://forum.ubuntu-it.org/viewtopic.php?f=30&t=606905
Comment 2 Christophe Caillet 2016-01-22 14:15:59 UTC
Workaround :remove plasma-discover-updater package and restart your plasma session
Comment 3 Philip Muškovac 2016-01-22 22:16:52 UTC
Saw the same on several systems, even while I'm typing this:

$ ps aux | grep apt-check | wc -l
43
Comment 4 Gauss 2016-01-25 10:49:02 UTC
I can also confirm this bug. Muon spawns an infinte number of apt-check processes.
I would consider this bug extremely severe, as it massively spoils a systems stability and performance.

The problem occurs with Ubuntu 15.10 when upgrading with ppa:kubuntu-ppa/backports to muon version 5.5.3.
Comment 5 Aleix Pol 2016-01-25 15:59:31 UTC
Can anybody confirm this also happens with 5.5.3?
Comment 6 Martin van Es 2016-01-25 16:05:08 UTC
For me, this started with the upgrade to 5.5.3 (kubuntu-backports).
Comment 7 Tom Mittelstädt 2016-01-26 15:59:11 UTC
here too. muonupdater 5.5.3 and about 60 apt-check processes within seconds consuming 100% cpu and 100% disk io plus swapping.

this is a fork bomb triggerd by every update.

can be stopped by "killall apt-check" (if you are fast enough)
Comment 8 Gauss 2016-01-27 10:36:12 UTC
I suggest upgrading the severity of this bug to critical, as it's basically a system crasher.

Tried to turn off auto-updates but it didn't help so i had to remove the plasma-discover packages.
I first removed the muon-discover stuff, but it turned out they were the wrong ones.
Comment 9 Martin van Es 2016-01-27 10:55:47 UTC
I strongly concur to the previous post. With plasma-discover installed any apt-get update thrashes my system to a crashing halt (if I'm not fast enough at killing the apt-check forks).
Comment 10 Aleix Pol 2016-01-28 17:33:33 UTC
Can somebody give this patch a try?
https://git.reviewboard.kde.org/r/126923/
Comment 11 Aleix Pol 2016-02-02 03:51:17 UTC
ping?
Comment 12 Aleix Pol 2016-02-02 14:34:53 UTC
Git commit 7ded9bf1de57f7954be552a48aa9abdb3e4db400 by Aleix Pol, on behalf of Aleix Pol Gonzalez.
Committed on 02/02/2016 at 14:28.
Pushed by apol into branch 'Plasma/5.5'.

Make sure qapt-check doesn't get called repeatedly

Simplify the process that checks for system upgrades.
- Makes sure it's only run when needed.
- Doesn't recreate the QProcess instance.

Tested by soee as discussed in #kubuntu-devel.

REVIEW: 126923
Related: bug 347602

M  +18   -12   libdiscover/backends/ApplicationBackend/ApplicationNotifier.cpp

http://commits.kde.org/discover/7ded9bf1de57f7954be552a48aa9abdb3e4db400
Comment 13 altosch 2016-02-10 08:29:26 UTC
I can confirm that on Kubuntu 15.10, Plasma 5.5.3 and Frameworks 5.18.0 (from ppa:kubuntu-ppa/backports). The computer gets totally overloaded because of many apt-check processes. Plasma stops responding. "killall apt-check" doesn't help. I haven't figured anything else but restart from console.
Comment 14 Ivan Adzhubey 2016-02-19 03:51:21 UTC
Not sure whether the above mentioned fix has been committed yet or not but today's update-notifier-common update to version 3.163.1 which arrived via Kubuntu PPA did not fix the problem for me on my Kubuntu 15.10 system with Plasma 5.5.3: apt-get update command still spawns hundreds of rough apt-check processes which eat up all memory and CPU on my desktop.
Comment 15 Shimon 2016-02-19 10:23:22 UTC
(In reply to Ivan Adzhubey from comment #14)
> Not sure whether the above mentioned fix has been committed yet or not but
> today's update-notifier-common update to version 3.163.1 which arrived via
> Kubuntu PPA did not fix the problem for me on my Kubuntu 15.10 system with
> Plasma 5.5.3: apt-get update command still spawns hundreds of rough
> apt-check processes which eat up all memory and CPU on my desktop.

the same here, the issue is still affecting my system Kubuntu 15.10 with Plasma 5.5.3.
Has the patch been committed?
Comment 16 Wegwerf 2016-02-21 20:31:51 UTC
Problem here still seen on recent Kubuntu 15.10: overloads Core i7 with lots of apt-check processes and causes heavy swap mem trashing. System then becomes totally unresponsive. This surely is a *severe* bug.
Comment 17 Sebastian Kenn 2016-02-24 21:20:39 UTC
the same here, the issue is still affecting my system Kubuntu 15.10 with Plasma 5.5.3. 
The fix does not solve the problem. please reopen the bug
Comment 18 Sebastian Kenn 2016-02-25 21:54:33 UTC
Today I installed the update to Plasma 5.5.4. with no effect. The trouble still occurs.
Comment 19 notz76 2016-02-27 12:53:03 UTC
The patch is added after 5.5.4. So it depends if kde 5.5.5 is relased or not. 

KDE Schedule: 

5.5.5	Bugfix	Tue 2016-03-01	Tue 2016-03-01	Bug fixes and new translations only from Plasma/5.5 branch - only if needed