In message , Tony Finch writes: > Tony Finch 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! Remove "isc_mem_debugging = ISC_MEM_DEBUGRECORD;" from the start of main in mdig.c. It got left in from developement. The flag is very good at reporting what memory is leaking but it isn't the fastest code. mdig needs dig's preparse args to set isc_mem_debugging. Mark > 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) { > #endif > > #if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) > -#define FLARG_PASS , __FILE__, __LINE__ > + > #define FLARG > #define FILELINE > +#if ISC_MEM_TRACKLINES > +#define FLARG_PASS , __FILE__, __LINE__ > #else > +#define FLARG_PASS > +#endif > + > +#else > + > #define FLARG , const char *file, int line > #define FILELINE , __FILE__, __LINE__ > #if ISC_MEM_TRACKLINES > -- > 2.10.1.445.g3cdd5d1 > > _______________________________________________ > bind-workers mailing list > bind-workers@lists.isc.org > https://lists.isc.org/mailman/listinfo/bind-workers -- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: marka@isc.org