-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
6.13.0
-
None
Description of problem:
A customer has a local repository with metadata in .zst format. This leads to having any dnf command crash in assertion:
# yum update [...] platform-python: /builddir/build/BUILD/libdnf-0.63.0/libdnf/dnf-sack.cpp:781: gboolean load_yum_repo(DnfSack*, HyRepo, GError**): Assertion `fp_primary' failed. Aborted (core dumped)
After several days of troubleshooting and reproducing internally, I was able to find out that the Satellite libsolv package, which is not RHEL8 standard library, isn't compiled with zstd support, causing the assertion to fail.
Assertions should never occur, instead a proper error message should be printed back to the user.
Culprit code in libsolv:
657 FILE * 658 solv_xfopen(const char *fn, const char *mode) 659 { : 692 #ifdef ENABLE_ZSTD_COMPRESSION 693 if (suf && !strcmp(suf, ".zst")) 694 return myzstdfopen(fn, mode); 695 #else 696 if (suf && !strcmp(suf, ".zst")) 697 return 0; 698 #endif
Here above online 697 (and maybe more lines for similar compression methods), only a return 0 is returned, which leads to assertion failure in dnf code.
Please fix this by providing human-friendly error messages.
How reproducible:
Always
Is this issue a regression from an earlier version:
Don't know.
Steps to Reproduce:
1. Setup a local repository with .zst metadata
2. Perform a yum update command
Actual behavior:
Assertion failure
Expected behavior:
Error message reported by libsolv, no assertion (requires changes in dnf)
Business Impact / Additional info:
Annoyance
- is duplicated by
-
RHEL-44355 dnf crashes in assertion when Sat's libsolv lacks ZST support
- Closed
- links to