possible memory leak in Hardy's squid
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
squid (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: squid
Description: Ubuntu hardy (development branch)
Release: 8.04
apt-cache policy squid
squid:
Installed: 2.6.18-1ubuntu3
Candidate: 2.6.18-1ubuntu3
Version table:
*** 2.6.18-1ubuntu3 0
500 http://
100 /var/lib/
When I run squid, the memory (RAM) cache of the system slowly creeps upward until almost all available memory is in the cache. I have watched this using the output of "free -m". However, when I restart the server, and then immediately stop squid "/etc/init.d/squid stop", the memory cache does not grow out of control like when squid is running.
This is a problem because the cache doesn't seem to clear itself out and my server has crashed several times when other processes needed to use that memory. I'm getting out of memory errors.
I'm not totally sure if squid is causing this problem, but it seems most likely as the memory cache does not grow when squid service is stopped.
I have more news on this bug. It is possibly a bug with Hardy in general and not with squid specifically.
I turned off squid and apache and let the machine just run (doing almost nothing). The cache did not appear to grow much at all, definitely not at the predictable rate it did when squid was turned on. However, after 16 hours the cache had grown to consume most of the memory even when not much was really running. The activity of squid was probably just making the memory problem happen more quickly.
This install of Hardy server is running on the most recently available Mac mini hardware.
Here's the output of "free -m":
total used free shared buffers cached
Mem: 979 915 64 0 69 778
-/+ buffers/cache: 67 912
Swap: 2870 0 2870
Here's the output of "ps aux"
<code>
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 2844 1692 ? Ss Apr11 0:01 /sbin/init
root 2 0.0 0.0 0 0 ? S< Apr11 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? S< Apr11 0:00 [migration/0]
root 4 0.0 0.0 0 0 ? S< Apr11 0:00 [ksoftirqd/0]
root 5 0.0 0.0 0 0 ? S< Apr11 0:00 [watchdog/0]
root 6 0.0 0.0 0 0 ? S< Apr11 0:00 [migration/1]
root 7 0.0 0.0 0 0 ? S< Apr11 0:00 [ksoftirqd/1]
root 8 0.0 0.0 0 0 ? S< Apr11 0:00 [watchdog/1]
root 9 0.0 0.0 0 0 ? S< Apr11 0:00 [events/0]
root 10 0.0 0.0 0 0 ? S< Apr11 0:00 [events/1]
root 11 0.0 0.0 0 0 ? S< Apr11 0:00 [khelper]
root 46 0.0 0.0 0 0 ? S< Apr11 0:00 [kblockd/0]
root 47 0.0 0.0 0 0 ? S< Apr11 0:00 [kblockd/1]
root 50 0.0 0.0 0 0 ? S< Apr11 0:00 [kacpid]
root 51 0.0 0.0 0 0 ? S< Apr11 0:00 [kacpi_notify]
root 122 0.0 0.0 0 0 ? S< Apr11 0:00 [kseriod]
root 164 0.0 0.0 0 0 ? S Apr11 0:00 [pdflush]
root 165 0.0 0.0 0 0 ? S Apr11 0:00 [pdflush]
root 166 0.0 0.0 0 0 ? S< Apr11 0:00 [kswapd0]
root 208 0.0 0.0 0 0 ? S< Apr11 0:00 [aio/0]
root 209 0.0 0.0 0 0 ? S< Apr11 0:00 [aio/1]
root 1397 0.0 0.0 0 0 ? S< Apr11 0:00 [ksuspend_usbd]
root 1398 0.0 0.0 0 0 ? S< Apr11 0:00 [khubd]
root 1466 0.0 0.0 0 0 ? S< Apr11 0:00 [khpsbpkt]
root 1521 0.0 0.0 0 0 ? S< Apr11 0:00 [ata/0]
root 1523 0.0 0.0 0 0 ? S< Apr11 0:00 [ata/1]
root 1525 0.0 0.0 0 0 ? S< Apr11 0:00 [ata_aux]
root 2199 0.0 0.0 0 0 ? S< Apr11 0:00 [knodemgrd_0]
root 2208 0.0 0.0 0 0 ? S< Apr11 0:00 [scsi_eh_0]
root 2209...