RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1854875 - Possible memory leak in packagekit
Summary: Possible memory leak in packagekit
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: PackageKit
Version: 8.3
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Richard Hughes
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-08 11:54 UTC by Michal Karm Babacek
Modified: 2023-09-15 00:34 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-01-08 07:26:59 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1354074 0 high CLOSED Possible big memory leak in packagekit 2023-11-18 13:05:24 UTC

Description Michal Karm Babacek 2020-07-08 11:54:39 UTC
Description of problem:
/usr/libexec/packagekitd 's RSS memeory usage on our RHEL 8.3 system grows over time from a couple of hundreds to a couple of thousands megabytes.

Version-Release number of selected component (if applicable):

> $ rpm -qa | grep .ackage.it
> PackageKit-1.1.12-6.el8.x86_64
> cockpit-packagekit-221-1.el8.noarch
> PackageKit-glib-1.1.12-6.el8.x86_64

How reproducible:
Always. Every 3 weeks or so of uptime.

Steps to Reproduce:
1. Start the system
2. Run Java programs, use the system and wait
3. packagekitd's RSS goes through the roof 

Actual results:
PID    PPID   RSS   CMD
1777   1      2072M /usr/libexec/packagekitd

Expected results:
PID    PPID   RSS   CMD
1809   1      233M  /usr/libexec/packagekitd

Additional info:
There seems to be no obvious reason for packagekitd to hold on to so much memory.

There is nothing special in the config:


> $ cat /etc/PackageKit/PackageKit.conf
> # Only the system administrator should modify this file, ordinary users
> # should not have to change anything.
> 
> [Daemon]
> 
> # Default backends, as chosen in the configure script. This will be used
> # where no --backend="foo" option is given to the daemon.
> #
> # The order they are specified is the order they are tried, so for the
> # value "foo,bar" first "foo" will be attempted and then "bar" if the
> # libpk_backend_foo.so module load failed.
> #DefaultBackend=auto
> 
> # Unlock the backend after this many seconds idle.
> #BackendShutdownTimeout=5
> 
> # Shut down the daemon after this many seconds idle. 0 means don't shutdown.
> #ShutdownTimeout=300
> 
> # Keep the packages after they have been downloaded
> #KeepCache=false

Comment 1 Richard Hughes 2020-09-21 07:46:56 UTC
Can you outline a way to reproduce this please? I obviously don't see the kind of memory usage here. Thanks.

Comment 2 Michal Karm Babacek 2020-09-24 10:46:54 UTC
Hi Richard,

It might sound silly, but I really haven't done anything besides the aforementioned:

Steps to Reproduce:
1. Start the system
2. Run Java programs, use the system and wait
3. packagekitd's RSS goes through the roof 

@Jiri Vanek: How is the system doing these days? Do we restart it regularly to workaround it or did recent updates fix it?

Comment 3 jiri vanek 2020-09-24 13:46:29 UTC
The machine is geerting regualr updates, but I thin you have disabled the service as the result, havent you?
On hel (el 8.3 pre), Linux hel.brq.redhat.com 4.18.0-232.el8.x86_64 #1 SMP Mon Aug 10 06:55:47 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux:
    PID     TID CLS RTPRIO STAT    VSZ   RSS COMMAND
   1811    1811 TS       - Ssl  461876  5144 packagekitd

On helson (8.2 updated), the process is not running.
Linux helson.tpb.lab.eng.brq.redhat.com 4.18.0-147.5.1.el8_1.x86_64 #1 SMP Tue Jan 14 15:50:19 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

The reboot of machines was aprox month or two ago.

Comment 5 XinhuaLi 2021-02-22 01:49:48 UTC
Hi 

Good day.
I can see similar behavior against RHEL 8.2/8.3; however, i do not know the reproduce procedure.

- 1, RHEL 8.3
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
root        3705  0.0 17.3 7874628 7036612 ?     Ssl  Jan10  27:39 /usr/libexec/packagekitd
-------------------------------------------------------------------------------------
PackageKit-1.1.12-6.el8.x86_64

Red Hat Enterprise Linux release 8.3 (Ootpa)

4.18.0-240.10.1.el8_3.x86_64 #1 SMP Wed Dec 16 03:30:52 EST 2020 x86_64 x86_64 x86_64 GNU/Linux

# uptime 
08:47:24 up 42 days, 12:17,  2 users,  load average: 4.27, 3.98, 3.39
-------------------------------------------------------------------------------------

- 2, RHEL 8.2
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
root        4036  3.9  2.8 676876 137248 ?       Ssl  08:55   0:03 /usr/libexec/packagekitd
-------------------------------------------------------------------------------------
PackageKit-1.1.12-4.el8.x86_64

Red Hat Enterprise Linux release 8.2 (Ootpa)

4.18.0-193.el8.x86_64 #1 SMP Fri Mar 27 14:35:58 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

# uptime 
09:04:34 up  1:39,  3 users,  load average: 0.02, 0.12, 0.08
-------------------------------------------------------------------------------------

Regards
Sam

Comment 6 Chris Murphy 2021-03-27 18:20:50 UTC
See also bug 1896964.

Comment 7 Richard Hughes 2021-10-05 11:09:23 UTC
If you log the heap using valgrind, is it PackageKit that's consuming such a huge amount of RSS, or a library that it's using? e.g. libdnf for instance?

Comment 9 RHEL Program Management 2022-01-08 07:26:59 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 10 Red Hat Bugzilla 2023-09-15 00:34:01 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days


Note You need to log in before you can comment on or make changes to this bug.