[Bug 1178943] Re: /etc/cron.daily/apt is holding memory while "sleep"

Jérôme 1178943 at bugs.launchpad.net
Sun May 19 11:53:36 UTC 2013


I propose the attached patch.

In short :
- /etc/cron.daily/apt is moved to /usr/lib/apt/maintenance.sh and I removed the random_sleep function
- /etc/cron.daily/apt request to "at" to launch /usr/lib/apt/maintenance.sh after a random delay

There is another benefit : we are checking for battery operation only
once.

The package will require a dependency to "at".

** Patch added: "changes in /etc/cron.daily/apt and new /usr/lib/apt/maintenance.sh"
   https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1178943/+attachment/3680845/+files/apt-delayed-maintenance.diff

** Changed in: apt (Ubuntu)
       Status: Invalid => New

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

Title:
  /etc/cron.daily/apt is holding memory while "sleep"

Status in “apt” package in Ubuntu:
  New

Bug description:
  The "random_sleep" function is calling "sleep". Thus the memory used
  by anacron, the /etc/cron.daily/apt script is frozen for minutes when
  the "random_sleep" blocks until the "sleep" program completes.

  Maybe an implementation of a delayed system call back would save
  memory. For example the script could register a call-back with "at"
  utility instead of using sleep.

  I think this problem is important, especially during a few minutes
  after the system startup. The desktop has to be responsive while many
  desktop tasks are temporarily using more memory for initialization
  during the first hour.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: apt 0.8.16~exp12ubuntu10.10
  ProcVersionSignature: Ubuntu 3.2.0-41.66-generic 3.2.42
  Uname: Linux 3.2.0-41-generic i686
  ApportVersion: 2.0.1-0ubuntu17.2
  Architecture: i386
  Date: Sat May 11 11:00:38 2013
  InstallationMedia: Xubuntu 12.04.2 LTS "Precise Pangolin" - Release i386 (20130213)
  MarkForUpload: True
  ProcEnviron:
   LANGUAGE=fr:en
   TERM=xterm
   PATH=(custom, no user)
   LANG=fr_FR.UTF-8
   SHELL=/bin/bash
  SourcePackage: apt
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1178943/+subscriptions




More information about the foundations-bugs mailing list