Packagekitd keeps writing to logs, uses disk, ram and CPU

Hi, again: Packagekitd writes all the time to logs, uses cpu and ram, I had reported some time ago, I was on Fedora 33, to this day it continues. Perhaps, here is the best place for this kind of reporting, help.
Anyone have a solution?
I would like to avoid uninstalling packagekitd, it gives me the convenience of offline updates from GNOME Software, many times I upgrade when I turn off the PC, it is very convenient.

3 Likes

In case you didn’t know, you can use dnf to perform offline upgrades as well. no need for packagekit.

2 Likes

Yes I know. But as I wrote, I would like to use the GUI: GNOME Software, I click> download packages, when I decide to shut down the PC, before shutting down it does offline upgrades, this is very convenient for me compared to: dnf upgrade offline> dnf upgrade reboot > turn off PC.
So why not implement it in a separate tool like Ubuntu does? Ubuntu manages upgrades separately from GNOME Software and they use APT. You could do something similar with DNF, right?
From what I have read, it is a bug of many years and still not fixed by the packagekit side.
Thanks for the reply

1 Like

I think your best bet is to either re-open the bug or file a new one. It is meant to be fixed, but perhaps there’s a regression or it’s a new bug that’s causing this logging. So, speaking directly to the maintainers is the quickest. Here, we can help diagnose bugs or suggest workarounds, but fixing requires the maintainers/developers to look into it.

2 Likes

Do you have upgraded Fedora 33 to Fedora 34 or it is a new installation?

Which repositories do you have enabled? Could you show the result of
dnf repolist

upgrade from Fedora 33 to 34

dnf repolist:

id repo                                                                                           nome repo
MEGAsync                                                                                          MEGAsync
brave-browser-rpm-release.s3.brave.com_x86_64_                                                    created by dnf config-manager from https://brave-browser-rpm-release.s3.brave.com/x86_64/
copr:copr.fedorainfracloud.org:kwizart:fedy                                                       Copr repo for fedy owned by kwizart
fedora                                                                                            Fedora 34 - x86_64
fedora-cisco-openh264                                                                             Fedora 34 openh264 (From Cisco) - x86_64
fedora-modular                                                                                    Fedora Modular 34 - x86_64
google-chrome                                                                                     google-chrome
google-earth-pro                                                                                  google-earth-pro
opera                                                                                             Opera packages
rpmfusion-free                                                                                    RPM Fusion for Fedora 34 - Free
rpmfusion-free-tainted                                                                            RPM Fusion for Fedora 34 - Free tainted
rpmfusion-free-updates                                                                            RPM Fusion for Fedora 34 - Free - Updates
rpmfusion-nonfree                                                                                 RPM Fusion for Fedora 34 - Nonfree
rpmfusion-nonfree-nvidia-driver                                                                   RPM Fusion for Fedora 34 - Nonfree - NVIDIA Driver
rpmfusion-nonfree-steam                                                                           RPM Fusion for Fedora 34 - Nonfree - Steam
rpmfusion-nonfree-updates                                                                         RPM Fusion for Fedora 34 - Nonfree - Updates
updates                                                                                           Fedora 34 - x86_64 - Updates
updates-modular                                                                                   Fedora Modular 34 - x86_64 - Updates

I commented HERE, is it right or should I open a new one?

OK. So you brought the problem with you.

Just to try, if you haven’t already done this test, I would disable all the repositories and look if the issue is still there, then enable them one by one, and wait and look again, after each single re-enabled repository, if the issue reappears; starting from the default ones and subsequently the third party ones.

2 Likes

Yes, I noticed that. You can either re-open the bug, or open a new one.

I had missed this,and I agree. It’ll be worth testing with a fresh install, in case this is caused by some configuration that has changed over releases.

1 Like

Ok, I understand what you mean. Thanks Alessio I try.

1 Like

Tried, unfortunately nothing changes. :slightly_frowning_face:

Also in the case that all the repositories are disabled?

Yes, everything disabled and for safety I also rebooted, nothing has changed.

Weird.
When the rpositories are disabled, does pkcon repo-list reflect the expected status?

[emanu@desktop ~]$ dnf repolist

[emanu@desktop ~]$ pkcon repo-list

