Bug 744683 - Abrt-gui incorrectly show debuginfo installation size
Summary: Abrt-gui incorrectly show debuginfo installation size
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: abrt
Version: 16
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
Assignee: Denys Vlasenko
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ABRTF17
TreeView+ depends on / blocked
 
Reported: 2011-10-10 07:42 UTC by Pavel Alexeev
Modified: 2012-05-17 12:57 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-05-17 12:57:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.