packagekitd eats all the CPU

Bug #1587975 reported by Daniel Fore on 2016-06-01
152
This bug affects 32 people
Affects Status Importance Assigned to Milestone
AppCenter
Won't Fix
Critical
Unassigned

Bug Description

It just starts up and eats all the everything. Unsure what the issue is here.

Changed in elementaryos:
status: New → Confirmed
Daniel Fore (danrabbit) wrote :

Moving to appcenter since killing appcenter-daemon temporarily addresses the issue

affects: elementaryos → appcenter
Changed in appcenter:
milestone: loki-rc1 → none
Daniel Fore (danrabbit) wrote :

According to Corentin this is related to the issue about untrusted sourcse

Changed in appcenter:
milestone: none → loki-rc1
Cody Garver (codygarver) on 2016-06-11
Changed in appcenter:
importance: Undecided → High
Cody Garver (codygarver) wrote :

It's also constantly creating temporary files in /tmp/

Changed in appcenter:
importance: High → Critical
Cody Garver (codygarver) on 2016-07-13
Changed in appcenter:
milestone: loki-beta2 → loki-rc1

Application Center freezes when you select some applications.

Reproduced in the following way: Start Application Center, open the "Internet" category, go to SSh AskPass application. After that, the application center freezes and consumes a lot of CPU. It looks like Loop.

PS Strace attached.

Daniel Fore (danrabbit) wrote :

This seems to be an upstream issue in PackageKit and only occurs when adding 3rd party repositories that generate errors. Bumping to the next milestone

Changed in appcenter:
milestone: loki-rc1 → loki+1-beta1
David Heidelberg (okias) wrote :

I can confirm that packagekitd easy between 50-100% of one CPU almost permanently, until gets killed.

Not sure if there is connection with appcenter (it behaves this way from Loki start).
Not sure if any files created in /tmp, not spotted.

# apt-get update
Hit:1 http://cz.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://cz.archive.ubuntu.com/ubuntu xenial-updates InRelease
Get:3 http://cz.archive.ubuntu.com/ubuntu xenial-backports InRelease [92,2 kB]
Hit:4 http://ppa.launchpad.net/elementary-os/daily/ubuntu xenial InRelease
Ign:5 http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_16.04 InRelease
Get:6 http://security.ubuntu.com/ubuntu xenial-security InRelease [94,5 kB]
Hit:7 http://ppa.launchpad.net/eviltwin1/feedreader-daily/ubuntu xenial InRelease
Hit:8 http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_16.04 Release
Hit:9 http://ppa.launchpad.net/libreoffice/ppa/ubuntu xenial InRelease
Get:10 http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_16.04 Release.gpg [189 B]
Hit:11 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu xenial InRelease
Hit:12 http://ppa.launchpad.net/oibaf/graphics-drivers/ubuntu xenial InRelease
Hit:13 http://ppa.launchpad.net/otto-kesselgulasch/gimp-edge/ubuntu xenial InRelease
Hit:14 http://ppa.launchpad.net/elementary-os/os-patches/ubuntu xenial InRelease
Hit:15 http://ppa.launchpad.net/videolan/master-daily/ubuntu xenial InRelease
Fetched 187 kB in 1s (163 kB/s)
Reading package lists... Done
W: http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_16.04/Release.gpg: Signature by key F9EA4996747310AE79474F44977C43A8BA684223 uses weak digest algorithm (SHA1)

David Heidelberg (okias) wrote :

srp 02 21:19:21 theOne PackageKit[2369]: refresh-cache transaction /25152_eecdbeda from uid 1000 finished with need-untrusted after 4105ms
srp 02 21:19:21 theOne PackageKit[2369]: uid 1000 is trying to obtain org.freedesktop.packagekit.system-sources-refresh auth (only_trusted:0)
srp 02 21:19:21 theOne PackageKit[2369]: uid 1000 obtained auth for org.freedesktop.packagekit.system-sources-refresh
srp 02 21:19:25 theOne PackageKit[2369]: refresh-cache transaction /25153_dbdebdcd from uid 1000 finished with need-untrusted after 3485ms

...........

srp 02 23:25:31 theOne PackageKit[2369]: refresh-cache transaction /26863_bebbecaa from uid 1000 finished with need-untrusted after 4315ms
srp 02 23:25:31 theOne PackageKit[2369]: uid 1000 is trying to obtain org.freedesktop.packagekit.system-sources-refresh auth (only_trusted:0)
srp 02 23:25:31 theOne PackageKit[2369]: uid 1000 obtained auth for org.freedesktop.packagekit.system-sources-refresh
srp 02 23:25:35 theOne PackageKit[2369]: refresh-cache transaction /26864_dbabcdae from uid 1000 finished with need-untrusted after 4143ms
srp 02 23:25:35 theOne PackageKit[2369]: uid 1000 is trying to obtain org.freedesktop.packagekit.system-sources-refresh auth (only_trusted:0)
srp 02 23:25:35 theOne PackageKit[2369]: uid 1000 obtained auth for org.freedesktop.packagekit.system-sources-refresh
srp 02 23:25:39 theOne PackageKit[2369]: refresh-cache transaction /26865_adecbdea from uid 1000 finished with need-untrusted after 4305ms
srp 02 23:25:39 theOne PackageKit[2369]: uid 1000 is trying to obtain org.freedesktop.packagekit.system-sources-refresh auth (only_trusted:0)
srp 02 23:25:39 theOne PackageKit[2369]: uid 1000 obtained auth for org.freedesktop.packagekit.system-sources-refresh

