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

Appcenter says there are updates but updates tab is blank #215

Closed
Gabriel-p opened this issue Apr 7, 2017 · 7 comments

Comments

Projects
None yet
6 participants
@Gabriel-p
Copy link

commented Apr 7, 2017

v0.1.4

The icon says two updates are available. Eight packages are upgradeable according to

$ apt list --upgradable
Listando... Hecho
elementary-default-settings/xenial,xenial 0.4.3-0~218~ubuntu0.4.1 all [actualizable desde: 0.4.3-0~213~ubuntu0.4.1]
elementary-dpms-helper/xenial,xenial 0.4.3-0~218~ubuntu0.4.1 all [actualizable desde: 0.4.3-0~213~ubuntu0.4.1]
elementary-printer-test-page/xenial,xenial 0.4.3-0~218~ubuntu0.4.1 all [actualizable desde: 0.4.3-0~213~ubuntu0.4.1]
epiphany-browser/xenial 3.18.11-0ubuntu1+elementary11~ubuntu0.4.1 amd64 [actualizable desde: 3.18.10-0ubuntu1+elementary10~ubuntu0.4.1]
epiphany-browser-data/xenial,xenial 3.18.11-0ubuntu1+elementary11~ubuntu0.4.1 all [actualizable desde: 3.18.10-0ubuntu1+elementary10~ubuntu0.4.1]
plymouth-theme-elementary/xenial,xenial 0.4.3-0~218~ubuntu0.4.1 all [actualizable desde: 0.4.3-0~213~ubuntu0.4.1]
plymouth-theme-elementary-text/xenial,xenial 0.4.3-0~218~ubuntu0.4.1 all [actualizable desde: 0.4.3-0~213~ubuntu0.4.1]
ubiquity-slideshow-elementary/xenial,xenial 0.4.3-0~218~ubuntu0.4.1 all [actualizable desde: 0.4.3-0~213~ubuntu0.4.1]

This is what Appcenter looks like:

captura realizada el 2017-04-07 14 35 40

@cassidyjames

This comment has been minimized.

Copy link
Member

commented Apr 7, 2017

I am seeing this today in a relatively fresh Stable install as well.

@zigford

This comment has been minimized.

Copy link

commented Apr 11, 2017

Setup 5 fresh VM's of eOS today and the most consistent thing I could find was enabling Third-Party Software during install causes a broken appcenter. In the attached image, On the left. Freshly installed. Everything default in the install wizard. Firefox installs fine. On the right, I selected 'Enable third party software..etc' but everything else default in the install wizard. Nothing visible in the updates tab although the icon badge has a number and firefox never installs.

2vm s

@cassidyjames

This comment has been minimized.

Copy link
Member

commented Apr 11, 2017

Thank you so much @zigford! We'll dig further into this, and having a possible cause is super helpful.

@Gabriel-p

This comment has been minimized.

Copy link
Author

commented Apr 11, 2017

Is there any way to make the Appcenter icon go away from Planck? Since the Update tab won't work, I can't seem to be able to get rid of it even though I've already upgraded all packages via command line.

@davidmhewitt

This comment has been minimized.

Copy link
Member

commented Apr 12, 2017

Okay, this was pretty tricky to track down, but here's the full analysis:

Something must have been updated/installed recently that's calling get-distro-upgrades in PackageKit. Our build of PackageKit seems to be a bit broken and this causes it to hang. Any subsequent calls from anything that depends on PackageKit (i.e. appcenter) just get stuck in the queue and never complete.

As a temporary workaround to get the updates list to work and packages to install via AppCenter again, you can do:
sudo killall packagekitd

This will clear the queue and you will then be able to use AppCenter. However, this problem will re-occur whenever get-distro-upgrades gets called again by whichever mystery process is doing that. For a more permanent solution, you can rename /usr/bin/do-release-upgrade to /usr/bin/do-release-upgrade.old and this will disable the get-distro-upgrades method in PackageKit causing the hangs to stop permanently. However, this is a bit of a hack and doesn't really solve the problem.

Going forwards, we need to:

  • Re-package PackageKit to not be broken (maybe even upgrade to the latest version that solves #79).
  • Try and find what's calling get-distro-upgrades since we don't really need to be calling that anyway.

The below logs show how PackageKit crashes when you call get-distro-upgrades:

20:58:57	PackageKit          GetDistroUpgrades method called
20:58:57	PackageKit          transaction now ready
20:58:57	PackageKit          changing transaction to exclusive mode
20:58:57	PackageKit          1 transactions in list, 1 committed but not finished
20:58:57	PackageKit          transaction now running
20:58:57	PackageKit          install uid now 1000
20:58:57	PackageKit          install cmdline now PackageKit: get-distro-upgrades
20:58:57	PackageKit          setting role for /12706_cecdcbad to get-distro-upgrades

(packagekitd:22784): PackageKit-CRITICAL **: pk_backend_get_distro_upgrades: assertion 'backend->priv->desc->get_distro_upgrades != NULL' failed
Trace/breakpoint trap (core dumped)

The below lines show why the above crash occurs:

david@david-XPS-13-9343:~/Documents/appcenter/build$ nm -D /usr/lib/x86_64-linux-gnu/packagekit-backend/libpk_backend_aptcc.so | grep pk_backend_search
000000000002e360 T pk_backend_search_details
000000000002e300 T pk_backend_search_files
000000000002e320 T pk_backend_search_groups
000000000002e340 T pk_backend_search_names
david@david-XPS-13-9343:~/Documents/appcenter/build$ nm -D /usr/lib/x86_64-linux-gnu/packagekit-backend/libpk_backend_aptcc.so | grep pk_backend_get_distro_upgrades
david@david-XPS-13-9343:~/Documents/appcenter/build$

It would seem that our build of the aptcc backend doesn't include the pk_backend_get_distro_upgrades method in the libpk_backend_aptcc.so file. It includes every other method you would expect however.

@blabaere

This comment has been minimized.

Copy link

commented Apr 14, 2017

TL;DR this is frightening, some communication on the issue would reassure people who panicked.

Thank you for providing the sudo killall packagekitd workaround !
I was only slightly bothered by the blank update panel while the notification told otherwise, but not being able to install anything from the AppCentre worried me a bit more. And then I thought: "but if the AppCentre is broken, how will it ever be fixed, since it is updated via the AppCentre ? OMG !!! PUSH PANIC BIG RED BUTTON !!!" I don't know how many people forgot out of pure terror the existence of the command line, synaptic, etc but they will sure appreciate learning that the situation is under control.

@danrabbit

This comment has been minimized.

Copy link
Member

commented Apr 14, 2017

Fix was issued, closing the report. Drop to Terminal and sudo apt upgrade :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.