Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packagekitd eats up CPU on Debian+Gnome-shell #740

Open
horvathcsabalaszlo opened this issue Apr 10, 2024 · 14 comments
Open

Packagekitd eats up CPU on Debian+Gnome-shell #740

horvathcsabalaszlo opened this issue Apr 10, 2024 · 14 comments

Comments

@horvathcsabalaszlo
Copy link

horvathcsabalaszlo commented Apr 10, 2024

Hi,

I have some Debian Testing machines, and all of them has the issue with Packagekitd. The typical situation 👍
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1016570 root 20 0 449040 38576 19084 S 64,5 0,2 2:53.20 packagekitd

But it goes up to 100% CPU usage.

The version is packagekit/testing,testing,now 1.2.8-2 amd64 (the other components are matching)

I have enabled the ShutdownTimeout=300 option, but does not help.

So i need to disable packagekitd if i don't want to get high CPU usage. But the packagekitd is needed for the apt-get upgrade process to work correctly, so i better want to avoid the disabling of packagekitd.

Is this a common problem? Can you please check? I'll be thankful :)

@sidt4
Copy link
Contributor

sidt4 commented Apr 11, 2024

When packagekitd is at 100%, can you get the following:

  1. Output of pkmon command
  2. Output of journalctl -xb /usr/libexec/packagekitd (as root)

@horvathcsabalaszlo
Copy link
Author

horvathcsabalaszlo commented Apr 12, 2024

Hi,

Thanks!

Gnome-software is already set to manual updates.

Finally i had time :

From top (it will hit 100% soon) :

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                            
1314463 root      20   0  449376  37396  18840 S  65,2   0,2  15:36.36 packagekitd      

Pkmon :

user@t430:~$ pkmon
Transactions:
 [none]
daemon connected=1
network status=online
Transactions:
 1	/248913_cdeccdbd
/248913_cdeccdbd	allow_cancel 1
/248913_cdeccdbd	percentage   -1
/248913_cdeccdbd	role         get-updates
/248913_cdeccdbd	sender       /usr/bin/gnome-software
/248913_cdeccdbd	status       setup

(pkmon:1324524): GLib-GIO-CRITICAL **: 19:10:46.448: GTask 0x55ade36f8f70 (source object: 0x55ade36f7d80, source tag: 0x7f88b68a61c0) finalized without ever returning (using g_task_return_*()). This potentially indicates a bug in the program.
Transactions:
 1	/248913_cdeccdbd
 2	/248914_eeedcdbc
/248914_eeedcdbc	allow_cancel 1
/248914_eeedcdbc	percentage   -1
/248914_eeedcdbc	role         get-updates
/248914_eeedcdbc	sender       /usr/bin/gnome-software
/248914_eeedcdbc	status       wait

(pkmon:1324524): GLib-GIO-CRITICAL **: 19:10:46.526: GTask 0x55ade36fe5c0 (source object: 0x55ade36f7d80, source tag: 0x7f88b68a61c0) finalized without ever returning (using g_task_return_*()). This potentially indicates a bug in the program.
Transactions:
 1	/248914_eeedcdbc
Transactions:
 1	/248914_eeedcdbc
 2	/248915_caaaaacd
Transactions:
 1	/248914_eeedcdbc
 2	/248915_caaaaacd
 3	/248916_dedaeeed
/248915_caaaaacd	allow_cancel 1
/248915_caaaaacd	percentage   -1
/248915_caaaaacd	role         get-details
/248915_caaaaacd	sender       /usr/bin/gnome-software
/248915_caaaaacd	status       wait

(pkmon:1324524): GLib-GIO-CRITICAL **: 19:10:47.192: GTask 0x55ade36f86f0 (source object: 0x55ade36f7d80, source tag: 0x7f88b68a61c0) finalized without ever returning (using g_task_return_*()). This potentially indicates a bug in the program.
/248916_dedaeeed	allow_cancel 1
/248916_dedaeeed	percentage   -1
/248916_dedaeeed	role         get-updates
/248916_dedaeeed	sender       /usr/bin/gnome-software
/248916_dedaeeed	status       wait

(pkmon:1324524): GLib-GIO-CRITICAL **: 19:10:47.192: GTask 0x55ade3701bc0 (source object: 0x55ade36f7d80, source tag: 0x7f88b68a61c0) finalized without ever returning (using g_task_return_*()). This potentially indicates a bug in the program.
Transactions:
 1	/248915_caaaaacd
 2	/248916_dedaeeed
