Bug 410549 - PPA's without a valid release file will cause Discover to stop displaying all APT repositories
Summary: PPA's without a valid release file will cause Discover to stop displaying all...
Status: RESOLVED UPSTREAM
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: 5.15.4
Platform: Kubuntu Linux
: NOR grave
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-03 19:27 UTC by leftcrane
Modified: 2019-12-03 00:35 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
illustration of issue (no update, no sources etc.) (66.34 KB, image/png)
2019-08-13 04:22 UTC, leftcrane
Details
it keeps downloading stuff, for whatever reason (seraching for file, resolving, searching. resolving etc) (60.39 KB, image/png)
2019-08-15 19:56 UTC, leftcrane
Details
another illustration: updates in the plasmoid, nothing in the software center (218.21 KB, image/png)
2019-08-15 20:35 UTC, leftcrane
Details
discover diagnostic start after `pkcon refresh force -c -1` (8.40 KB, text/plain)
2019-08-16 18:39 UTC, leftcrane
Details
discover diagnostic while broken (stuck refreshing cache). (8.63 KB, text/plain)
2019-08-16 18:42 UTC, leftcrane
Details

Note You need to log in before you can comment on or make changes to this bug.
Description leftcrane 2019-08-03 19:27:55 UTC
SUMMARY


STEPS TO REPRODUCE
1. Add a PPA without a valid release file for your version of Ubuntu (e.g. http://ppa.launchpad.net/clipgrab-team/ppa/ubuntu for Ubuntu 19.10)
2. Update apt database (maybe log out)
3. Open Discover and go to Sources 

OBSERVED RESULT

All apt repos are gone from the the interface. 

EXPECTED RESULT

One misbehaving repository shouldn't bring down the others.

I've noticed Discover and packagkit is very fragile when it comes to handling unofficial repositories, which often  cause it to crash or stop displaying sources and updates.

I've observed this kind of thing when dealing with COPR repos over a year ago on Fedora with Gnome software (in that case it was unable to check for updates). I've observed failing updates with Discover on Kubuntu too - there was a bug filed here a while ago to that effect (possibly fixed).

Operating System: Kubuntu 19.04
KDE Plasma Version: 5.15.4
KDE Frameworks Version: 5.56.0
Qt Version: 5.12.2
Kernel Version: 5.0.0-21-generic
OS Type: 64-bit
Comment 1 leftcrane 2019-08-13 04:20:07 UTC
OK, after a restart/logout, Discover no longer displays apt updates - and for some reason is offering to install a bunch of backends which are already installed, with the install button grayed out. So at the moment, Discover is completely broken on my machine.
Comment 2 leftcrane 2019-08-13 04:22:04 UTC
Created attachment 122094 [details]
illustration of issue (no update, no sources etc.)
Comment 3 leftcrane 2019-08-15 19:35:28 UTC
Gnome software doesn't work either right now (it just loads the software catalog for ever), even after removing the repos. 

So I think packagekit is what's broken, and I'm not sure what to do about it. Maybe if there are there are troubleshooting features in packagekit, they should be integrated into Discover, so that the user has some recourse when the backend (inevitably) breaks.
Comment 4 leftcrane 2019-08-15 19:53:27 UTC
The commandline pkcon client succeeds in fetching updates, but both graphical software stores fail (in fact they can't display any software).

APT works of course and does GetNewStuff (or whatever it's called). Unfortunately the reliance on packagekit means the central graphical update/install system - so the system updater and software center do not work at all.
Comment 5 Nate Graham 2019-08-15 19:55:57 UTC
Definitely sounds like an upstream issue in the PackageKit library. I would recommend filing a bug for the developer at https://github.com/hughsie/PackageKit with all the information you've discovered here.

Thanks!
Comment 6 leftcrane 2019-08-15 19:56:41 UTC
Created attachment 122150 [details]
it keeps downloading stuff, for whatever reason (seraching for file, resolving, searching. resolving etc)
Comment 7 leftcrane 2019-08-15 20:10:17 UTC

I have no idea what's been going on. Pkcon works but the graphical stuff is completely broken. Anyway here's a shot: https://github.com/hughsie/PackageKit/issues/334
Comment 8 leftcrane 2019-08-15 20:15:14 UTC
I am not sure this is all upstream. The weird sources and backends behavior in the graphical interface should probably not be happening even there are problems with backend.

Maybe keep it open for now, Nate?
Comment 9 leftcrane 2019-08-15 20:16:52 UTC
I had to kill packagekit to fix to the constant "downloading" notifications (referenced above).
Comment 10 Nate Graham 2019-08-15 20:18:08 UTC
Sure, maybe there's more we can do here.
Comment 11 leftcrane 2019-08-15 20:35:44 UTC
Created attachment 122153 [details]
another illustration: updates in the plasmoid, nothing in the software center
Comment 12 leftcrane 2019-08-16 18:04:23 UTC
pkcon works. The problem is when the software centers try to refresh the cache. This is currently being explored in the github issue. https://github.com/hughsie/PackageKit/issues/334

It may be that packagekit is fine, but the software centers have some critical problem with caching.
Comment 13 leftcrane 2019-08-16 18:15:00 UTC
After running: 

pkcon refresh force -c -1

then killing packagekitd (it didn't work before doing that),

I started plasma-discover from the CL and everything works. Until the issue with caching is fixed, the appstores NEED to be able to force clear the cache  and restart packagekit. Otherwise they get broken and there is no way to fix without researching the issue for hours.
Comment 14 leftcrane 2019-08-16 18:36:43 UTC
Haha, now it's broken again.
Comment 15 leftcrane 2019-08-16 18:39:26 UTC
Created attachment 122184 [details]
discover diagnostic start after `pkcon refresh force -c -1`

Here's the output for Disover after refreshing the cache via pkcon. HERE DISCOVER IS WORKING FINE.
Comment 16 leftcrane 2019-08-16 18:42:36 UTC
Created attachment 122185 [details]
discover diagnostic while broken (stuck refreshing cache).

This is what get emitted when Discover is broken (i.e. no updates, greyed out suggested backends, uninstallable Deb packages that show up as 0 bytes in size)
Comment 17 leftcrane 2019-08-16 18:44:04 UTC
I should mention that in the first case `discover diagnostic start after `pkcon refresh force -c -1` (8.40 KB, text/plain)`, it's still partially broken in the sense of not being able to display any apt sources. OTHER THAN THAT, it works normally.
Comment 18 leftcrane 2019-08-16 18:46:30 UTC
When Discover is in broken state, 

pkmon emits (looks like it's refreshing forever - it's piling up dozens of "download attemps" in the systray):

/49822_bccdabad percentage -1
/49822_bccdabad role get-repo-list
/49822_bccdabad status wait
/49823_bedbabba allow_cancel 1
/49823_bedbabba percentage -1
/49823_bedbabba role search-file
/49823_bedbabba status wait
/49824_accbaddd allow_cancel 1
/49824_accbaddd percentage -1
/49824_accbaddd role search-file
/49824_accbaddd status wait
/49825_bbaddaae allow_cancel 1
/49825_bbaddaae percentage -1
/49825_bbaddaae role resolve
/49825_bbaddaae status wait
/49826_eadcadce allow_cancel 1
/49826_eadcadce percentage -1
/49826_eadcadce role resolve
/49826_eadcadce status wait
/49827_eadcadec allow_cancel 1
/49827_eadcadec percentage -1
/49827_eadcadec role refresh-cache
/49827_eadcadec status wait

/49840_acbbdeed allow_cancel 1
/49840_acbbdeed percentage -1
/49840_acbbdeed role resolve
/49840_acbbdeed status wait
/49841_daaabeea allow_cancel 1
/49841_daaabeea percentage -1
/49841_daaabeea role get-updates
/49841_daaabeea status wait
daemon connected=0
Comment 19 Aleix Pol 2019-09-18 23:38:04 UTC
I am unable to reproduce this, can you test it on Plasma 5.16?
Comment 20 leftcrane 2019-09-18 23:41:50 UTC
Updates work, but APT repositories are not displayed.
Comment 21 leftcrane 2019-09-18 23:50:23 UTC
I wouldn't bet on this bug having been "fixed" by accident. It's been around for ages on both Gnome Software and Discover.

It's hard to reproduce. If you play around with enough repositories you will eventually corrupt the cache. If you're on neon, I can only suggest adding a bunch of PPAs and waiting for the bug to crop up.

Gnome software is totally borked on my system (now it says I'm not connected to the internet LOL), so maybe I could still answer some diagnostic questions. Discover is working fine except for the apt sources list being blank. Not sure how long it will last though.
Comment 22 Aleix Pol 2019-10-28 17:19:38 UTC
What does $ pkcon repo-list return for you?
Comment 23 Christoph Feck 2019-11-21 15:43:22 UTC
If you can provide the information requested in comment 22, please add it.
Comment 24 Aleix Pol 2019-12-03 00:35:53 UTC
I've spent a good amount of time trying to reproduce and I've been unable to.

You mention you have the same issue with Gnome Software, so I would say it's safe to bet it's an issue on either apt or aptcc PackageKit backend.

Maybe you can report it upstream where the relevant people hang out?
https://github.com/hughsie/PackageKit/issues/