Segfault on update due to missing package

https://cdn.download.clearlinux.org/update/37800/pack-NetworkManager-from-37650.tar does not exist. Yet it tries to download it.

I’ve also tried updating to other versions but all sorts of packages referring to “37650” are broken.

2022-12-27 13:56:07 (src/swupd_lib/curl_async.c:508)Debug: Curl - Start ASYNC download: https://cdn.download.clearlinux.org/update/37810/pack-Babel-from-37570.tar -> /var/lib/swupd/pack-Babel-from-37570-to-37810.tar
2022-12-27 13:56:07 (src/swupd_lib/curl.c:436)    Debug: Curl - process_curl_error_codes: curl_ret = 0, response = 200
2022-12-27 13:56:07 (src/swupd_lib/curl_async.c:297)Debug: Curl - Complete ASYNC download: https://cdn.download.clearlinux.org/update/37810/pack-Babel-from-37570.tar -> /var/lib/swupd/pack-Babel-from-37570-to-37810.tar, status=0
2022-12-27 13:56:07 (src/swupd_lib/packs.c:64)    
2022-12-27 13:56:07 (src/swupd_lib/packs.c:64)    Debug: Extracting Babel pack for version 37810
2022-12-27 13:56:07 (src/swupd_lib/curl_async.c:508)Debug: Curl - Start ASYNC download: https://cdn.download.clearlinux.org/update/37810/pack-NetworkManager-tui-from-37650.tar -> /var/lib/swupd/pack-NetworkManager-tui-from-37650-to-37810.tar
Segmentation fault

How can I tell swupd to ignore these useless delta packages that never save any space for me anyway (always claim a space expansion) and just grab the up to date files?

I’ve tried “clean” and “diagnose” and everything – nothing fixes it.

Thanks

I don’t know if this will work, but try the new version update 37870.

No help. Still segfaults. How can I upgrade my system? Can I disable deltas? Deltas are typically worthless in my experience anyway, saving 0% space (sometimes slightly negative!).

Or is there a way I can initiate an update from a new ISO without reconfiguring everything?

Broken system updates due to missing upstream packages and segfaults are a completely game-changing level of breakage and jank, unfortunately.

2023-01-09 14:59:49 (src/swupd_lib/packs.c:301)    - x11-server
2023-01-09 14:59:49 (src/swupd_lib/packs.c:301)    - xz
2023-01-09 14:59:49 (src/swupd_lib/packs.c:301)    - zstd
2023-01-09 14:59:49 (src/swupd_lib/curl_async.c:508)Debug: Curl - Start ASYNC download: https://cdn.download.clearlinux.org/update/37810/pack-cloc-from-37290.tar -> /var/lib/swupd/pack-cloc-from-37290-to-37810.tar
2023-01-09 14:59:49 (src/swupd_lib/curl.c:436)    Debug: Curl - process_curl_error_codes: curl_ret = 0, response = 200
2023-01-09 14:59:49 (src/swupd_lib/curl_async.c:297)Debug: Curl - Complete ASYNC download: https://cdn.download.clearlinux.org/update/37810/pack-cloc-from-37290.tar -> /var/lib/swupd/pack-cloc-from-37290-to-37810.tar, status=0
2023-01-09 14:59:49 (src/swupd_lib/packs.c:64)    
2023-01-09 14:59:49 (src/swupd_lib/packs.c:64)    Debug: Extracting cloc pack for version 37810
2023-01-09 14:59:49 (src/swupd_lib/curl_async.c:508)Debug: Curl - Start ASYNC download: https://cdn.download.clearlinux.org/update/38010/pack-connections-from-37580.tar -> /var/lib/swupd/pack-connections-from-37580-to-38010.tar
Segmentation fault

You can try and run sudo swupd repair or sudo swupd diagnose to see if that shows any issues (please report the outcome and output here!) or even corrects them.

If it isn’t better after a swupd repair then could you open an issue for this? If you can get gdb on the system and give a backtrace that’d also be really handy. The delta attempt failure is fine (and normal) as deltas are not always going to exist (as deltas are optional) so I’m guessing something later is causing the segfault.