Recupero dei repository [=========================]
Completato [=========================]
Disabilitato updates-testing Fedora 34 - x86_64 - Test Updates
Disabilitato updates-testing-debuginfo Fedora 34 - x86_64 - Test Updates Debug
Disabilitato updates-testing-source Fedora 34 - Test Updates Source
Disabilitato updates Fedora 34 - x86_64 - Updates
Disabilitato updates-debuginfo Fedora 34 - x86_64 - Updates - Debug
Disabilitato updates-source Fedora 34 - Updates Source
Disabilitato fedora Fedora 34 - x86_64
Disabilitato fedora-debuginfo Fedora 34 - x86_64 - Debug
Disabilitato fedora-source Fedora 34 - Source
Disabilitato rpmfusion-free-updates-testing RPM Fusion for Fedora 34 - Free - Test Updates
Disabilitato rpmfusion-free-updates-testing-debuginfo RPM Fusion for Fedora 34 - Free - Test Updates Debug
Disabilitato rpmfusion-free-updates-testing-source RPM Fusion for Fedora 34 - Free - Test Updates Source
Disabilitato rpmfusion-nonfree-updates-testing RPM Fusion for Fedora 34 - Nonfree - Test Updates
Disabilitato rpmfusion-nonfree-updates-testing-debuginfo RPM Fusion for Fedora 34 - Nonfree - Test Updates Debug
Disabilitato rpmfusion-nonfree-updates-testing-source RPM Fusion for Fedora 34 - Nonfree - Test Updates Source
Disabilitato updates-testing-modular Fedora Modular 34 - x86_64 - Test Updates
Disabilitato updates-testing-modular-debuginfo Fedora Modular 34 - x86_64 - Test Updates Debug
Disabilitato updates-testing-modular-source Fedora Modular 34 - Test Updates Source
Disabilitato fedora-modular Fedora Modular 34 - x86_64
Disabilitato fedora-modular-debuginfo Fedora Modular 34 - x86_64 - Debug
Disabilitato fedora-modular-source Fedora Modular 34 - Source
Disabilitato updates-modular Fedora Modular 34 - x86_64 - Updates
Disabilitato updates-modular-debuginfo Fedora Modular 34 - x86_64 - Updates - Debug
Disabilitato updates-modular-source Fedora Modular 34 - Updates Source
Disabilitato copr:copr.fedorainfracloud.org:kwizart:fedy Copr repo for fedy owned by kwizart
Disabilitato brave-browser-rpm-release.s3.brave.com_x86_64_ created by dnf config-manager from https://brave-browser-rpm-release.s3.brave.com/x86_64/
Disabilitato fedora-cisco-openh264 Fedora 34 openh264 (From Cisco) - x86_64
Disabilitato fedora-cisco-openh264-debuginfo Fedora 34 openh264 (From Cisco) - x86_64 - Debug
Disabilitato google-earth-pro google-earth-pro
Disabilitato MEGAsync MEGAsync
Disabilitato opera Opera packages
Disabilitato rpmfusion-free RPM Fusion for Fedora 34 - Free
Disabilitato rpmfusion-free-debuginfo RPM Fusion for Fedora 34 - Free - Debug
Disabilitato rpmfusion-free-source RPM Fusion for Fedora 34 - Free - Source
Disabilitato rpmfusion-free-tainted RPM Fusion for Fedora 34 - Free tainted
Disabilitato rpmfusion-free-tainted-debuginfo RPM Fusion for Fedora 34 - Free tainted - Debug
Disabilitato rpmfusion-free-tainted-source RPM Fusion for Fedora 34 - Free tainted - Source
Disabilitato rpmfusion-free-updates RPM Fusion for Fedora 34 - Free - Updates
Disabilitato rpmfusion-free-updates-debuginfo RPM Fusion for Fedora 34 - Free - Updates Debug
Disabilitato rpmfusion-free-updates-source RPM Fusion for Fedora 34 - Free - Updates Source
Disabilitato rpmfusion-nonfree RPM Fusion for Fedora 34 - Nonfree
Disabilitato rpmfusion-nonfree-debuginfo RPM Fusion for Fedora 34 - Nonfree - Debug
Disabilitato rpmfusion-nonfree-source RPM Fusion for Fedora 34 - Nonfree - Source
Disabilitato rpmfusion-nonfree-updates RPM Fusion for Fedora 34 - Nonfree - Updates
Disabilitato rpmfusion-nonfree-updates-debuginfo RPM Fusion for Fedora 34 - Nonfree - Updates Debug
Disabilitato rpmfusion-nonfree-updates-source RPM Fusion for Fedora 34 - Nonfree - Updates Source

