apt-cacher-ng leaks file descriptors: Too many open files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt-cacher-ng (Debian) |
Fix Released
|
Unknown
|
|||
apt-cacher-ng (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Lucid |
Won't Fix
|
High
|
Unassigned |
Bug Description
Binary package hint: apt-cacher-ng
Every time I do an "apt-get update" behind the apt-cacher-ng proxy (package version 0.4-1), the proxy seems to leak 6 file descriptors. At this rate it runs out of file descriptors pretty quickly and eventually fails to service connections. It doesn't, however, consume 100% CPU on my computer as described in the Debian bug.
At first apt-get starts printing HTTP errors like:
* 503 Cache storage error
* 503 Cache storage error while opening data file
* 500 Connection failure: Too many open files
and eventually just freezes up with "[Waiting for headers]"
apt-cacher was running fine for a week with ~10 servers, but now it keeps crashing repeatedly. After restarting it works fine until it hits the limit again. The cache server is running Ubuntu 9.10 Karmic inside a KVM virtual machine.
I tried with "apt-get update" from localhost (Karmic) and another Lucid machine, over both IPv4 and IPv6.
In /proc/PID/fd descriptors 5-1023 are all sockets. Netstat shows some connections to 127.0.0.1:3142 and to Ubuntu archives in various closing states.
I obtained the strace using:
sudo -u apt-cacher-ng strace -f apt-cacher-ng 2>apt-cacher-
while true; do apt-get update; done
Changed in apt-cacher-ng (Debian): | |
status: | Unknown → Fix Released |
Changed in apt-cacher-ng (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in apt-cacher-ng (Ubuntu Lucid): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in apt-cacher-ng (Ubuntu): | |
status: | Triaged → Fix Released |
The crash problem sounds like bug #532353, no idea how to solve that. The file handle leak might be solved in Debian version 0.4.7. You seem to be running amd64, try the test build from https:/ /www.unix- ag.uni- kl.de/~ bloch/acng/ ubuntu/ please.