Public bug reported:

Apt-cacher keeps a list of the pids of any children it forks/spawns.  At
shutdown, it terminates them all with SIGTERM.  Unfortunately, it
doesn't catch SIGCHLD and remove a normal finished child from the list.
So after it's been running for a while, that list of PIDs will be fairly
long and rather comprehensive (on one recent server where I noticed it,
the list had 25000 unique PIDs, i.e. about 3/4s of the available PID
space :)).

The only mitigating factor is that apt-cacher runs as www-data by
default, although that doesn't help if you're running it on the same
server as apache2, nginx or some other www-data running process.

Patch attached fixes this; it uses a hash instead of an array, and traps
SIGCHLD to catch when children finish.  Seems to work ok in a short time
running it here.

** Affects: apt-cacher (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug lucid

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

Title:
  apt-cacher has poor childpid management

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

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

Reply via email to