Bug#530440: apt-cacher-ng: Thread leak due to race condition

2009-05-24 Thread Alexander Inyukhin
Package: apt-cacher-ng Version: 0.3.11-1 Severity: normal Hello I have noticed, that acng eats all available to a process virtual memory after some days of work, and it starts to return 503 to all requests. It spawns a lot of threads and keeps them running. The reason of this behavior is race

Bug#530440: apt-cacher-ng: Thread leak due to race condition

2009-05-24 Thread Eduard Bloch
#include hallo.h * Alexander Inyukhin [Mon, May 25 2009, 01:30:38AM]: I have noticed, that acng eats all available to a process virtual memory after some days of work, and it starts to return 503 to all requests. It spawns a lot of threads and keeps them running. How many exactly? (ps -L

Bug#530440: apt-cacher-ng: Thread leak due to race condition

2009-05-24 Thread Alexander Inyukhin
Thanks for quick answer. I was not quite right about locking. It still a race condition involving nSpareThreads, but more complicated. When variable decrements, is supposed that some thread will be awaked, but some other worker may return and take this job. In this case number on spare threads

Bug#530440: apt-cacher-ng: Thread leak due to race condition

2009-05-24 Thread Alexander Inyukhin
On Mon, May 25, 2009 at 01:38:41AM +0200, Eduard Bloch wrote: I have noticed, that acng eats all available to a process virtual memory after some days of work, and it starts to return 503 to all requests. It spawns a lot of threads and keeps them running. How many exactly? (ps -L ...)