Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1677427

Summary: PackageKit can crash with a traceback running through librepo and libdnf on a 503 from MirrorManager
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: libdnfAssignee: amatej
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: amatej, dmach, jmracek, jonathan, jrohel, klember, mblaha, pkratoch, rdieter, rhughes, rpm-software-management, smparrish
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: openqa
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-18 13:21:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
full backtrace from the crash none

Description Adam Williamson 2019-02-14 21:46:37 UTC
I found a couple of openQA tests recently where packagekitd crashed during a FreeIPA client enrol operation (when realmd calls packagekit to install the necessary client packages). From the traceback, it's apparent that it's crashing when MirrorManager returns a 503 (which is a thing that's happening occasionally lately, I believe infra is looking into it):

Core was generated by `/usr/libexec/packagekitd'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  repo_mirrorlist_failure_cb (user_data=0xdeadbeef, message=0x7ff440136090 "Status code: 503 for https://mirrors.fed
oraproject.org/mirrorlist?repo=fedora-29&arch=x86_64", url=0x7ff440135640 "https://mirrors.fedoraproject.org/mirrorlis
t?repo=fedora-29&arch=x86_64", metadata=0x7ff4476f84b0 "https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$rele
asever&arch=$basearch") at /usr/src/debug/libdnf-0.22.3-1.fc29.x86_64/libdnf/dnf-repo.cpp:1641
1641    /usr/src/debug/libdnf-0.22.3-1.fc29.x86_64/libdnf/dnf-repo.cpp: No such file or directory.
[Current thread is 1 (Thread 0x7ff45950b700 (LWP 1794))]

Thread 1 (Thread 0x7ff45950b700 (LWP 1794)):
#0  repo_mirrorlist_failure_cb (user_data=0xdeadbeef, message=0x7ff440136090 "Status code: 503 for https://mirrors.fed
oraproject.org/mirrorlist?repo=fedora-29&arch=x86_64", url=0x7ff440135640 "https://mirrors.fedoraproject.org/mirrorlis
t?repo=fedora-29&arch=x86_64", metadata=0x7ff4476f84b0 "https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$rele
asever&arch=$basearch") at /usr/src/debug/libdnf-0.22.3-1.fc29.x86_64/libdnf/dnf-repo.cpp:1641
        data = 0xdeadbeef
#1  0x00007ff458a9d59b in check_transfer_statuses (dd=<optimized out>, err=0x7ff45950a5f0) at /usr/src/debug/librepo-1
.9.1-1.fc29.x86_64/librepo/downloader.c:1718

...

I'll attach the full traceback. Obviously the main problem here is MirrorManager returning a 503, but surely packagekitd shouldn't *crash* when this happens?

Not sure if the bug should properly be assigned to PackageKit or libdnf or librepo, please re-assign if necessary.

Comment 1 Adam Williamson 2019-02-14 21:48:50 UTC
Created attachment 1534960 [details]
full backtrace from the crash

Comment 2 Kalev Lember 2019-02-15 04:51:10 UTC
Moving the bug to libdnf where the crashing code is.

Comment 3 amatej 2019-02-18 13:21:11 UTC

*** This bug has been marked as a duplicate of bug 1637923 ***