Public bug reported: Binary package hint: python-apt
This bug is related to: https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/107188 In researching possible causes of the memory leak exceptions reported by some users attempting to upgrade using the "upgrade-manager" tool, a possible infinite loop resulting in memory leakage was identified in the "commit()" method of the "Cache" class in "apt/cache.py". The method in question fetched and installed the required archives within a while loop, breaking from this loop only in the event of installArchives "ResultCompleted" or "ResultFailed". The intended function of this loop was assumed to be to attempt repeating the installation if installArchives returned a value of "ResultIncomplete". However, in some cases "ResultIncomplete" is returned due to an unmet condition of the installation, resulting in an infinite loop. A possible source of unmet conditions is a failure in fetching the archives to be installed; a situation not tested for within the loop. I am also submitting an experimental patch I used to resolve this issue on my machine. In the patch a check is added on the return value of _fetchArchives() before calling installArchives(), in an effort to stop the installation going forward without all pre-conditions being met. The fetching and installing of archives is removed from the loop, and a return value of "ResultIncomplete" causes a new type of system error to be raised. This was done because I believe it would be better to have the calling program make the decision to re-attempt installation rather than doing so automatically. The final change is just a response to the FIXME in the "markUpgrade()" function of "apt/package.py". As described in the above update-manager bug report, the failure of markUpgrade() to raise an exception caused unexpected behavior in the update-manager code. The patch was written for the python-apt-0.7.3.1ubuntu4 source version. ** Affects: python-apt (Ubuntu) Importance: Undecided Status: New -- Possible Infinite Loop in "commit()" Method https://bugs.launchpad.net/bugs/159638 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