Bug 1180150

Summary: PackageKit (zypp backend) does not always list all available updates
Product: [openSUSE] openSUSE Distribution Reporter: Jean Delvare <jdelvare>
Component: GNOMEAssignee: Jonathan Kang <songchuan.kang>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: yfjiang
Version: Leap 15.1   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Leap 15.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: pk_backend_zypp when updates are missing
pk_backend_zypp when the list of updates is complete

Description Jean Delvare 2020-12-17 09:02:00 UTC
I have a wine-staging update available for my system (from OBS project Emulators:Wine). "zypper up" does list it always. The PackageKit front-end, however, sometimes lists it, and sometimes not. Today it doesn't, but yesterday it did (but I did not install it, in order to keep the bug reproducer).

I suspect this has something to do with the version string. The update has a ~ in its version string. Installed package:

wine-staging-5.22-lp151.1222.1

Available update:

wine-staging-6.0~rc1-lp151.1230.3

Let me know if I can provide additional data to help investigate the issue.
Comment 1 Yifan Jiang 2020-12-18 01:12:44 UTC
I think Jonathan may have ideas to diagnose it further.
Comment 2 Jean Delvare 2020-12-18 08:43:20 UTC
Note that I can currently reproduce the problem by calling gpk-update-viewer repeatedly but not installing the update in question when it is offered. But at some point I may have to install the wine update if a Windows game I'm playing requires it. So it would be nice to have this investigated rather sooner than later.
Comment 3 Jean Delvare 2020-12-18 09:15:15 UTC
I ran gpk-update-viewer with option -v in the hope that it would reveal something. The only real difference between the working and failing cases is, as expected, the number of "adding" statements logged. Success case:

09:48:41  GnomePackageKit  adding: id=skypeforlinux;8.67.0.96-1;(...)
09:48:41  GnomePackageKit  adding: id=wine-staging;6.0~rc1-lp151.1230.3;(...)
09:48:41  GnomePackageKit  adding: id=wine-staging-32bit;6.0~rc1-lp151(...)

Failure case:

09:59:59  GnomePackageKit  adding: id=skypeforlinux;8.67.0.96-1;(...)

The only visible problems in both log file are:

***
09:59:38  GnomePackageKit  failed to load ui: Failed to open file "/usr/share/gnome-packagekit/gpk-signature.ui": No such file or directory
***

at the start, and repeated occurrences of:

***
09:59:38  GnomePackageKit  wrap_width is impossibly small -200
***

But that looks like minor UI issues and probably not related with my problem.

I could not find anything in /var/log/zypp/history, and could also not find any way to increase the verbosity in /etc/zypp/zypp.conf. What to do next?
Comment 4 Jean Delvare 2021-01-21 16:18:11 UTC
The same bug occurs on SLED 15 SP2. Most of the times gpk-update-viewer lists all available updates, but sometimes it only lists a subset. I am under the impression that the bug is more likely to occur if gpk-update-viewer has not need started for some time. For example, if I start it 4 times in a row, the bug will happen the first time (missing updates), but not on the next 3 times (complete list of updates).

Jonathan, have you tried to reproduce this?
Comment 5 Jonathan Kang 2021-01-25 02:47:27 UTC
please attach the content of /var/log/pk-backend-zypp. It includes a lot of
information about what libzypp is actually doing.

Thanks.
Comment 6 Jean Delvare 2021-01-25 10:34:59 UTC
Created attachment 845476 [details]
pk_backend_zypp when updates are missing
Comment 7 Jean Delvare 2021-01-25 10:35:31 UTC
Created attachment 845477 [details]
pk_backend_zypp when the list of updates is complete
Comment 8 Jean Delvare 2021-01-25 10:39:57 UTC
I've attached two excerpts of my /var/log/pk_backend_zypp file (on SLED 15 SP2). First excerpt corresponds to a case where only about half of the available updates were listed. Second except corresponds to a case where all available updates (as far as I can tell) were listed.

Second test was started 10 seconds after the first test was over. If I wait more than that (say 10 minutes) then I'm back to the non-working case (missing updates).
Comment 9 Jonathan Kang 2021-01-25 14:10:40 UTC
Thank you, Jean.

I got it reproduced at my test machine as well. And I have a rough idea about
what is going wrong. Working on it.
Comment 10 OBSbugzilla Bot 2021-01-27 14:30:07 UTC
This is an autogenerated message for OBS integration:
This bug (1180150) was mentioned in
https://build.opensuse.org/request/show/867195 Factory / PackageKit
Comment 12 Jonathan Kang 2021-02-04 01:12:13 UTC
Fix has been submitted to related products.

RESOLVED FIXED.
Comment 14 Swamp Workflow Management 2021-02-10 11:17:24 UTC
SUSE-RU-2021:0357-1: An update that has one recommended fix can now be installed.

Category: recommended (moderate)
Bug References: 1180150
CVE References: 
JIRA References: 
Sources used:
SUSE Linux Enterprise Workstation Extension 15-SP2 (src):    PackageKit-1.1.13-4.17.6
SUSE Linux Enterprise Module for Desktop Applications 15-SP2 (src):    PackageKit-1.1.13-4.17.6

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 15 Swamp Workflow Management 2021-02-13 20:19:10 UTC
openSUSE-RU-2021:0287-1: An update that has one recommended fix can now be installed.

Category: recommended (moderate)
Bug References: 1180150
CVE References: 
JIRA References: 
Sources used:
openSUSE Leap 15.2 (src):    PackageKit-1.1.13-lp152.3.19.1
Comment 16 Jonathan Kang 2021-02-22 02:33:47 UTC
*** Bug 1173191 has been marked as a duplicate of this bug. ***