Transactions:
 1	/248916_dedaeeed
Transactions:
 [none]
Transactions:
 1	/248917_eebaecdc
/248917_eebaecdc	allow_cancel 1
/248917_eebaecdc	percentage   -1
/248917_eebaecdc	role         get-updates
/248917_eebaecdc	sender       /usr/bin/gnome-software
/248917_eebaecdc	status       setup

(pkmon:1324524): GLib-GIO-CRITICAL **: 19:10:51.452: GTask 0x55ade36f86f0 (source object: 0x55ade36f7d80, source tag: 0x7f88b68a61c0) finalized without ever returning (using g_task_return_*()). This potentially indicates a bug in the program.
Transactions:
 1	/248917_eebaecdc
 2	/248918_cecbaebe
/248918_cecbaebe	allow_cancel 1
/248918_cecbaebe	percentage   -1
/248918_cecbaebe	role         get-updates
/248918_cecbaebe	sender       /usr/bin/gnome-software
/248918_cecbaebe	status       wait

(pkmon:1324524): GLib-GIO-CRITICAL **: 19:10:51.538: GTask 0x55ade37032e0 (source object: 0x55ade36f7d80, source tag: 0x7f88b68a61c0) finalized without ever returning (using g_task_return_*()). This potentially indicates a bug in the program.
Transactions:
 1	/248918_cecbaebe
Transactions:
 1	/248918_cecbaebe
 2	/248919_baeeaaee
Transactions:
 1	/248918_cecbaebe
 2	/248919_baeeaaee
 3	/248920_deadbcdb
/248919_baeeaaee	allow_cancel 1
/248919_baeeaaee	percentage   -1
/248919_baeeaaee	role         get-details
/248919_baeeaaee	sender       /usr/bin/gnome-software
/248919_baeeaaee	status       wait

(pkmon:1324524): GLib-GIO-CRITICAL **: 19:10:52.241: GTask 0x55ade3703400 (source object: 0x55ade36f7d80, source tag: 0x7f88b68a61c0) finalized without ever returning (using g_task_return_*()). This potentially indicates a bug in the program.
/248920_deadbcdb	allow_cancel 1
/248920_deadbcdb	percentage   -1
/248920_deadbcdb	role         get-updates
/248920_deadbcdb	sender       /usr/bin/gnome-software
/248920_deadbcdb	status       wait

(pkmon:1324524): GLib-GIO-CRITICAL **: 19:10:52.241: GTask 0x55ade3704780 (source object: 0x55ade36f7d80, source tag: 0x7f88b68a61c0) finalized without ever returning (using g_task_return_*()). This potentially indicates a bug in the program.
Transactions:
 1	/248919_baeeaaee
 2	/248920_deadbcdb
Transactions:
 1	/248920_deadbcdb
Transactions:
 [none]

journalctl -xb /usr/libexec/packagekitd is full of this :

ápr 12 19:11:59 t430 PackageKit[1314463]: get-updates transaction /248970_edecdccb from uid 1000 finished with success after 599ms
ápr 12 19:12:00 t430 PackageKit[1314463]: get-details transaction /248971_cdcbaeba from uid 1000 finished with success after 388ms
ápr 12 19:12:00 t430 PackageKit[1314463]: get-updates transaction /248972_cbadecba from uid 1000 finished with success after 597ms
ápr 12 19:12:03 t430 PackageKit[1314463]: get-updates transaction /248973_edddbbab from uid 1000 finished with success after 550ms
ápr 12 19:12:04 t430 PackageKit[1314463]: get-updates transaction /248974_deaecccb from uid 1000 finished with success after 561ms
ápr 12 19:12:04 t430 PackageKit[1314463]: get-details transaction /248975_beabccba from uid 1000 finished with success after 325ms
ápr 12 19:12:05 t430 PackageKit[1314463]: get-updates transaction /248976_eadeaaee from uid 1000 finished with success after 613ms
ápr 12 19:12:09 t430 PackageKit[1314463]: get-updates transaction /248977_cabdcdab from uid 1000 finished with success after 618ms
ápr 12 19:12:09 t430 PackageKit[1314463]: get-updates transaction /248978_bcaaebcc from uid 1000 finished with success after 627ms
ápr 12 19:12:10 t430 PackageKit[1314463]: get-details transaction /248979_abaceeab from uid 1000 finished with success after 357ms
ápr 12 19:12:10 t430 PackageKit[1314463]: get-updates transaction /248980_aadcadae from uid 1000 finished with success after 613ms
ápr 12 19:12:15 t430 PackageKit[1314463]: get-updates transaction /248981_dcecdacc from uid 1000 finished with success after 615ms
ápr 12 19:12:15 t430 PackageKit[1314463]: get-updates transaction /248982_deeaecea from uid 1000 finished with success after 547ms
ápr 12 19:12:15 t430 PackageKit[1314463]: get-details transaction /248983_ececeaad from uid 1000 finished with success after 313ms
ápr 12 19:12:16 t430 PackageKit[1314463]: get-updates transaction /248984_daeaceba from uid 1000 finished with success after 553ms
user@t430:~$ 