As you can see, nothing changes.

I don’t know if it will be useful, but I started packagekit in “verbose” mode.
Documentation: PackageKit - Reporting Bugs

https://paste.centos.org/view/32466de9

I repeated it again, found these logs, I hope they add some more information:

0	get-updates	/2171_caacaded	state[finished] exclusive[1] background[0]
1	get-updates	/2172_aebbbbbe	state[finished] exclusive[1] background[0]
2	get-updates	/2173_edcbbabe	state[finished] exclusive[1] background[0]
3	get-updates	/2174_ddbddbcd	state[finished] exclusive[1] background[0]
4	get-updates	/2175_eabdbcad	state[finished] exclusive[1] background[0]
5	unknown	/2176_debebbda	state[new] exclusive[0] background[0]

18:39:59	PackageKit	1 have an unknown role (CreateTransaction then nothing?)
18:39:59	PackageKit	State:
0	get-updates	/2171_caacaded	state[finished] exclusive[1] background[0]
1	get-updates	/2172_aebbbbbe	state[finished] exclusive[1] background[0]
2	get-updates	/2173_edcbbabe	state[finished] exclusive[1] background[0]
3	get-updates	/2174_ddbddbcd	state[finished] exclusive[1] background[0]
4	get-updates	/2175_eabdbcad	state[finished] exclusive[1] background[0]
5	unknown	/2176_debebbda	state[new] exclusive[0] background[0]

18:39:59	PackageKit	1 have not been committed and may be pending auth
18:39:59	PackageKit	transaction /2171_caacaded completed, removing
18:39:59	PackageKit	emitting destroy /2171_caacaded
18:39:59	PackageKit	SetHints method called: locale=C, background=false, interactive=true, cache-age=4294967295
18:39:59	PackageKit	cache-age changed to 4294967295
18:39:59	PackageKit	GetUpdates method called
18:39:59	PackageKit	transaction now ready
18:39:59	PackageKit	changing transaction to exclusive mode
18:39:59	PackageKit	5 transactions in list, 1 committed but not finished
18:39:59	PackageKit	transaction now running
18:39:59	PackageKit	install uid now 1000
18:39:59	PackageKit	install cmdline now PackageKit: get-updates
18:39:59	PackageKit	setting role for /2176_debebbda to get-updates
18:39:59	PackageKit-DNF	using cached sack DnfSack::release_ver[34]::filelists|remote
18:39:59	PackageKit	backend was running for 51 ms
18:39:59	PackageKit	emitting finished 'success', 51
18:39:59	PackageKit	transaction now finished
18:39:59	PackageKit	5 transactions in list, 0 committed but not finished

No. I don’t know. In a VM I enabled the repositories you have. I’ve installed and removed packages, performed updates and so on, but when the operations are concluded, the log stays silent: I’m unable to reproduce all this flood.

I don’t remember. Did you already try to perform this command?
pkcon repair

Or/and

sudo systemctl stop packagekit.service && sudo rm -rf /var/cache/PackageKit/* && sudo systemctl start packagekit.service

then

pkcon refresh -v

If nothing changes, I would file a new bug highlighting that the log is flooded even if all the repositories are disabled.


Unfortunately it doesn’t solve

Not related to Fedora 1820931 – PackageKit get-updates being called every second, but interesting.
It says "PackageKit does not schedule it’s own transactions. Something must be calling into PackageKit in a loop […] You need to find the process that’s calling PackageKit. Maybe top or ps would help?

1 Like

Unfortunately I can’t find it, but when I enable the “verbose”, it seems that packagekit is called by DNF:

lug 06 15:11:35 desktop packagekitd[1418]: 15:11:35 PackageKit trying to open database ‘/var/lib/PackageKit/transactions.db’
lug 06 15:11:35 desktop packagekitd[1418]: 15:11:35 PackageKit-DNF using cached sack DnfSack::release_ver[34]::filelists|remote

Thanks for your help.