<div dir="ltr">Hi Alex,<div><br></div><div>I have attached a log with about 24 hours of memory stats from our squid proxy running version 5.3. The memory usage increased during the first 11-12 hours of the log and then flatted out. The same pattern repeats itself each day with about an additional 2-3G being used up. Let me know if you need any additional logs. I will take another shot at the test setup with Valgrind later on. Happy holidays!</div><div><br></div><div><a href="https://bugs.squid-cache.org/show_bug.cgi?id=5132">https://bugs.squid-cache.org/show_bug.cgi?id=5132</a><br></div><div><br></div><div>Thanks</div><div>Praveen</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 23, 2021 at 6:23 AM Alex Rousskov <<a href="mailto:rousskov@measurement-factory.com">rousskov@measurement-factory.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 12/23/21 1:58 AM, Praveen Ponakanti wrote:<br>
> On Wed, Dec 22, 2021 at 6:45 AM Alex Rousskov wrote:<br>
> <br>
>     On 12/21/21 7:48 PM, Praveen Ponakanti wrote:<br>
> <br>
>     > We are running the squid proxy for servicing outbound HTTP quests from<br>
>     > our network and have observed a significant memory leak with 5.x<br>
>     > versions. While there are several discussions about memory leaks with<br>
>     > recent versions, just wanted to list out what we have observed in case<br>
>     > this is an unknown leak.<br>
> <br>
>     I recommend sharing a log with 48+ hourly mgr:mem snapshots. These<br>
>     snapshots help compare your leak with others we know about and may help<br>
>     isolate some of the memory leaks:<br>
>     <a href="https://bugs.squid-cache.org/show_bug.cgi?id=5132#c8" rel="noreferrer" target="_blank">https://bugs.squid-cache.org/show_bug.cgi?id=5132#c8</a><br>
<br>
> I will continue collecting these stats hourly.<br>
<br>
I will analyze those logs once you share them. Comparing two snapshots<br>
from different Squid versions/instances may be useful, but it is much<br>
more time consuming, and I cannot offer to do that right now.<br>
<br>
<br>
> The output appears to be quite large<br>
<br>
> ... where do I send the files with the memory logs?<br>
<br>
The scripts that track memory usage changes across hourly snapshots do<br>
not care about the log size. However, you may want to share a link to<br>
the (compressed) log rather than sharing the log itself. The best place<br>
to share that info, IMO, is the bug report I referenced above, but you<br>
can post here, of course.<br>
<br>
<br>
> I might have to fix how it is launched from<br>
> the docker entrypoint script in my test env. <br>
<br>
FWIW, here is one of the valgrind commands I use (with paths stripped):<br>
<br>
> valgrind -v --trace-children=no --child-silent-after-fork=yes --num-callers=50 --log-file=valgrind-%p.log --time-stamp=yes --leak-check=full --leak-resolution=high --show-reachable=no --track-origins=no --gen-suppressions=all --suppressions=valgrind.supp squid -f squid.conf ...<br>
<br>
Valgrind reports useful leak info after Squid exits.<br>
<br>
I do not have updated/polished Valgrind suppressions, but I can share<br>
what I use:<br>
<a href="https://gist.github.com/rousskov/a1f503981b4a3832ab44221b0b615b5a" rel="noreferrer" target="_blank">https://gist.github.com/rousskov/a1f503981b4a3832ab44221b0b615b5a</a><br>
<br>
I do not use gdb/valgrind monitor so I cannot help you there.<br>
<br>
<br>
HTH,<br>
<br>
Alex.<br>
</blockquote></div>