Bug 744683

Summary: Abrt-gui incorrectly show debuginfo installation size
Product: [Fedora] Fedora Reporter: Pavel Alexeev <pahan>
Component: abrtAssignee: Denys Vlasenko <dvlasenk>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: high    
Version: 16CC: anton, dvlasenk, iprikryl, jfilak, jmoskovc, kklic, mmilata, mtoman, npajkovs
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: 2012-05-17 12:57:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 744774    

Description Pavel Alexeev 2011-10-10 07:42:39 UTC
Description of problem:
When I try locally trace dumps, abrt make attempt download required debuginfo packages. Before that confirmation dialogue appeared, and there I see sentence like:
"Downloading 804.23Mb, installed size: -609.20Mb. Continue?"

I think some sort of type overflow happened.
It is not critical, but I think also it should be trivial fixed.

Version-Release number of selected component (if applicable):
$ rpm -q abrt
abrt-2.0.4.981-3.fc16.x86_64

How reproducible:
Always.

Comment 1 Denys Vlasenko 2011-12-07 13:19:45 UTC
Note to self: try crashing libreoffice

Comment 2 Denys Vlasenko 2011-12-07 17:07:38 UTC
So far failed to reproduce...

Comment 3 Denys Vlasenko 2011-12-07 17:37:04 UTC
Our code looks ok: installed_size is summed only in one place:

        installed_size = 0
...
        for debuginfo_path in files:
            log2("yum whatprovides %s", debuginfo_path)
            pkg = self.pkgSack.searchFiles(debuginfo_path)
            # sometimes one file is provided by more rpms, we can use either of
            # them, so let's use the first match
            if pkg:
                if pkg[0] in package_files_dict.keys():
                    package_files_dict[pkg[0]].append(debuginfo_path)
                else:
                    package_files_dict[pkg[0]] = [debuginfo_path]
                    todownload_size += float(pkg[0].size)
=======>            installed_size += float(pkg[0].installedsize)
                    total_pkgs += 1
...
        if verbose != 0 or total_pkgs != 0:
            print _("Packages to download: {0}").format(total_pkgs)
            question = _("Downloading {0:.2f}Mb, installed size: {1:.2f}Mb. Continue?").format(
                         todownload_size / (1024*1024),
                         installed_size / (1024*1024)
                        )

Looks like self.pkgSack.searchFiles() returns something bogus, with negative pkg[0].installedsize

I'd file a yum bug, but we do need a reproducer first. Pavel, can you trigger this reliably?

Comment 4 Pavel Alexeev 2011-12-12 14:35:38 UTC
Sorry, but what additional info requested? I does not known how it works, I'm not python programmer unfortunately. I just report bug. Can I help something to resolve it?

Comment 5 Jakub Filak 2012-04-05 15:09:08 UTC
I configured my environment to require downloading of all available debuginfo packages from repositories "updates-debuginfo", "updates-testing-debuginfo", "fedora-debuginfo". I got the following text:

Packages to download: 5922
Downloading 17141.03Mb, installed size: 50129.38Mb. Continue? [y/N]

- The overflow explanation refused. ( float should not overflow )


I had modified our code to check an installed package size value returned by yum API. No negative number was found.

- Without any negative number is impossible to get negative sum.


The bug is not reproducible.

Comment 6 Jiri Moskovcak 2012-05-17 12:57:28 UTC
Closing per comments #3 and #5