Bug 1257718

Summary: dnf segfaults when presented with empty file
Product: [Fedora] Fedora Reporter: Jan Pazdziora <jpazdziora>
Component: dnfAssignee: rpm-software-management
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: 22CC: jpazdziora, jsilhan, jzeleny, mluscon, oliver.henshaw, packaging-team-maint, pnemade, tim.lauridsen, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 20:48:48 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:

Description Jan Pazdziora 2015-08-27 18:46:15 UTC
Description of problem:

When you are downloading rpm directly from koji, firefox creates the target file as empty file. If you attempt to install/upgrade that file before the download has finished, dnf crashes with core dump.

We should never segfault.

Version-Release number of selected component (if applicable):

dnf-1.1.0-2.fc22.noarch

How reproducible:

Deterministic.

Steps to Reproduce:
1. touch /tmp/jezek-1-1.x86_64.rpm
2. dnf upgrade /tmp/jezek-1-1.x86_64.rpm

Actual results:

Last metadata expiration check performed 0:03:09 ago on Thu Aug 27 20:38:48 2015.
Segmentation fault (core dumped)

Expected results:

Last metadata expiration check performed 0:03:09 ago on Thu Aug 27 20:38:48 2015.
It looks like the file /tmp/jezek-1-1.x86_64.rpm, while having the rpm
extension, is not actually a valid rpm file (it actually seems to be
an empty file). I'm going to skip this file and I'm sorry for the
inconvenience.

Additional info:

Or some other helpful message, and definitely no segfault.

Comment 1 Honza Silhan 2015-09-01 12:12:52 UTC
Can you report it through abrt, please, so we get the core dump file. It will be probably issue in libsolv or rpm component.

Comment 2 Jan Pazdziora 2015-09-01 12:22:32 UTC
Do you say you are not able to reproduce locally?

I'd rather not spend additional time on this one (installing and configuring abrt, debuginfo, whatnot) when it seems to be deterministic -- developers should be able to reproduce and generate any needed data themselves.

Comment 3 Honza Silhan 2015-09-01 15:42:12 UTC
That was just suggestion for you so we can assign it to right component. If you don't want get it fixed then we will keep this report low prio (almost no chance to look into this) and then we will reassign it correctly.

Comment 4 Jan Pazdziora 2015-09-01 17:22:34 UTC
(In reply to Jan Silhan from comment #3)
> If you don't want get it fixed

If I did not want it fixed, I wouldn't have bothered filing this bugzilla in the first place.

Comment 5 Michal Domonkos 2016-02-22 12:59:17 UTC
*** Bug 1309778 has been marked as a duplicate of this bug. ***

Comment 6 Oliver Henshaw 2016-02-22 14:03:32 UTC
Note that bug #1309778 has similar steps to reproduce and has a backtrace - the crash is in libhawkey but is triggered by "dnf upgrade" and not "dnf install". And that the STR can be run from a live image.

Comment 7 Fedora Admin XMLRPC Client 2016-07-08 09:33:29 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Fedora End Of Life 2016-07-19 20:48:48 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 9 Oliver Henshaw 2016-07-20 11:45:52 UTC
Still happens on F24 with:

dnf-1.1.9-2.fc24.noarch
hawkey-0.6.3-2.fc24.x86_64

Comment 10 Igor Gnatenko 2016-07-21 08:44:40 UTC

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