Log is filled with this in same interval, is it OK?

After manually killing it, spam stops.

Daniel Fore (danrabbit) wrote :

Again this only occurs if you have added 3rd party software sources that produces security errors. In your case the problem is the OpenSuse repository as indicated by this line:

http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_16.04/Release.gpg: Signature by key F9EA4996747310AE79474F44977C43A8BA684223 uses weak digest algorithm (SHA1)

This error doesn't occur in the default installation and there's nothing we can really do about it in elementary OS or AppCenter (afaik)

NoOne (1noname) wrote :

If it's upstream related, why doesn't this happen also in Ubuntu ?

David Heidelberg (okias) wrote :

Well, it generate "error", that's OK.

BUG is, that packagekitd use 100% CPU instead of reporting error or ending job...

Daniel Fore (danrabbit) wrote :

Guys please stop spamming this report. The issue is marked as "confirmed".

Artemis Entreri (mongodada) wrote :

I had my packagekitd running 15%-25% of the CPU.
I checked my sources.list and saw that I had duplicate entries of the following sources

deb http://se.archive.ubuntu.com/ubuntu/ xenial universe
deb http://se.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb http://se.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://se.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

Don't know why, but after deleting the duplicates the packagekitd finished it's work and stopped.

Tae Hyoun Park (hyoun) wrote :

Hello,

I do not have any 3rd party software with security errors:

$ apt-get update
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]
Hit:2 http://ca.archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 https://repo.skype.com/deb stable InRelease
Hit:4 http://ca.archive.ubuntu.com/ubuntu xenial-updates InRelease
Get:5 http://ca.archive.ubuntu.com/ubuntu xenial-backports InRelease [92.2 kB]
Hit:6 http://ppa.launchpad.net/elementary-os/stable/ubuntu xenial InRelease
Hit:7 http://ppa.launchpad.net/mystic-mirage/pycharm/ubuntu xenial InRelease
Hit:8 http://ppa.launchpad.net/elementary-os/os-patches/ubuntu xenial InRelease
Fetched 187 kB in 1s (120 kB/s)
Reading package lists... Done

But packagekitd always uses up CPU from startup. Killing and restarting appcenter stops it.

Tae Hyoun Park (hyoun) wrote :

I discovered that the command "$ appcenter -s" causes the program to continuous search for updates: in the updates tab, the "searching for updates..." prompt repeatedly appears.

Starting appcenter through "$ appcenter" does not do this.

Also, this error message is displayed in terminal in both cases:

[FATAL 01:30:51.956022] Client.vala:250: The package id's '' are not valid

davidak (davidak) wrote :

I created a bugreport upstream: https://github.com/hughsie/PackageKit/issues/175

davidak (davidak) wrote :

>You need to file this downstream with elementary OS as we do no QA on that distro whatsoever and I don't know what downstream patches have been used. [...]

Someone has to debug it...

Tae Hyoun Park (hyoun) wrote :

From gnome-session-properties, I've simply set the appcenter to not launch at startup. This is not a fix, but has eliminated high CPU usage for me.

One could also change the command 'appcenter -s' to 'appcenter' and it should as well, I have not tried this.

davidak (davidak) wrote :

Is this possibly solved?

I had no problem the last times i booted.

Tae Hyoun Park (hyoun) wrote :

I have had no problems with this for a while as well :)

Félix Brezo (febrezo) wrote :

No it is not solved. I had to manually remove the repositories from /et kc/apt/sources.list.d/ whose GPG keys were missing. This seemed to be the error. This has prevented this from happening for me. However, it seems not to be an AppCenter as other Ubuntu users where experiencing it too.

Corentin Noël (tintou) wrote :

If you find more issues with packagekit itself, you might want to report issues on the original bugtracker : https://www.freedesktop.org/software/PackageKit/

Changed in appcenter:
status: Confirmed → Won't Fix
Rodrigo (rodrigolopezguerra) wrote :

As point it out in several comments , fixing the missing GPG solved the problem for me .
In my case was the new skype version :

# make sure you have 'apt-transport-https' installed
dpkg -s apt-transport-https > /dev/null || bash -c "sudo apt-get update; sudo apt-get install apt-transport-https -y"
curl https://repo.skype.com/data/SKYPE-GPG-KEY | sudo apt-key add -
echo "deb [arch=amd64] https://repo.skype.com/deb stable main" | sudo tee /etc/apt/sources.list.d/skype-stable.list
sudo apt-get update
sudo apt-get install skypeforlinux -y

Emil (tanoff) wrote :

Thanks Rodrigo, it worked for me (elementary os loki)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.