Bug 602485

Summary: packagekitd leak - cause OOM killer
Product: [Fedora] Fedora Reporter: Mads Kiilerich <mads>
Component: PackageKitAssignee: Richard Hughes <richard>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: jonathan, rhughes, richard, smparrish
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-27 17:55:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
peek into /proc for packagekitd none

Description Mads Kiilerich 2010-06-09 23:15:38 UTC
My machine had been using all swap space, but I didn't care until it got unresponsive and started trashing until OOM killer had made a massacre.

top showed
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1512 root      20   0 2871m 673m   24 D  0.3 33.4   8:18.78 packagekitd

ll /proc/1512/fd said
lrwx------ 1 root root 64 Jun 10 00:50 0 -> /dev/null
lrwx------ 1 root root 64 Jun 10 00:50 1 -> /dev/null
lrwx------ 1 root root 64 Jun 10 00:50 10 -> /var/lib/PackageKit/desktop-files.db
lrwx------ 1 root root 64 Jun 10 00:50 100 -> /var/lib/PackageKit/transactions.db
lrwx------ 1 root root 64 Jun 10 00:50 1000 -> /var/lib/PackageKit/desktop-files.db
lrwx------ 1 root root 64 Jun 10 00:50 1001 -> /var/lib/PackageKit/transactions.db
lrwx------ 1 root root 64 Jun 10 00:50 1002 -> /var/lib/PackageKit/desktop-files.db
lrwx------ 1 root root 64 Jun 10 00:50 1003 -> /var/lib/PackageKit/transactions.db
lrwx------ 1 root root 64 Jun 10 00:50 1004 -> /var/lib/PackageKit/desktop-files.db
lrwx------ 1 root root 64 Jun 10 00:50 1005 -> /var/lib/PackageKit/transactions.db
lrwx------ 1 root root 64 Jun 10 00:50 1006 -> /var/lib/PackageKit/desktop-files.db
lrwx------ 1 root root 64 Jun 10 00:50 1007 -> /var/lib/PackageKit/transactions.db
lrwx------ 1 root root 64 Jun 10 00:50 1008 -> /var/lib/PackageKit/desktop-files.db
lrwx------ 1 root root 64 Jun 10 00:50 1009 -> /var/lib/PackageKit/transactions.db
lrwx------ 1 root root 64 Jun 10 00:50 101 -> /var/lib/PackageKit/transactions.db
lrwx------ 1 root root 64 Jun 10 00:50 1010 -> /var/lib/PackageKit/desktop-files.db
lrwx------ 1 root root 64 Jun 10 00:50 1011 -> /var/lib/PackageKit/transactions.db
lrwx------ 1 root root 64 Jun 10 00:50 1012 -> /var/lib/PackageKit/desktop-files.db
lrwx------ 1 root root 64 Jun 10 00:50 1013 -> /var/lib/PackageKit/transactions.db
lrwx------ 1 root root 64 Jun 10 00:50 1014 -> /var/lib/PackageKit/desktop-files.db
lrwx------ 1 root root 64 Jun 10 00:50 1015 -> /var/lib/PackageKit/transactions.db
lrwx------ 1 root root 64 Jun 10 00:50 1016 -> /var/lib/PackageKit/desktop-files.db
lrwx------ 1 root root 64 Jun 10 00:50 1017 -> /var/lib/PackageKit/transactions.db
lrwx------ 1 root root 64 Jun 10 00:50 1018 -> /var/lib/PackageKit/desktop-files.db
lrwx------ 1 root root 64 Jun 10 00:50 1019 -> /var/lib/PackageKit/transactions.db
lrwx------ 1 root root 64 Jun 10 00:50 102 -> /var/lib/PackageKit/desktop-files.db
lrwx------ 1 root root 64 Jun 10 00:50 1020 -> /var/lib/PackageKit/desktop-files.db
lrwx------ 1 root root 64 Jun 10 00:50 1021 -> /var/lib/PackageKit/transactions.db
lrwx------ 1 root root 64 Jun 10 00:50 1022 -> /var/lib/PackageKit/desktop-files.db
lrwx------ 1 root root 64 Jun 10 00:50 1023 -> /var/lib/PackageKit/transactions.db
lrwx------ 1 root root 64 Jun 10 00:50 103 -> /var/lib/PackageKit/transactions.db

- so apparently PK was leaking somehow.

After I killed 1512 abrt said:
Jun 10 00:54:11 D610 abrt[30041]: saved core dump of pid 1512 (/usr/sbin/packagekitd (deleted)) to /var/cache/abrt/ccpp-1276122458-1512.new/coredump (1303396352 bytes)
Jun 10 00:54:12 D610 abrtd: Directory 'ccpp-1276122458-1512' creation detected
Jun 10 00:54:14 D610 abrtd: Executable '/usr/sbin/packagekitd (deleted)' doesn't belong to any package
Jun 10 00:54:14 D610 abrtd: Corrupted or bad crash /var/cache/abrt/ccpp-1276122458-1512 (res:4), deleting

- so apparently packagekitd was updated while it was running - perhaps that made it go crazy.

The updated package was PackageKit-0.6.5-1.fc13.i686

Comment 1 Richard Hughes 2010-06-10 10:25:32 UTC
Hmm, are you able to get the full data from valgrind when this happens please? That looks like a pretty huge leak, more than can be accounted from those sqlite databases on their own.

Comment 2 Mads Kiilerich 2010-06-14 23:04:35 UTC
Sorry, it only happened once and I don't know how to reproduce it, so I don't think I can provide further information. Valgrinding such a python system service would be another hard challenge. (I can imagine that systemtap could be more useful, but now it's too late ...)

Please just take this as a strong evidence that something strange happened. Perhaps it together with other strange reports will show some kind of pattern later on. That might be all we can do ... 

Please close this issue or leave it open, whatever you prefer.

Comment 3 Richard Hughes 2010-06-18 15:16:01 UTC
Okay, thanks for reporting, and please re-open if it happens again.

Comment 4 Mads Kiilerich 2010-07-13 19:36:43 UTC
Created attachment 431576 [details]
peek into /proc for packagekitd

It haven't crashed yet, but top shows packagekitd in bad company of memory hogs:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1924 mk        20   0 1835m 714m 9896 S  9.1 35.5 653:15.06 firefox
17107 mk        20   0 1124m 335m 4088 S  3.0 16.7 163:34.33 eclipse
 2330 root      20   0 1927m 196m 2096 S  0.0  9.8   5:51.06 packagekitd
 5867 mk        20   0  738m  88m 6976 S  1.3  4.4  70:05.93 thunderbird-bin

lrwxrwxrwx 1 root root 0 Jul 13 21:28 /proc/2330/exe -> /usr/sbin/packagekitd (deleted)

So again bad things happens when packagekit is upgraded (and the user has more important things to do than restarting).

Comment 5 Bug Zapper 2011-06-02 11:23:13 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Bug Zapper 2011-06-27 17:55:18 UTC
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.