Bug 786640

Summary: show warning when downloading from repo fails
Product: [Fedora] Fedora Reporter: Marek Michał Mazur <marek90>
Component: yumAssignee: Fedora Packaging Toolset Team <packaging-team>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: abrt-devel-list, dvlasenk, ffesti, iprikryl, jmoskovc, kklic, maxamillion, mmilata, mtoman, npajkovs, packaging-team, tim.lauridsen, zpavlas
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-12-20 15:10:20 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:

Description Marek Michał Mazur 2012-02-02 01:22:45 UTC
http://youtu.be/X1LYDWtRM84

Have no idea why and no idea how.

Comment 1 Jiri Moskovcak 2012-08-10 07:30:47 UTC
Do you still experience this problem with the current version? If you can reproduce, please run: 

$ abrt-gui -vvv

and send us the output.

Comment 2 Jiri Moskovcak 2012-09-18 13:42:32 UTC
This seems like a bug in yum. We use the yum API to download the packages like this:

current_pkg = 1
for pkg in package_list:
  print "Downloading %i of %i packages" % (current_pkg, len(package_list))
  self.downloadPkgs(pkglist=[pkg])
  current_pkg++

- and according to the log it looks like it's looping in the downloadPkgs() which comes from YumBase

Comment 3 Zdeněk Pavlas 2012-09-19 07:13:12 UTC
Isn't the "print" statement above executed on each iteration, printing "Downloading 13 of 15 .." again and again?  downloadPkgs() might fail in some ways, but it very likely does not loop there.

Comment 4 Jiri Moskovcak 2012-09-19 07:26:31 UTC
(In reply to comment #3)
> Isn't the "print" statement above executed on each iteration, printing
> "Downloading 13 of 15 .." again and again?  downloadPkgs() might fail in
> some ways, but it very likely does not loop there.

- oops, sorry, the example is not correct, the message "Downloading .." comes from updateProgress callback which is called from the downloadPkgs()
- do the real code is:

<snip>
            err = self.downloadPkgs(pkglist=[pkg])
            # normalize the name
            # just str(pkg) doesn't work because it can have epoch
            pkg_nvra = pkg.name + "-" + pkg.version + "-" + pkg.release + "." + pkg.arch
            package_file_name = pkg_nvra + ".rpm"
            if err:
                # I observed a zero-length file left on error,
                # which prevents cleanup later. Fix it:
                try:
                    os.unlink(self.tmpdir + "/" + package_file_name)
                except:
                    pass
                print (_("Downloading package {0} failed").format(pkg))
            else:
                unpack_result = unpack_rpm(package_file_name, files, self.tmpdir,
                                           self.cachedir, self.keeprpms, exact_files=download_exact_files)
                if unpack_result == RETURN_FAILURE:
                    # recursively delete the temp dir on failure
                    print _("Unpacking failed, aborting download...")
                    clean_up()
                    return RETURN_FAILURE

            downloaded_pkgs += 1
</snip>

- and as you can see from the video the code after the line err = self.downloadPkgs(pkglist=[pkg]) is never reached (it should at least increase the downloaded_pkgs counter)

Comment 5 Zdeněk Pavlas 2012-09-19 08:26:32 UTC
Yes, it's stuck in downloadPkgs().  My guess is it's not an infinite loop, downloader is just trying all mirrors (there are lots of them for F16) to download the remaining 5% of the 375MB file, but it keeps failing.  Ran out of space in /var/cache, perhaps?

Comment 6 Jiri Moskovcak 2012-09-20 10:41:49 UTC
Author: Jiri Moskovcak <jmoskovc>
Date:   Thu Sep 20 10:26:44 2012 +0200

    added error callback to get notification about download failure rhbz#786640

Comment 7 Jiri Moskovcak 2012-09-20 10:43:20 UTC
I added a notification for cases when downloading fails, so user knows what's going on and it doesn't look like it's restarting the download without any reason.

Comment 8 Fedora Update System 2012-09-24 14:31:42 UTC
abrt-2.0.13-1.fc18,libreport-2.0.14-1.fc18,btparser-0.19-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/abrt-2.0.13-1.fc18,libreport-2.0.14-1.fc18,btparser-0.19-1.fc18

Comment 9 Fedora Update System 2012-09-24 20:03:48 UTC
Package abrt-2.0.13-1.fc18, libreport-2.0.14-1.fc18, btparser-0.19-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing abrt-2.0.13-1.fc18 libreport-2.0.14-1.fc18 btparser-0.19-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-14679/abrt-2.0.13-1.fc18,libreport-2.0.14-1.fc18,btparser-0.19-1.fc18
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2012-09-25 10:06:12 UTC
abrt-2.0.13-1.fc17,libreport-2.0.14-1.fc17,btparser-0.19-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/abrt-2.0.13-1.fc17,libreport-2.0.14-1.fc17,btparser-0.19-1.fc17

Comment 11 Fedora Update System 2012-09-27 10:56:53 UTC
python-urlgrabber-3.9.1-21.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/python-urlgrabber-3.9.1-21.fc18

Comment 12 Fedora Update System 2012-12-20 15:10:27 UTC
python-urlgrabber-3.9.1-21.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.