I have identified the error and written a patch to the dist-update
scripts.

The error is very serious in nature and is likely causing many other
bugs, crashes and corruptions. As indicated in the error logs, the
"Distribution Upgrade Tool" exits due to an out of memory error when
trying to spawn a thread. This low memory condition is caused by an
infinite loop in the "doUpdate()" method in the DistUpgradeControler
class. The infinite loop in turn, is a result of an incomplete
"markUpgrade()" method in "/usr/lib/python2.5/site-
packages/apt/package.py". The loop is incremented upon reception of an
IOError Exception, however this exception is not thrown as expected. The
loop is designed to terminate if no Exception is received, but an
Exception of a type other than IOError is sometimes returned resulting
in an endless loop.

To fix these issues, the patch replaces the reference to the stub
"markUpgrade()" method with "markInstall()". While not ideal, the result
is the same.

Additionally, I added some robustness to the maxRetries loops in
DistUpgradeControler.py by converting them to 'for' loops. A fall-back
'except' was also added to the loops purely for the purposes of
debugging.

To use this patch, download the Gutsy dist-upgrade script package from
http://archive.ubuntu.com/ubuntu/dists/gutsy/main/dist-upgrader-
all/0.81/gutsy.tar.gz, extract and apply the patch. The just navigate to
the extracted directory and run "./dist-upgrade.py".

** Attachment added: "dist-upgrade patch"
   http://launchpadlibrarian.net/10123821/gusty-dist-upgrade.patch

-- 
Distribution Upgrade fails to complete -- Cannot allocate memory
https://bugs.launchpad.net/bugs/154493
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to