Re: [PATCH] Fix memory freeing at exit

From: Willy Tarreau <w#1wt.eu>
Date: Fri, 30 May 2008 07:08:43 +0200


On Fri, May 30, 2008 at 12:00:06AM +0200, Krzysztof Oledzki wrote:
> >From 4983c53d3e3be3916fab484b3d0dd36b609b95db Mon Sep 17 00:00:00 2001
> From: Krzysztof Piotr Oledzki <ole#ans.pl>
> Date: Thu, 29 May 2008 23:53:44 +0200
> Subject: [MEDIUM] Fix memory freeing at exit
>
> New functions implemented:
> - deinit_pollers: called at the end of deinit())
> - prune_acl: called via list_for_each_entry_safe
>
> Add missing pool_destroy2 calls:
> - p->hdr_idx_pool
> - pool2_tree64
>
> Implement all task stopping:
> - health-check: needs new "struct task" in the struct server
> - queue processing: queue_mgt
> - appsess_refresh: appsession_refresh
>
> before (idle system):
> ==6079== LEAK SUMMARY:
> ==6079== definitely lost: 1,112 bytes in 75 blocks.
> ==6079== indirectly lost: 53,356 bytes in 2,090 blocks.
> ==6079== possibly lost: 52 bytes in 1 blocks.
> ==6079== still reachable: 150,996 bytes in 504 blocks.
> ==6079== suppressed: 0 bytes in 0 blocks.
>
> after (idle system):
> ==6945== LEAK SUMMARY:
> ==6945== definitely lost: 7,644 bytes in 137 blocks.
> ==6945== indirectly lost: 9,913 bytes in 587 blocks.
> ==6945== possibly lost: 0 bytes in 0 blocks.
> ==6945== still reachable: 0 bytes in 0 blocks.
> ==6945== suppressed: 0 bytes in 0 blocks.
>
> before (running system for ~2m):
> ==9343== LEAK SUMMARY:
> ==9343== definitely lost: 1,112 bytes in 75 blocks.
> ==9343== indirectly lost: 54,199 bytes in 2,122 blocks.
> ==9343== possibly lost: 52 bytes in 1 blocks.
> ==9343== still reachable: 151,128 bytes in 509 blocks.
> ==9343== suppressed: 0 bytes in 0 blocks.
>
> after (running system for ~2m):
> ==11616== LEAK SUMMARY:
> ==11616== definitely lost: 7,644 bytes in 137 blocks.
> ==11616== indirectly lost: 9,981 bytes in 591 blocks.
> ==11616== possibly lost: 0 bytes in 0 blocks.
> ==11616== still reachable: 4 bytes in 1 blocks.
> ==11616== suppressed: 0 bytes in 0 blocks.
>
> Still not perfect but significant improvement.

That's fine, I've merged it too. BTW, it's good that you added a task for the checks, as it is something we will need sooner or later when we want to implement scripts for health-checks.

Thanks!
Willy Received on 2008/05/30 07:08

This archive was generated by hypermail 2.2.0 : 2008/05/30 07:16 CEST