Bugzilla – Bug 1178233
zypper up does not report any updates in WSL after longer pause
Last modified: 2023-05-05 08:30:08 UTC
I do have WSL images with Leap 15.2 and it seems that zypper doesn't register outdated repodata cache. Let's say that I'd start WSL image (bash session) once per two weeks, and if I simply run "zypper up" after these two weeks zypper reports no update, until I clean repodata I didn't call refresh simply up && clean --all && up and that worked fine. However I'd like to avoid situation when zypper simply reports no update with sporadically WSL use and user gets to believe it. My initial thought it's that this is caused by not having any services running inside the "container", however Ludwig things something might be wrong with the date/time inside the image.
I have been having this issue on TW WSL. It is now reproducible. Moving to libzypp maintainers, adding a tar with a broken cache. zypper ref (and all other refresh options) always attempts to refresh but never does. zypper ref -f does not fix the situation. rm does.
Andreas, please also add the zypper.log showing your issue.
Created attachment 863075 [details] broken.tar.xzaa (split file)
Created attachment 863076 [details] broken.tar.xzab (split file)
Created attachment 863077 [details] broken.tar.xzac (split file)
Created attachment 863078 [details] broken.tar.xzad (split file)
Created attachment 863079 [details] broken.tar.xzae (split file) join broken.tar.xzaa ... broken.tar.xzae assumes a non-up to date WSL TW. rm -rf /var/cache/zypp/* pushd /var/cache/zypp/ tar -xf ~/broken.tar.xz --strip=3 -p zypper dup :: no action rm -rf /var/cache/zypp/* zypper dup has updates.
Corresponding repository configuration: # | Alias | Name | Enabled | GPG Check | Refresh | Type | URI --+--------------+-----------------------------+---------+-----------+---------+--------+--------------------------------------------------------- 1 | repo-debug | openSUSE-Tumbleweed-Debug | No | ---- | ---- | NONE | http://download.opensuse.org/debug/tumbleweed/repo/oss/ 2 | repo-non-oss | openSUSE-Tumbleweed-Non-Oss | No | ---- | ---- | NONE | http://download.opensuse.org/tumbleweed/repo/non-oss/ 3 | repo-oss | openSUSE-Tumbleweed-Oss | Yes | (r ) Yes | Yes | rpm-md | http://download.opensuse.org/tumbleweed/repo/oss/ 4 | repo-source | openSUSE-Tumbleweed-Source | No | ---- | ---- | NONE | http://download.opensuse.org/source/tumbleweed/repo/oss/ 5 | repo-update | openSUSE-Tumbleweed-Update | Yes | (r ) Yes | Yes | rpm-md | http://download.opensuse.org/update/tumbleweed/
Created attachment 863080 [details] zypper.log from zypper dup on a stale cache, showing the issue 2022-11-23 19:27:38 <1> HOSTNAME(4871) [zypp-core++] socket.cc(fromSocket):550 {T:Zypp-Log} Error querying socket domain: Not sure if this is expected, I also see this message on a working run with a cleared cache.
Created attachment 863081 [details] zypper.log on a cleaned cache directory zypper.log on a cleaned cache directory - for comparison
"long pause", without strong data, is roughly one week.
Looks like even logging is broken on WSL. Without this being fixed it's hard to tell anything.
The cache itself seems to be fine.
Correct. The old cache applied to an updated system naturally prompts for downgrades. Issue may be in cache invalidation.
The cache you attached appears to be up-to-date. The tarball contains 3376 Nov 14 14:25 054c8835...0eba2413-primary.xml.gz 992 Nov 14 14:25 bb54085f...f050a90c-updateinfo.xml.gz which is what I also see at https://download.opensuse.org/update/tumbleweed/repodata/
(In reply to Andreas Stieger from comment #7) > tar -xf ~/broken.tar.xz --strip=3 -p > zypper dup > :: no action > rm -rf /var/cache/zypp/* > zypper dup > > has updates. - Can you remove just /var/cache/zypp/solv/@System. 'Ref' processes the repos, not the rpmdb cache. It might be the cache claims to be newer than the rpmdb. - Or the rpmdb is broken. Revert to the 'broken' cache. Do `rpm --rebuilddb` befor the 'dup'.
(In reply to Michael Andres from comment #15) > The cache you attached appears to be up-to-date. The update repo is not affected (now). Only the main OSS repo. /var/cache/zypp # tar -xf ~/broken.tar.xz --strip=3 -p /var/cache/zypp # zypper search -t package -s --match-exact openSUSE-release Retrieving repository 'openSUSE-Tumbleweed-Oss' metadata ......................................................[done] Loading repository data... Reading installed packages... S | Name | Type | Version | Arch | Repository ---+------------------+---------+-----------------+--------+------------------------ i+ | openSUSE-release | package | 20221122-1949.1 | x86_64 | (System Packages) v | openSUSE-release | package | 20221119-1944.1 | x86_64 | openSUSE-Tumbleweed-Oss v | openSUSE-release | package | 20221119-1944.1 | i586 | openSUSE-Tumbleweed-Oss (In reply to Michael Andres from comment #16) > - Can you remove just /var/cache/zypp/solv/@System. 'Ref' processes the > repos, not the rpmdb cache. It might be the cache claims to be newer than > the rpmdb. Same. > - Or the rpmdb is broken. Revert to the 'broken' cache. Do `rpm --rebuilddb` > befor the 'dup'. $ rpm --rebuilddb error: failed to replace old database with new database! error: replace files in /usr/lib/sysimage/rpm with files from /usr/lib/sysimage/rpmrebuilddb.399 to recover $ ls -l /usr/lib/sysimage/rpm/ total 50300 -rw-r--r-- 1 root root 0 Sep 7 13:54 .rpm.lock -rw-r--r-- 1 root root 12931072 Nov 23 19:56 Index.db -rw-r--r-- 1 root root 38574944 Nov 23 20:20 Packages.db Doing that does not remove the problem. Additionally, issue can be seen via search alone, without looking at the @System source.
@Andreas, we included a fix for the broken logging in WSL in libzypp-17.31.6 and will submit the version to TW today. Please add a zypper.log created by 17.31.6 and showing your issue. (May appear earlier in zypp:Head; https://download.opensuse.org/repositories/zypp:/Head/openSUSE_Tumbleweed/)
Created attachment 863128 [details] zypper.log on a cleaned cache directory (fixed logging) 840 2022-11-26 07:23:20 rm -rf /var/cache/zypp/* 841 2022-11-26 07:23:31 ZYPP_FULLLOG=1 zypper -vv dup 842 2022-11-26 07:25:13 cp /var/log/zypper.log zypper.log-zypper-dup-on-deleted-cache.txt Correctly refreshes and offers newer packages.
Created attachment 863129 [details] zypper.log from zypper dup on a stale cache (fixed logging) 829 2022-11-26 07:20:15 cd /var/cache/zypp/ [..] 832 2022-11-26 07:20:21 tar -xf ~/broken.tar.xz --strip=3 -p 833 2022-11-26 07:20:30 rm /var/log/zypper.log 834 2022-11-26 07:20:41 ZYPP_FULLLOG=1 zypper -vv dup 838 2022-11-26 07:23:06 cp /var/log/zypper.log zypper.log-zypper-dup-on-broken-cache.txt zypper dup on the broken cache. Offers downgrades of packages to the state of the cache, indicating that the current repository state is not used.
Thanks for being patient and sorry for the long delay. The logs are fine now. What I can see so far is the raw metadata refresh being ok in both cases. The downloaded data are identical. It's 'just' a matter of building the solve cache. For whatever reason, the broken case omits rebuilding the solv cache for repo-oss although the repo has changed and new metadata were downloaded. I have to dig a bit deeper into the code to check how this could happen. The case is quite common, so I don't see by now why this happens here on WSL only. Ludwig's suspect, that something might be wrong with the date/time inside the image, could explain the behavior. But so far I don't see any hint for this. Timestamps in the log are 2022-11-26 and the build times of the solve caches are 1668955401 Sun Nov 20 14:43:21 2022 GMT 1668955330 Sun Nov 20 14:42:10 2022 GMT 1668432347 Mon Nov 14 13:25:47 2022 GMT This looks reasonable.
Just reporting that this is no longer reproducible with these versions (and obviously all other updates to the underlying WSL...) libzypp-17.31.8-1.1.x86_64 zypper-1.14.59-1.3.x86_64 Want to keep it open for further investigation or call it done?
SUSE-RU-2023:0788-1: An update that has nine recommended fixes can now be installed. Category: recommended (important) Bug References: 1178233, 1203248, 1203249, 1203715, 1204548, 1204956, 1205570, 1205636, 1206949 Sources used: openSUSE Leap Micro 5.3 (src): libsolv-0.7.23-150400.3.3.1, libzypp-17.31.8-150400.3.14.1, zypper-1.14.59-150400.3.12.2 openSUSE Leap 15.4 (src): libsolv-0.7.23-150400.3.3.1, libzypp-17.31.8-150400.3.14.1, zypper-1.14.59-150400.3.12.2 SUSE Linux Enterprise Micro for Rancher 5.3 (src): libsolv-0.7.23-150400.3.3.1, libzypp-17.31.8-150400.3.14.1, zypper-1.14.59-150400.3.12.2 SUSE Linux Enterprise Micro 5.3 (src): libsolv-0.7.23-150400.3.3.1, libzypp-17.31.8-150400.3.14.1, zypper-1.14.59-150400.3.12.2 Basesystem Module 15-SP4 (src): libsolv-0.7.23-150400.3.3.1, libzypp-17.31.8-150400.3.14.1, zypper-1.14.59-150400.3.12.2 Development Tools Module 15-SP4 (src): libsolv-0.7.23-150400.3.3.1 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.
SUSE-RU-2023:0787-1: An update that has nine recommended fixes can now be installed. Category: recommended (important) Bug References: 1178233, 1203248, 1203249, 1203715, 1204548, 1204956, 1205570, 1205636, 1206949 Sources used: SUSE Linux Enterprise Server 15 SP1 (src): libsolv-0.7.23-150100.4.9.1, libzypp-17.31.8-150100.3.92.1 SUSE Linux Enterprise High Performance Computing 15 SP1 LTSS 15-SP1 (src): libsolv-0.7.23-150100.4.9.1, libzypp-17.31.8-150100.3.92.1, zypper-1.14.59-150100.3.67.2 SUSE Linux Enterprise Server 15 SP1 LTSS 15-SP1 (src): libsolv-0.7.23-150100.4.9.1, libzypp-17.31.8-150100.3.92.1, zypper-1.14.59-150100.3.67.2 SUSE Linux Enterprise Server for SAP Applications 15 SP1 (src): libsolv-0.7.23-150100.4.9.1, libzypp-17.31.8-150100.3.92.1, zypper-1.14.59-150100.3.67.2 SUSE CaaS Platform 4.0 (src): libsolv-0.7.23-150100.4.9.1, libzypp-17.31.8-150100.3.92.1, zypper-1.14.59-150100.3.67.2 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.
SUSE-RU-2023:0786-1: An update that has nine recommended fixes can now be installed. Category: recommended (important) Bug References: 1178233, 1203248, 1203249, 1203715, 1204548, 1204956, 1205570, 1205636, 1206949 Sources used: SUSE Linux Enterprise Server 15 SP2 (src): libzypp-17.31.8-150200.50.1, libsolv-0.7.23-150200.15.1 SUSE Linux Enterprise High Performance Computing 15 SP2 LTSS 15-SP2 (src): libzypp-17.31.8-150200.50.1, libsolv-0.7.23-150200.15.1, zypper-1.14.59-150200.42.2 SUSE Linux Enterprise High Performance Computing ESPOS 15 SP3 (src): libzypp-17.31.8-150200.50.1, libsolv-0.7.23-150200.15.1, zypper-1.14.59-150200.42.2 SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): libzypp-17.31.8-150200.50.1, libsolv-0.7.23-150200.15.1, zypper-1.14.59-150200.42.2 SUSE Linux Enterprise Real Time 15 SP3 (src): libzypp-17.31.8-150200.50.1, libsolv-0.7.23-150200.15.1, zypper-1.14.59-150200.42.2 SUSE Linux Enterprise Server 15 SP2 LTSS 15-SP2 (src): libzypp-17.31.8-150200.50.1, libsolv-0.7.23-150200.15.1, zypper-1.14.59-150200.42.2 SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): libzypp-17.31.8-150200.50.1, libsolv-0.7.23-150200.15.1, zypper-1.14.59-150200.42.2 SUSE Linux Enterprise Server for SAP Applications 15 SP2 (src): libzypp-17.31.8-150200.50.1, libsolv-0.7.23-150200.15.1, zypper-1.14.59-150200.42.2 SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): libzypp-17.31.8-150200.50.1, libsolv-0.7.23-150200.15.1, zypper-1.14.59-150200.42.2 SUSE Manager Proxy 4.2 (src): libzypp-17.31.8-150200.50.1, libsolv-0.7.23-150200.15.1, zypper-1.14.59-150200.42.2 SUSE Manager Retail Branch Server 4.2 (src): libzypp-17.31.8-150200.50.1, libsolv-0.7.23-150200.15.1, zypper-1.14.59-150200.42.2 SUSE Manager Server 4.2 (src): libzypp-17.31.8-150200.50.1, libsolv-0.7.23-150200.15.1, zypper-1.14.59-150200.42.2 SUSE Enterprise Storage 7.1 (src): libzypp-17.31.8-150200.50.1, libsolv-0.7.23-150200.15.1, zypper-1.14.59-150200.42.2 SUSE Enterprise Storage 7 (src): libzypp-17.31.8-150200.50.1, libsolv-0.7.23-150200.15.1, zypper-1.14.59-150200.42.2 SUSE Linux Enterprise Micro 5.1 (src): libzypp-17.31.8-150200.50.1, libsolv-0.7.23-150200.15.1, zypper-1.14.59-150200.42.2 SUSE Linux Enterprise Micro 5.2 (src): libzypp-17.31.8-150200.50.1, libsolv-0.7.23-150200.15.1, zypper-1.14.59-150200.42.2 SUSE Linux Enterprise Micro for Rancher 5.2 (src): libzypp-17.31.8-150200.50.1, libsolv-0.7.23-150200.15.1, zypper-1.14.59-150200.42.2 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.
(In reply to Andreas Stieger from comment #24) > Just reporting that this is no longer reproducible with these versions (and > obviously all other updates to the underlying WSL...) > > libzypp-17.31.8-1.1.x86_64 > zypper-1.14.59-1.3.x86_64 > > Want to keep it open for further investigation or call it done? Closing it. Please reopen if it happens again.