I tried running an update on my system from 37650 to latest with at least NetworkManager installed and didn’t get anything.

The reason I don’t want to attempt a repair is because the latest nvidia drivers, as well as the zfs filesystem, as well as my own compile of static zlib, and probably a half dozen other things, all get pulverized because they’re flagged as “non-managed”.

Is there a way around this that allows clear to maintain my additional files?

BTW, a script of this format (I am starting at 37690 by the way) yields segmentation fault for every single version above mine:

VF=37700; while true; do echo "------> trying to update to V $VF" >> /home/clear/updates.log; swupd update -V $VF --debug &>> /home/clear/updates.log; VF=$((VF+10)); done

That said, could it be possible a file of mine overwrote a system file that then tries to “delta upgrade” to a more recent version but fails because it wasn’t the original version? (E.g. something in openGL?)

Wowza. This looks a little weirder than just an nvidia, zlib, and zfs install to me. What do you make of this?

root@computer~ # swupd diagnose
Diagnosing version 37690
Downloading missing manifests...
    
Checking for missing files
 -> Missing file: /usr/lib64/glibc-hwcaps/x86-64-v3/libEGL.so
...
 [100%]

Checking for corrupt files
 -> Hash mismatch for file: /usr/bin/WebKitWebDriver
 -> Hash mismatch for file: /usr/bin/Xnest
 -> Hash mismatch for file: /usr/bin/Xvfb
 -> Hash mismatch for file: /usr/bin/Xwayland
 -> Hash mismatch for file: /usr/bin/abicompat
 -> Hash mismatch for file: /usr/bin/abidiff
 -> Hash mismatch for file: /usr/bin/abidw
 -> Hash mismatch for file: /usr/bin/abilint
...
 -> Hash mismatch for file: /usr/lib/python3.11/site-packages/sklearn/tree/_tree.cpython-311-x86_64-linux-gnu.so
...
 -> Hash mismatch for file: /usr/lib/udev/libinput-device-group
 -> Hash mismatch for file: /usr/lib/udev/libinput-fuzz-extract
...
 -> Hash mismatch for file: /usr/libexec/webkit2gtk-5.0/WebKitNetworkProcess
 -> Hash mismatch for file: /usr/libexec/webkit2gtk-5.0/WebKitWebProcess
 -> Hash mismatch for file: /usr/libexec/webkit2gtk-5.0/jsc
 [100%]

Checking for extraneous files
 [100%]

Inspected 359292 files
  86 files were missing
  1996 files did not match

Use "swupd repair" to correct the problems in the system

Diagnose successful

I have the full list if someone wants to take a poke. A lot of strange things are listed. How could these have all become messed up? Surely this goes beyond a couple of drivers?

Nope – repair doesn’t fix it. It lies – says it did, nothing unsuccesful, all successful. And then when I run it again nothing has changed at all. What a silly program. I am curious why you made the decision to use this clearly fragile package manager…

Inspected 699993 files
  43 files were missing
    43 of 43 missing files were replaced
    0 of 43 missing files were not replaced
  2664 files did not match
    2664 of 2664 files were repaired
    0 of 2664 files were not repaired

Calling post-update helper scripts
External command: none

Repair successful

Then:

Inspected 699993 files
  43 files were missing
  2664 files did not match

Use "swupd repair" to correct the problems in the system

Diagnose successful

Nope. Not successful.

So right now we have a reporting issue with diagnose/repair where optimized libraries that replace the default in /usr/bin are flagged for hash mismatch (which is correct technically but not helpful). These binaries after repair finishes are set back to their optimized versions. You can disable the optimized binaries getting installed by touching /etc/clear/elf-replace-avx2 and /etc/clear/elf-replace-avx512 but that just will resolve repair not reporting an issue I expect and not actually fixing your problem. Worth a try I guess.

Regardless if the repair didn’t get the system to be able to update, not really sure what is wrong without a backtrace with the segfault since I can’t reproduce the behavior.