[Bug 884625] Re: Upgrade from Natty to Oneiric failed: Error in function pulse

Lincoln Phipps lincoln.phipps at openmutual.net
Mon Feb 6 10:00:48 UTC 2012


I had this problem with Maverick -> Natty upgrade (the code doesn't see
to have changed in Natty -> Oneiric) so it will also fail in other
releases but what I did was edit the file /usr/lib/python2.6/dist-
packages/apt/progress/text.py (it’s Python) around line 161 onwards
(that may also be /usr/lib/python2.7/dist etc and do some sanity
checking on the eta before it is used e.g. I did,

if eta < 0:
                end = " %sB/s ~%s" % (apt_pkg.size_to_str(self.current_cps),apt_pkg.time_to_str(0))
            elif eta > (30 * 24 *60 * 60):
                end = " %sB/s >%s" % (apt_pkg.size_to_str(self.current_cps),apt_pkg.time_to_str(30 * 24 *60 * 60))
            else:
                end = " %sB/s %s" % (apt_pkg.size_to_str(self.current_cps),
                                 apt_pkg.time_to_str(eta))

(though you could do other checks) I suspect that to get that specific
OverflowError: signed integer is less than minimum error then I think
that if the download process resets itself i.e. retrying a file then the
file size self.total_bytes is temporarily nonsensical e.g. 0 whilst the
program resets the download but it still does the pulse on this but
sends a large negative number to apt_pkg.time_to_str().

If you try and pass a large negative number to the apt_pkg.time_to_str()
then it either works as nonsense or it fails with the OverflowError:
signed integer is less than minimum e.g. here is my test code,

>>> import apt_pkg
>>> apt_pkg.TimeToStr(-2147483648)
'213503982309746d 3h 46min 8s'
>>> apt_pkg.TimeToStr(-2147483649)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: signed integer is less than minimum 


So I think you need three conditions, lots of packages to download so that the total to download gets into the billions of bytes, big files to download so that the download process can fail to download the file, and finally a crappy ADSL line or similar.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-manager in Ubuntu.
https://bugs.launchpad.net/bugs/884625

Title:
  Upgrade from Natty to Oneiric failed: Error in function pulse

Status in “update-manager” package in Ubuntu:
  Confirmed

Bug description:
  37% [1589 blobwars-data 46.1 MB/66.7 MB 69%]
  Error in function pulse

  
  A fatal error occurred 

  Please report this as a bug and include the files 
  /var/log/dist-upgrade/main.log and /var/log/dist-upgrade/apt.log in 
  your report. The upgrade has aborted. 
  Your original sources.list was saved in 
  /etc/apt/sources.list.distUpgrade. 

  Traceback (most recent call last):

  File "/tmp/update-manager-xZun7L/DistUpgradeViewText.py", line 41, in 
  pulse 
  apt.progress.text.AcquireProgress.pulse(self, owner) 

  File "/usr/lib/python2.7/dist-packages/apt/progress/text.py", line 
  166, in pulse 
  apt_pkg.time_to_str(eta)) 

  OverflowError: signed integer is less than minimum 
  === Command terminated with exit status 1 (Tue Nov  1 17:35:13 2011) ===

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/884625/+subscriptions




More information about the foundations-bugs mailing list