Bug 439160 - float division while upgrading to Fedora 9 Beta
float division while upgrading to Fedora 9 Beta
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Anaconda Maintenance Team
Fedora Extras Quality Assurance
: 443243 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2008-03-27 08:23 EDT by Matěj Cepl
Modified: 2008-06-21 16:17 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-06-21 16:17:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
/var /tmp /etc from the failed attempt to upgrade (2.17 MB, application/x-tar)
2008-03-27 08:23 EDT, Matěj Cepl
no flags Details

  None (edit)
Description Matěj Cepl 2008-03-27 08:23:14 EDT
Description of problem:
I have a host of problems with upgrading to Fedora 9 Beta and one of them is
that I cannot get through with any mode of upgrade (graphical or text, cs_CZ or
en_US). After (or during) "Transfer of the installation image to disk" message I
get "during the transaction the following error occurred: float division" (rough
re-translation from a Czech localized string).

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

How reproducible:
Comment 1 Matěj Cepl 2008-03-27 08:23:14 EDT
Created attachment 299309 [details]
/var /tmp /etc from the failed attempt to upgrade
Comment 2 Jeremy Katz 2008-03-27 09:46:03 EDT
Float division?  Not sure where that'd be bubbling up from.  Going to make my
first guess rpm ;-)
Comment 3 Panu Matilainen 2008-04-01 05:40:12 EDT
Is this by any chance a Xen host? See bug 435309...
Comment 4 Matěj Cepl 2008-04-01 16:28:55 EDT
No, unfortunately this was not Xen host, and anaconda screwed it up so much that
I have only today made it working again. ;-)
Comment 5 Sven 2008-04-02 20:26:38 EDT
I have a system where I installed a new 2nd hard drive (XP is on the first) and
I installed Fedora 9 Beta.

Not knowing better, I selected to boot from the new drive (I think is was sdb)
but  found after install and reboot that I could not get into Fedora. I think
should have selected to boot from sda so I tried a reinstall/upgrade from the
CDROM and no matter what change I make to change the bootloader (update_existing
or create_new) I get the same "float division" error.

Hope to have better luck with a 2nd attempt of a new install as the upgrade
option seems broken.
Comment 6 Richard Lloyd 2008-04-18 17:18:49 EDT
OK, I can reproduce this with the latest Fedora 9 Preview release thus:

1. Install Fedora 9 Preview from scratch (i.e. not an upgrade) on a hard drive.
I didn't really select anything out of the ordinary - I did it from the x86_64 DVD.

2. Boot back into the install DVD and this time choose Upgrade and select the
drive you installed Fedora 9 Preview (aka 8.93) on.

3. Confirm that you want to update the bootloader (which is the first/default
option anyway).

4. Let the installer churn for a few seconds and *bing* you get a "float
division" error.

5. Attempts to go "Back" result in a warning about the filesystems already being
active - if you choose "Continue" at that point, it just hangs on an (empty)
installation progress bar and I had to reboot.

Boot yet again into the install DVD, but choose rescue system (or you can go
back into the installer and press F2 to get a shell prompt). You should have
/mnt/sysimage as your mounted installed drive. I then removed one package (grub)
that I knew would have to re-installed:

rpm -r /mnt/sysimage -e grub

I then rebooted and repeated steps 2, 3 and 4 above - this time, it didn't get a
"float division" error at step 4 and grub was indeed re-installed and then the
"upgrade" finished.

"Float division" suggests that the upgrade code had calculated that there were
zero packages that could be upgraded and it did some calculation with
X/<num_packages_to_upgrade> - hence the float division error. As soon as
num_packages_to_upgrade=1 after I deleted grub, no division problem.
Comment 7 Matěj Cepl 2008-04-19 04:09:59 EDT
Shouldn't this be resolved before GA?
Comment 8 Panu Matilainen 2008-04-21 10:17:21 EDT
This is unrelated to bug 435309 although both are division by zero errors. The
"float division" here is a Python exception, if it happened in rpm you'd hardly
get a nice gui popup for it ;) And here's where it comes from, easily reproduced
with the procedure from comment #6 (ie there are no packages to upgrade):

class DownloadHeaderProgress:
    def __init__(self, intf, ayum=None):
        if self.ayum is not None and self.ayum.tsInfo is not None:
            self.numpkgs = len(self.ayum.tsInfo.getMembers())
            self.incr = (1.0 / self.numpkgs) * (1.0 - self.loopstart)

...and over to anaconda.
Comment 9 Chris Lumens 2008-04-21 10:28:57 EDT
*** Bug 443243 has been marked as a duplicate of this bug. ***
Comment 10 Jeremy Katz 2008-04-22 14:42:55 EDT
Fixed in git
Comment 11 Bug Zapper 2008-05-14 02:56:01 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:

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