I think this is a fundamental design problem that is going to take some serious rework if this is going to work on low memory systems. I hunted down were the memory is getting eaten up. It's in DistUpgradeControler.py. I added comments to the procedure below to show the fatal line. The bottom line is that the system is just trying to cache more than a machine with limited memory can hande. Someone who knows more about the what and the why of the cache will have to look and see if it can be slimmed down.
def doDistUpgrade(self):
# get the upgrade currentRetry = 0
fprogress = self._view.getFetchProgress()
iprogress = self._view.getInstallProgress(self.cache)
# retry the fetching in case of errors
maxRetries = self.config.getint("Network","MaxRetries")
while currentRetry < maxRetries:
try:
# THIS IS THE FATAL LINE:
res = self.cache.commit(fprogress,iprogress)
# THE ONE ABOVE THIS ONE.
except SystemError, e: logging.error("SystemError from cache.commit(): %s" % e)
# check if the installprogress catched a pkgfailure, if not, generate a fallback here
if iprogress.pkg_failures == 0: errormsg = "SystemError in cache.commit(): %s" % e apport_pkgfailure("update-manager", errormsg)
# invoke the frontend now
msg = _("The upgrade aborts now. Your system " "could be in an unusable state. A recovery " "will run now (dpkg --configure -a).")
if not run_apport(): msg += _("\n\nPlease report this bug against the 'update-manager' " "package and include the files in /var/log/dist-upgrade/ " "in the bugreport.\n" "%s" % e) self._view.error(_("Could not install the upgrades"), msg)
# installing the packages failed, can't be retried self._view.getTerminal().call(["dpkg","--configure","-a"]) self._rewriteAptPeriodic(self.apt_minAge) return False
except IOError, e:
# fetch failed, will be retried logging.error("IOError in cache.commit(): '%s'. Retrying (currentTry: %s)" % (e,currentRetry)) currentRetry += 1 continue
# no exception, so all was fine, we are done self._rewriteAptPeriodic(self.apt_minAge)
return True
I think this is a fundamental design problem that is going to take some serious rework if this is going to work on low memory systems. I hunted down were the memory is getting eaten up. It's in DistUpgradeCont roler.py. I added comments to the procedure below to show the fatal line. The bottom line is that the system is just trying to cache more than a machine with limited memory can hande. Someone who knows more about the what and the why of the cache will have to look and see if it can be slimmed down.
def doDistUpgrade( self):
currentRetry = 0 getFetchProgres s() getInstallProgr ess(self. cache) getint( "Network" ,"MaxRetries" ) commit( fprogress, iprogress)
logging. error(" SystemError from cache.commit(): %s" % e) pkg_failures == 0:
errormsg = "SystemError in cache.commit(): %s" % e
apport_ pkgfailure( "update- manager" , errormsg)
"could be in an unusable state. A recovery "
"will run now (dpkg --configure -a).")
msg += _("\n\nPlease report this bug against the 'update-manager' "
"package and include the files in /var/log/ dist-upgrade/ "
"in the bugreport.\n"
"%s" % e)
self. _view.error( _("Could not install the upgrades"), msg)
self. _view.getTermin al().call( ["dpkg" ,"--configure" ,"-a"])
self. _rewriteAptPeri odic(self. apt_minAge)
return False
logging. error(" IOError in cache.commit(): '%s'. Retrying (currentTry: %s)" % (e,currentRetry))
currentRetry += 1
continue
self. _rewriteAptPeri odic(self. apt_minAge)
# get the upgrade
fprogress = self._view.
iprogress = self._view.
# retry the fetching in case of errors
maxRetries = self.config.
while currentRetry < maxRetries:
try:
# THIS IS THE FATAL LINE:
res = self.cache.
# THE ONE ABOVE THIS ONE.
except SystemError, e:
# check if the installprogress catched a pkgfailure, if not, generate a fallback here
if iprogress.
# invoke the frontend now
msg = _("The upgrade aborts now. Your system "
if not run_apport():
# installing the packages failed, can't be retried
except IOError, e:
# fetch failed, will be retried
# no exception, so all was fine, we are done
return True