Bug 1638563
| Summary: | Updates often not found on first click of 'refresh' button (openQA testing) | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Adam Williamson <awilliam> |
| Component: | gnome-software | Assignee: | Richard Hughes <rhughes> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 28 | CC: | klember, rhughes |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | gnome-software-3.28.2-4.fc28 gnome-software-3.28.2-4.fc27 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-10-20 23:51:34 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Attachments: | |||
|
Description
Adam Williamson
2018-10-11 22:29:02 UTC
Created attachment 1493063 [details]
the diff showing the debug statements I added to gnome-software for testing
Created attachment 1493077 [details]
the verbose output from gnome-software, with my added debug statements
Created attachment 1493078 [details]
PackageKit log messages from the run
Timings for the run (to try and cross compare with the logs):
1. First boot reaches g-i-s about 21:05:11
2. First boot reaches desktop and switches to VT about 21:06:24
3. First boot finishes installing updates and reboots at 21:13:21.0441
4. Second boot reaches clean desktop about 21:14:55
5. Second boot finishes setting up the dummy update about 21:16:45
6. gnome-software launched about 21:17:51
7. First 'refresh' attempt at 21:18:04
8. 'Software is up to date' screen appears within the 60 seconds before 21:20:08.0377 (cannot be more precise)
9. Second 'refresh' attempt at 21:20:09
I just did a variant run of the test where I had it just sit at the front page of Software for two minutes before switching to the Updates screen, in case that made it work on the first refresh...but nope. Still failed on the first refresh, worked on the second. I think this may be an ordering issue. I just added a few more debug statements, notably in gs-plugin-packagekit-refine.c gs_plugin_refine_app() , which is the most obvious thing that would *set* the scope and kind for an update like this, and that looks like a bingo. In this run, the *first* 'refresh' click was at 01:33:36.0868 and the *second* was at 01:34:02.0142 . Check this log extract: 01:34:00:0168 As run 0x55dfcfdde450~GsPlugin::generic-updates(gs_plugin_add_updates;gs_plugin_refine) 01:34:00:0168 Gs XXX in app_list loop for app (null)! 01:34:00:0168 Gs XXX in merge_os_update for app (null) / python3-kickstart 01:34:00:0168 Gs XXX merge_os_update returning FALSE! 01:34:00:0168 Gs XXX kind was: (null) 01:34:00:0168 Gs XXX scope was: (null) 01:34:00:0168 Gs XXX in app_list loop for app (null)! 01:34:00:0168 Gs XXX in merge_os_update for app (null) / python3-ordered-set 01:34:00:0168 Gs XXX merge_os_update returning FALSE! 01:34:00:0168 Gs XXX kind was: (null) 01:34:00:0168 Gs XXX scope was: (null) 01:34:00:0168 Gs XXX returning TRUE at point 2! 01:34:00:0168 As run 0x55dfcfdde450~GsPlugin::packagekit-refine(gs_plugin_add_updates;gs_plugin_refine) 01:34:00:0168 As run 0x55dfcfdde450~packagekit-refine[name->id] 01:34:00:0168 As run 0x55dfcfdde450~packagekit-refine[id->update-details] 01:34:00:0168 PK role now get-update-detail 01:34:00:0181 Gs emitting global waiting 01:34:00:0275 As run 0x55dfcd1ac230~packagekit-refine[source->license] 01:34:00:0276 As run 0x55dfcd1ac230~packagekit-refine[update-urgency] 01:34:00:0276 Gs plugin packagekit-refine took 2.2 seconds to do refine 01:34:00:0276 GsPluginPackageKit XXX In PK gs_plugin_refine_app for app (null) / python3-kickstart 01:34:00:0276 GsPluginPackageKit XXX set scope to SYSTEM 01:34:00:0276 Gs XXX In gs_app_set_bundle_kind for app (null) / python3-kickstart 01:34:00:0276 GsPluginPackageKit XXX set kind to PACKAGE 01:34:00:0276 GsPluginPackageKit XXX In PK gs_plugin_refine_app for app (null) / python3-ordered-set 01:34:00:0276 GsPluginPackageKit XXX set scope to SYSTEM 01:34:00:0276 Gs XXX In gs_app_set_bundle_kind for app (null) / python3-ordered-set 01:34:00:0276 GsPluginPackageKit XXX set kind to PACKAGE 01:34:00:0276 Gs emitting global finished ... 01:34:08:0931 As run 0x55dfd0c55000~GsPlugin::generic-updates(gs_plugin_add_updates;gs_plugin_refine) 01:34:08:0931 Gs XXX in app_list loop for app (null)! 01:34:08:0931 Gs XXX in merge_os_update for app (null) / python3-kickstart 01:34:08:0931 Gs XXX merge_os_update returning TRUE (generic)! 01:34:08:0931 Gs XXX in app_list loop for app (null)! 01:34:08:0931 Gs XXX in merge_os_update for app (null) / python3-ordered-set 01:34:08:0931 Gs XXX merge_os_update returning TRUE (generic)! 01:34:08:0932 Gs XXX reached point 3 'create new meta object'! 01:34:08:0932 As run GsPlugin::packagekit-history(gs_plugin_refine;gs_plugin_refine) 01:34:08:0932 Gs autogenerating unique-id for org.gnome.Software.OsUpdate 01:34:08:0932 Gs */*/*/os-update/org.gnome.Software.OsUpdate/* non-transient state now updatable-live 01:34:08:0932 As run GsPlugin::packagekit-refine-repos(gs_plugin_refine;gs_plugin_refine) 01:34:08:0932 As run packagekit-refine-repos[repo-filename->id] 01:34:08:0932 Gs moving python3-kickstart to parent */*/*/os-update/org.gnome.Software.OsUpdate/* 01:34:08:0932 Gs 2nd resolve pass for unadopted wildcards 01:34:08:0932 Gs moving python3-ordered-set to parent */*/*/os-update/org.gnome.Software.OsUpdate/* Basically, it looks to me like on the *first* refresh, we find the package update, then run the generic-updates plugin - which does not add the package to 'OS Updates' because its kind and scope are null - *then* run packagekit-refine , which sets the kind and scope to PACKAGE and SYSTEM...but too late for this round, because generic-updates *already ran* and didn't work right. But now the kind and scope have been set, on the *second* refresh, generic-updates does the right thing and adds the package to "OS Updates". So...basically to fix this, packagekit-refine needs to happen before generic-updates...I think. Hah - and gnome-software git master has exactly that added: gs_plugin_add_rule (plugin, GS_PLUGIN_RULE_RUN_AFTER, "packagekit-refine"); It was part of this commit: https://gitlab.gnome.org/GNOME/gnome-software/commit/37103e6e5f15d39843d468775da2b53ab145bd2a so I think it wasn't actually intended to fix this, but I think will have had the *effect* of fixing this. I'm going to try making just that change on top of the F28 package, and see if it makes this problem go away... Aha - and there's a plausible explanation for why this broke, too - this commit: https://gitlab.gnome.org/GNOME/gnome-software/commit/9eab01082b07acd525b8a390ab6b43136cf400a5 which appeared in 3.28.1. That's the commit that *added* this check for 'scope' and 'kind' - it should have also ensured that generic-updates ran after packagekit-refine, but it didn't. I will send an MR upstream to fix this on the 3-28 branch, and do updates for F27 and F28... gnome-software-3.28.2-4.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-5a93cc4270 gnome-software-3.28.2-4.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-d2d222fe5c gnome-software-3.28.2-4.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-5a93cc4270 gnome-software-3.28.2-4.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-d2d222fe5c gnome-software-3.28.2-4.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report. gnome-software-3.28.2-4.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report. |