menu-cached process is using 100% CPU

Bug #1635438 reported by William G. Comnisky
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
menu-cache (Ubuntu)
Fix Released
High
Simon Quigley
Xenial
Fix Released
High
Simon Quigley
Artful
Fix Released
High
Simon Quigley
Bionic
Fix Released
High
Simon Quigley

Bug Description

[Impact]

Without this bugfix, users who resume from suspend will be greeted with a heavy CPU load when they resume. This is especially bad for older computers who may not be able to hand a large CPU load, and menu-cache is included by default in Lubuntu, where this is especially important.

[Test Case]

1. Suspend your computer with the menu-cache process running.
2. Resume from suspend.
3. Try to press Alt + F2 or use any other program which calls menu-cached.

It should work as normal, but it uses up a lot of CPU power.

[Regression Potential]

This bugfix cherry picks an upstream commit that hasn't been tagged yet. As such, there might be additional improvements before it is released.

Also, this modifies how processes are handled; specifically, it terminates any processes which return a socket error. This could eventually bitrot and result in processes returning valid values but it really shows as an error.

While all of those are theoretical, it is definitely a possibility. Other than those two considerations, the regression risk is low.

[Original Description]

Hey all,

I don't know you guys are looking for the issues opened on Github (https://github.com/lxde/menu-cache/issues/) - currently there are 5 reported there, but I'd like to report specifically for the menu-cached process using 100% of CPU (we also have an issue opened on Github for this with lots of comments: https://github.com/lxde/menu-cache/issues/7).

I'm using a brand new installation of Lubuntu 16.10 in my laptop.

I noticed the machine temperature was too hot (96 degrees!!!) so I took a look on top and the menu-cached was the guilty. I killed it and everything was as usual again.

I just don't know if it was because I returned from the suspended mode or if it's because I tried to run a custom command with "Open With". I did both in sequence/same session.

$ dpkg -l |grep -iP "menu.*?cache"
ii libmenu-cache-bin 1.0.1-1build1 amd64
ii libmenu-cache3:amd64 1.0.1-1build1 amd64

Thanks

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package menu-cache - 1.0.2-1

---------------
menu-cache (1.0.2-1) unstable; urgency=medium

  * Merging upstream version 1.0.2 (LP: #1635438).
  * Bump Standards-Version to 3.9.8.

 -- Andriy Grytsenko <email address hidden> Sun, 06 Nov 2016 19:17:53 +0200

Changed in menu-cache (Ubuntu):
status: New → Fix Released
Revision history for this message
Simon Quigley (tsimonq2) wrote :

Actually, this bug wasn't completely fixed. See the upstream issue for more details, but I'm converting this into a 0 day SRU bug for Artful, and once it's there, an SRU bug for all other supported releases of Lubuntu.

Changed in menu-cache (Ubuntu Artful):
status: Fix Released → Confirmed
Changed in menu-cache (Ubuntu Zesty):
status: New → Confirmed
Changed in menu-cache (Ubuntu Xenial):
status: New → Confirmed
Changed in menu-cache (Ubuntu Trusty):
importance: Undecided → High
Changed in menu-cache (Ubuntu Xenial):
importance: Undecided → High
Changed in menu-cache (Ubuntu Zesty):
importance: Undecided → High
Changed in menu-cache (Ubuntu Artful):
importance: Undecided → High
assignee: nobody → Simon Quigley (tsimonq2)
milestone: none → artful-updates
Changed in menu-cache (Ubuntu Zesty):
milestone: none → zesty-updates
Changed in menu-cache (Ubuntu Xenial):
milestone: none → xenial-updates
Changed in menu-cache (Ubuntu Trusty):
milestone: none → trusty-updates
Changed in menu-cache (Ubuntu Zesty):
assignee: nobody → Simon Quigley (tsimonq2)
Changed in menu-cache (Ubuntu Xenial):
assignee: nobody → Simon Quigley (tsimonq2)
Simon Quigley (tsimonq2)
description: updated
description: updated
Revision history for this message
Andy Whitcroft (apw) wrote : Please test proposed package

Hello William, or anyone else affected,

Accepted menu-cache into artful-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/menu-cache/1.0.2-3ubuntu0.17.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-artful to verification-done-artful. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-artful. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in menu-cache (Ubuntu Artful):
status: Confirmed → Fix Committed
tags: added: verification-needed verification-needed-artful
Revision history for this message
Simon Quigley (tsimonq2) wrote :

This update works as intended on my system, it fixes the problem correctly.

tags: added: verification-done verification-done-artful
removed: verification-needed verification-needed-artful
Revision history for this message
William G. Comnisky (w-comnisky) wrote :

Hey guys,

I'm glad to hear that you managed to reproduce and fix it.

Thanks for that

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package menu-cache - 1.0.2-3ubuntu0.17.10.1

---------------
menu-cache (1.0.2-3ubuntu0.17.10.1) artful; urgency=high

  * Fix menu-cached so 100% CPU isn't used after suspend (LP: #1635438).
    - 90-1-fix-100-cpu-load.patch
    - 90-2-fix-100-cpu-load.patch

 -- Simon Quigley <email address hidden> Wed, 18 Oct 2017 18:47:37 -0500

Changed in menu-cache (Ubuntu Bionic):
status: Confirmed → Fix Released
Changed in menu-cache (Ubuntu Artful):
status: Fix Committed → Fix Released
status: Fix Committed → Fix Released
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for menu-cache has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Simon Quigley (tsimonq2) wrote :

Zesty is EOL, but I'll look into seeing if this is a Xenial problem as well ASAP.

Thanks.

Changed in menu-cache (Ubuntu Zesty):
status: Confirmed → Won't Fix
Simon Quigley (tsimonq2)
no longer affects: menu-cache (Ubuntu Zesty)
no longer affects: menu-cache (Ubuntu Trusty)
Simon Quigley (tsimonq2)
description: updated
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello William, or anyone else affected,

Accepted menu-cache into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/menu-cache/1.0.1-1ubuntu0.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in menu-cache (Ubuntu Xenial):
status: Confirmed → Fix Committed
tags: added: verification-needed verification-needed-xenial
removed: verification-done
Revision history for this message
Simon Quigley (tsimonq2) wrote :

After updating to 1.0.1-1ubuntu0.2 from xenial-proposed, the problem is indeed fixed.

Thanks.

tags: added: verification-done verification-done-xenial
removed: verification-needed verification-needed-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package menu-cache - 1.0.1-1ubuntu0.2

---------------
menu-cache (1.0.1-1ubuntu0.2) xenial; urgency=high

  * Fix menu-cached so 100% CPU isn't used after suspend (LP: #1635438).
    - 90-1-fix-100-cpu-load.patch
    - 90-2-fix-100-cpu-load.patch

 -- Simon Quigley <email address hidden> Sun, 28 Jan 2018 23:15:59 -0600

Changed in menu-cache (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.