ISC_MEM_TRACKLINES is accidentally quadratic, was Re: support for large batch jobs with mdig

Tony Finch dot at
Mon Jan 23 19:34:13 UTC 2017

Tony Finch <dot at> wrote:
> If I give mdig more than a few hundred thousand queries it seems to hang
> at the end of the job. On further investigation, there is something
> accidentally quadratic in the cleanup code!

This accidentally quadratic performance is to do with ISC_MEM_TRACKLINES -
turn that off and freeing is instant! But it needs a fix...

 lib/dns/openssl_link.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/dns/openssl_link.c b/lib/dns/openssl_link.c
index 29facf3..4e0976e 100644
--- a/lib/dns/openssl_link.c
+++ b/lib/dns/openssl_link.c
@@ -122,10 +122,17 @@ id_callback(void) {

-#define FLARG_PASS      , __FILE__, __LINE__
 #define FLARG
 #define FILELINE
+#define FLARG_PASS      , __FILE__, __LINE__
+#define FLARG_PASS
 #define FLARG           , const char *file, int line
 #define FILELINE	, __FILE__, __LINE__

More information about the bind-workers mailing list