Kdeinit4 is leaking memory on every ssh login due to known bug on policykit-1
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | PolicyKit |
Fix Released
|
High
|
||
| | policykit-1 (Ubuntu) |
Undecided
|
Unassigned | ||
| | Trusty |
Undecided
|
Unassigned | ||
| | Utopic |
Undecided
|
Unassigned | ||
| | Vivid |
Undecided
|
Unassigned | ||
Bug Description
A memory leak in policykit causes memory exhaustion over time in kdeinit4.
[Test Case]
1- check memory usage of kdeinit4 under htop (RES column)
2- ssh in
3- check to make sure it stays constant
[Regression Potential]
If the patch is incorrect, policykit could possibly crash.
Every time ssh login is made on ubuntu 14.04, kdeinit4 leaks 2-3 Mb (when kde is installed).
According to previous bug report in: https:/
this is a bug in policykit-1 package, and it has been already fixed on upstream.
Update of policykit-1 should fix this problem on kubuntu 14.04 and Ubuntu 14.04 + Kde.
This bug is severe in some specific scenarios where ssh is often used.
In my case, I have a lot of scripts running processes every hour between ubuntu and kubuntu machines using passwordless ssh login. In few days kubuntu machines don't have free memory, due to the referred leak.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: policykit-1 0.105-4ubuntu2
ProcVersionSign
Uname: Linux 3.13.0-43-generic x86_64
NonfreeKernelMo
ApportVersion: 2.14.1-0ubuntu3.6
Architecture: amd64
CurrentDesktop: KDE
Date: Tue Feb 3 15:33:04 2015
InstallationDate: Installed on 2013-09-26 (494 days ago)
InstallationMedia: Kubuntu 13.10 "Saucy Salamander" - Alpha amd64 (20130902.2)
SourcePackage: policykit-1
UpgradeStatus: Upgraded to trusty on 2014-04-14 (294 days ago)
|
|
#6 |
There is high possibility that this bug causes memory leaking in kded4 (see https:/
|
|
#7 |
Looks good to me, thanks! I tweaked the commit message to match the standard style, and pushed.
| Luis Lucas (lfrlucas) wrote : | #1 |
| Launchpad Janitor (janitor) wrote : | #2 |
Status changed to 'Confirmed' because the bug affects multiple users.
| Changed in policykit-1 (Ubuntu): | |
| status: | New → Confirmed |
| Dimitri John Ledkov (xnox) wrote : | #3 |
This appears to be the fix, unreleased upstream yet, thus probably affects all current series.
http://
| Luis Lucas (lfrlucas) wrote : | #4 |
I applied this patch: http://
I check memory usage of kdeinit4 under htop (RES column), ssh in, check again it stays constant now.
| Changed in policykit-1: | |
| importance: | Unknown → High |
| status: | Unknown → Fix Released |
| Luis Lucas (lfrlucas) wrote : | #8 |
debdiff for the bug fix is in attachment
| Dimitri John Ledkov (xnox) wrote : | #9 |
By large the above debdiff should be (with correct version number and target) should be applied and uploaded into vivid, utopic and trusty.
Series targets opened & ubuntu-sponsors subscribed to the bug report.
Test case description for SRUs is in https:/
| Changed in policykit-1 (Ubuntu Trusty): | |
| status: | New → Confirmed |
| Changed in policykit-1 (Ubuntu Utopic): | |
| status: | New → Confirmed |
| Marc Deslauriers (mdeslaur) wrote : | #10 |
ACK on the debdiff.
I've uploaded to vivid.
I've uploaded to trusty and utopic for processing by the SRU team.
Thanks!
| description: | updated |
| Changed in policykit-1 (Ubuntu Vivid): | |
| status: | Confirmed → Fix Committed |
| Changed in policykit-1 (Ubuntu Trusty): | |
| status: | Confirmed → In Progress |
| Changed in policykit-1 (Ubuntu Utopic): | |
| status: | Confirmed → In Progress |
| Launchpad Janitor (janitor) wrote : | #11 |
This bug was fixed in the package policykit-1 - 0.105-8ubuntu2
---------------
policykit-1 (0.105-8ubuntu2) vivid; urgency=medium
* debian/
authority: Fix memory leak in EnumerateActions call results handler
(lp: #1417637)
-- Luis Lucas <email address hidden> Tue, 03 Feb 2015 17:15:02 +0000
| Changed in policykit-1 (Ubuntu Vivid): | |
| status: | Fix Committed → Fix Released |
Hello Luis, or anyone else affected,
Accepted policykit-1 into utopic-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| Changed in policykit-1 (Ubuntu Utopic): | |
| status: | In Progress → Fix Committed |
| tags: | added: verification-needed |
| Changed in policykit-1 (Ubuntu Trusty): | |
| status: | In Progress → Fix Committed |
| Brian Murray (brian-murray) wrote : | #13 |
Hello Luis, or anyone else affected,
Accepted policykit-1 into trusty-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| Luis Lucas (lfrlucas) wrote : Re: [Bug 1417637] Re: Kdeinit4 is leaking memory on every ssh login due to known bug on policykit-1 | #14 |
Hello,
I added trusty-proposed source to my ubuntu 14.04 system and I installed
the new policykit-1 packaged. I reproduced the bug and it isn't solved.
Am I missing something in the verification process?
Best regards
Luis Lucas
2015-03-04 22:40 GMT+00:00 Brian Murray <email address hidden>:
> Hello Luis, or anyone else affected,
>
> Accepted policykit-1 into utopic-proposed. The package will build now
> and be available at
> https:/
> in a few hours, and then in the -proposed repository.
>
> Please help us by testing this new package. See
> https:/
> 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 to verification-done. If it does not fix the
> bug for you, please add a comment stating that, and change the tag to
> verification-
> us make a better decision.
>
> Further information regarding the verification process can be found at
> https:/
> advance!
>
> ** Changed in: policykit-1 (Ubuntu Utopic)
> Status: In Progress => Fix Committed
>
> ** Tags added: verification-needed
>
> ** Changed in: policykit-1 (Ubuntu Trusty)
> Status: In Progress => Fix Committed
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> Kdeinit4 is leaking memory on every ssh login due to known bug on
> policykit-1
>
> Status in System policy:
> Fix Released
> Status in policykit-1 package in Ubuntu:
> Fix Released
> Status in policykit-1 source package in Trusty:
> Fix Committed
> Status in policykit-1 source package in Utopic:
> Fix Committed
> Status in policykit-1 source package in Vivid:
> Fix Released
>
> Bug description:
> A memory leak in policykit causes memory exhaustion over time in
> kdeinit4.
>
> [Test Case]
> 1- check memory usage of kdeinit4 under htop (RES column)
> 2- ssh in
> 3- check to make sure it stays constant
>
> [Regression Potential]
> If the patch is incorrect, policykit could possibly crash.
>
>
> Every time ssh login is made on ubuntu 14.04, kdeinit4 leaks 2-3 Mb
> (when kde is installed).
> According to previous bug report in:
> https:/
> this is a bug in policykit-1 package, and it has been already fixed on
> upstream.
> Update of policykit-1 should fix this problem on kubuntu 14.04 and
> Ubuntu 14.04 + Kde.
>
> This bug is severe in some specific scenarios where ssh is often used.
> In my case, I have a lot of scripts running processes every hour between
> ubuntu and kubuntu machines using passwordless ssh login. In few days
> kubuntu machines don't have free memory, due to the referred leak.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 14.04
> Package: policykit-1 0.105-4ub...
| Luis Lucas (lfrlucas) wrote : | #16 |
I installed polkicykit-1 and libpolkit dependencies from trusty proposed ppa (version 0.105-4ubuntu2.
I tried to reproduce the bug and it was gone.
Thank you for accepting this bug fix!
| tags: |
added: verification-done removed: verification-needed |
| tags: |
added: verification-done-trusty verification-needed removed: verification-done |
| tags: |
added: verification-needed-utopic removed: verification-needed |
| Launchpad Janitor (janitor) wrote : | #17 |
This bug was fixed in the package policykit-1 - 0.105-4ubuntu2.
---------------
policykit-1 (0.105-
* debian/
authority: Fix memory leak in EnumerateActions call results handler
(lp: #1417637)
-- Luis Lucas <email address hidden> Tue, 03 Feb 2015 17:15:02 +0000
| Changed in policykit-1 (Ubuntu Trusty): | |
| status: | Fix Committed → Fix Released |
| Chris J Arges (arges) wrote : Update Released | #18 |
The verification of the Stable Release Update for policykit-1 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.
| Launchpad Janitor (janitor) wrote : | #19 |
This bug was fixed in the package policykit-1 - 0.105-4ubuntu2.
---------------
policykit-1 (0.105-
* debian/
authority: Fix memory leak in EnumerateActions call results handler
(lp: #1417637)
-- Luis Lucas <email address hidden> Tue, 03 Feb 2015 17:15:02 +0000
| Changed in policykit-1 (Ubuntu Utopic): | |
| status: | Fix Committed → Fix Released |


Created attachment 112087
Fix for memory leak in EnumerateActions call results handler.
I've found, that policykit-1-0.105 in my Debian Wheezy doesn't release reference counters of GVariant data for org.freedesktop .PolicyKit1. Authority. EnumerateAction s DBUS call resulting data.
See patch in attachment.
g_variant_ref_sink (child) call was odd in case of iterating array child items.