Created attachment 1625947 [details] Output from valgrind Description of problem: DNF segfaults when running repolist (or e.g. install/upgrade/downgrade, but not e.g. mark/group/clean). Version-Release number of selected component (if applicable): I used the following copr repo: https://copr.fedorainfracloud.org/coprs/rpmsoftwaremanagement/dnf-nightly # rpm -q libdnf dnf dnf-plugins-core librepo-1.10.7-0.6gc842ff0.fc30.x86_64 libdnf-0.35.6-0.23g0999bcc7.fc30.x86_64 dnf-4.2.12-0.37ge22bf67b.fc30.noarch How reproducible: Always. Steps to Reproduce: 1. # dnf install libdnf-0.35.6-0.23g0999bcc7.fc30.x86_64 2. # dnf repolist Segmentation fault (core dumped) Additional info: Based on the time of the libdnf build, I think the libdnf contains commits up to this one: https://github.com/rpm-software-management/libdnf/commit/0999bcc7f8303bfeada691e0148377c016e29d86 I cannot reproduce it with newer libdnf version. I can also provide coredump, but it's too big to add as attachement.
I'm unable to reproduce it in podman with following Dockerfile: FROM fedora:30 RUN dnf -y makecache RUN dnf -y install dnf-plugins-core RUN dnf -y copr enable rpmsoftwaremanagement/dnf-nightly RUN dnf -y makecache RUN dnf -y install libdnf-0.35.6-0.23g0999bcc7.fc30 $ podman run -it <hash> dnf repolist Could you try it in podman by yourself? Can you tweak the Dockerfile so it creates the same dnf configuration and repo configuration as your system?
I managed to reproduce it with the following Dockerfile: FROM fedora:30 RUN dnf -y makecache RUN dnf -y install dnf-plugins-core RUN dnf -y copr enable rpmsoftwaremanagement/dnf-nightly RUN dnf -y makecache RUN dnf -y install dnf-4.2.12-0.43g64fbb431.fc30.noarch \ dnf-4.2.12-0.43g64fbb431.fc30 \ dnf-plugins-core-4.0.10-4g58e8f15.fc30 \ libcomps-0.1.11-12g919c0e2.fc30 \ libdnf-0.36.0-0.32g77a14f6a.fc30 \ librepo-1.10.7-0.9g5c30597.fc30 \ libsolv-0.7.6-6ga94facb0.fc30 RUN dnf -y install libdnf-0.35.6-0.23g0999bcc7.fc30 However, I wasn't sure how to build with podman, so I used docker instead; I hope that's ok (but I can learn with podman and check if it's the same). Also, "sudo docker run -it <hash> dnf repolist" didn't output anything, but running "sudo docker run -it <hash>" and then "dnf repolist" in the container produced the segfault. Additionally, I encountered a different error with the following Dockerfile: FROM fedora:30 RUN dnf -y makecache RUN dnf -y install dnf-plugins-core RUN dnf -y copr enable rpmsoftwaremanagement/dnf-nightly RUN dnf -y makecache RUN dnf -y install libdnf-0.36.0-0.32g77a14f6a.fc30 # sudo docker run -it <hash> dnf repolist Error: Unknown option Error: Unknown option
I found even smaller reproducer: FROM fedora:30 RUN dnf -y makecache RUN dnf -y install dnf-plugins-core RUN dnf -y copr enable rpmsoftwaremanagement/dnf-nightly RUN dnf -y makecache RUN dnf -y install librepo-1.10.7-0.9g5c30597.fc30
The bug was in librepo. I made a fix PR: https://github.com/rpm-software-management/librepo/pull/175 The bug affects only dnf-nightly builds (wasn't released). Fix was merged to upstream librepo. I will close the bug.