After running pkcon update, packagekitd CPU consuming tasks ended, and pkmon remains silent. So this will be a gnome-software related issue?

@hknox
Copy link

hknox commented Apr 17, 2024

I'm not sure if this is related to the issues you are seeing but perhaps this will help: I have also noticed excessive CPU usage and battery drain recently and tracked it down to the packagekit daemon. I also discovered that Debian is in the process of updating several packages to use 64-bit time data structures but has not finished the transition and as a result, some packages, like Thunderbird, Firefox and a few others, have dependencies on versions of packages that are still in transition to 64-bit time structures and therefore they cannot be updated. But packagekit keeps trying endlessly to update those packages. By using apt or aptitude to put a hold on the packages with unsatisfied dependencies, packagekit stops trying to update them and CPU usage has gone back to something reasonable.

@ximion
Copy link
Collaborator

ximion commented Apr 17, 2024

After running pkcon update, packagekitd CPU consuming tasks ended, and pkmon remains silent. So this will be a gnome-software related issue?

Yes, this is GNOME Software hammering the daemon with requests, and PackageKit just fulfills those. There have been multiple changes on the GNOME Software side already, and one tweak just got merged into PK today - so with the next releases of both GNOME and PackageKit, this situation will hopefully improve.

This issue happens less on Fedora, apparently, so it was only noticed once the latest GNOME Software was uploaded to Debian unstable.

@sidt4
Copy link
Contributor

sidt4 commented Apr 17, 2024

@horvathcsabalaszlo: https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2462 is the issue mentioned above by ximion. It is fixed in 46.0. Debian testing is still in 46~beta-1 where this issue exists.

Refer: https://packages.debian.org/search?keywords=gnome-software&searchon=sourcenames&suite=all&section=all

@sidt4
Copy link
Contributor

sidt4 commented Apr 17, 2024

@hknox: What is the version of Debian ?

@hknox
Copy link

hknox commented Apr 17, 2024 via email

@sidt4
Copy link
Contributor

sidt4 commented Apr 17, 2024

Trixie - testing

Okay. Then it's #740 (comment).

@hknox
Copy link

hknox commented Apr 17, 2024 via email

@horvathcsabalaszlo
Copy link
Author

@horvathcsabalaszlo: https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2462 is the issue mentioned above by ximion. It is fixed in 46.0. Debian testing is still in 46~beta-1 where this issue exists.

Refer: https://packages.debian.org/search?keywords=gnome-software&searchon=sourcenames&suite=all&section=all

Thanks for the information (and to all who commented to this. )
Will check the package version in the evening. The Debian version is Testing, the rolling one.
Strangely Packagekit does not behave like eating the resources since i posted, but it's suspicious, maybe the appropriate packages got updated when i ran pkcon.

@horvathcsabalaszlo
Copy link
Author

horvathcsabalaszlo commented Apr 17, 2024

I have

gnome-software-common/testing,testing,now 46~beta-1 all 
gnome-software/testing,testing,now 46~beta-1 amd64 

I wonder that -beta-1 is older than 46.0 :D

@sidt4
Copy link
Contributor

sidt4 commented Apr 17, 2024

I wonder that -beta-1 is older than 46.0 :D

Here is the GNOME version lifecyle for a package:

46.alpha -> 46.beta -> 46.rc -> 46.0 -> 46.1 ... etc

@horvathcsabalaszlo
Copy link
Author

Thanks :)

@ethical-haquer
Copy link

I am experiencing the same thing, thanks for the replies @sidt4!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants