Bug 1820931

Summary: PackageKit get-updates being called every second
Product: Red Hat Enterprise Linux 8 Reporter: Andrew Munn <andrew>
Component: PackageKitAssignee: Richard Hughes <rhughes>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, carl, jwboyer, klember
Target Milestone: rcFlags: andrew: needinfo-
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-04 07:26:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrew Munn 2020-04-04 21:41:08 UTC
Description of problem:

PackageKit's get-updates is being called every second.  Causes repeated disk writes.

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

CentOS 8.1

How reproducible:

Always

Steps to Reproduce:
1. Install CentOS 8.1
2. wait until you see something hitting the disk every second - it's packagekitd!

Additional info:

killing gnome-software does not effect it.

"systemctl set-default multi-user.target" and reboot does not prevent it from starting. Gnome is now not running but packagekitd get-updates is still running. 

systemctl stop or disable stops it only temporarily.  Something restarts the service.

iotop shows this:

Total DISK READ :       0.00 B/s | Total DISK WRITE :     227.22 K/s
Actual DISK READ:       0.00 B/s | Actual DISK WRITE:     228.18 K/s
  TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND
 9135 be/4 root        0.00 B/s  215.66 K/s  0.00 %  0.80 % packagekitd


systemctl status packagekit show this:

Apr 04 15:33:07 localhost.localdomain PackageKit[31340]: get-updates transaction /113314_ebaaaded from uid 1000 finished with success after 41ms
Apr 04 15:33:08 localhost.localdomain PackageKit[31340]: get-updates transaction /113315_dccadeea from uid 1000 finished with success after 41ms
Apr 04 15:33:09 localhost.localdomain PackageKit[31340]: get-updates transaction /113316_ddbdaddd from uid 1000 finished with success after 41ms

logs repeat this every sec: 

 10:19:41 PackageKit transaction /44326_dcdccddc completed, removing
 10:19:41 PackageKit emitting destroy /44326_dcdccddc
 10:19:41 PackageKit CreateTransaction method called
 10:19:41 PackageKit job count now 44331
 10:19:41 PackageKit trying to open database
  '/var/lib/PackageKit/transactions.db'
 10:19:41 PackageKit job count is now at 44330
 10:19:41 PackageKit transaction now new
 10:19:41 PackageKit setting sender to :1.45185
 10:19:41 PackageKit adding transaction 0x56396c506be0
 10:19:41 PackageKit sending object path: '/44331_daedeebe'
 10:19:41 PackageKit SetHints method called: locale=C, background=false,
 interactive=true, cache-age=4294967295
 10:19:41 PackageKit cache-age changed to 4294967295
 10:19:41 PackageKit GetUpdates method called
 10:19:41 PackageKit transaction now ready
 10:19:41 PackageKit changing transaction to exclusive mode
 10:19:41 PackageKit 5 transactions in list, 1 committed but not finished
 10:19:41 PackageKit transaction now running
 10:19:41 PackageKit install uid now 1000
 10:19:41 PackageKit install cmdline now PackageKit: get-updates
 10:19:41 PackageKit setting role for /44331_daedeebe to get-updates
 10:19:41 PackageKit-DNF using cached sack
 DnfSack::release_ver[8]::filelists|remote
 10:19:41 PackageKit backend was running for 40 ms
 10:19:41 PackageKit emitting finished 'success', 40
 10:19:41 PackageKit transaction now finished
 10:19:41 PackageKit 5 transactions in list, 0 committed but not finished

Comment 1 Richard Hughes 2020-09-21 07:40:43 UTC
> killing gnome-software does not effect it

PackageKit does not schedule it's own transactions. Something must be calling into PackageKit in a loop. Are you running stock GNOME from Centos? Is this a clean install?

Comment 2 Andrew Munn 2020-09-21 13:25:29 UTC
This was a clean install of Centos 8.1 with default gnome.  Some updates may have been applied after the install.  I only noticed this because it was installed on a noisy old hard drive that I could hear writing every second.  

Maybe updates since April have fixed it or maybe it's still happening because I see this one one of my CentOS VMs now:

# uname -a
Linux prod 4.18.0-193.14.2.el8_2.x86_64 #1 SMP Sun Jul 26 03:54:29 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

# systemctl status packagekit
● packagekit.service - PackageKit Daemon
   Loaded: loaded (/usr/lib/systemd/system/packagekit.service; static; vendor preset: disabled)
   Active: inactive (dead)

Sep 20 19:11:32 prod PackageKit[1417254]: get-updates transaction /1034072_deecbada from uid 1000 finished with success after 36ms
Sep 20 19:11:33 prod PackageKit[1417254]: get-updates transaction /1034073_aabceeed from uid 1000 finished with success after 37ms
Sep 20 19:11:33 prod PackageKit[1417254]: get-updates transaction /1034074_ecdbeeed from uid 1000 finished with success after 29ms
Sep 20 19:11:34 prod PackageKit[1417254]: get-updates transaction /1034075_cbdebeaa from uid 1000 finished with success after 30ms
Sep 20 19:11:34 prod PackageKit[1417254]: get-updates transaction /1034076_bbcdbcda from uid 1000 finished with success after 37ms
Sep 20 19:11:35 prod PackageKit[1417254]: get-updates transaction /1034077_ebbbcaca from uid 1000 finished with success after 37ms
Sep 20 19:11:35 prod PackageKit[1417254]: get-updates transaction /1034078_ccdedcae from uid 1000 finished with success after 33ms
Sep 20 19:11:36 prod PackageKit[1417254]: get-updates transaction /1034079_dddcdbcd from uid 1000 finished with success after 34ms
Sep 20 19:11:36 prod PackageKit[1417254]: get-updates transaction /1034080_cedebccb from uid 1000 finished with success after 26ms
Sep 20 19:16:38 prod PackageKit[1417254]: daemon quit

Should it be running twice a second like that?

Comment 4 Richard Hughes 2021-04-12 19:25:04 UTC
You need to find the process that's calling PackageKit. Maybe top or ps would help?

Comment 6 RHEL Program Management 2021-10-04 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.