From: Vladimír Čunát Date: Mon, 11 Apr 2022 10:14:50 +0000 (+0200) Subject: daemon/zimport: close transaction after importing batch X-Git-Tag: v5.5.1~19^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69535e09732473fdffcdbc65cef7bc0525b39346;p=thirdparty%2Fknot-resolver.git daemon/zimport: close transaction after importing batch I'm really sorry about this. It's my regression in 5.5.0 (!1225) Practical consequence was that the RW transaction was held open until that instance did something with cache (and thus closed), so any other instance would be frozen in the meantime if doing anything non-read-only with cache (e.g. startup). https://lists.nic.cz/hyperkitty/list/knot-resolver-users@lists.nic.cz/thread/6DOXXOA6ACEUBVYPUY3T2MLGIHWOMV6M/ --- diff --git a/NEWS b/NEWS index 4c42d5940..5de0829f1 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ Bugfixes -------- - modules/dns64: fix incorrect packet writes for cached packets (#727, !1275) - xdp: make it work also with libknot 3.1 (#735, !1276) +- prefill module: fix lockup when starting multiple idle instances (!1285) Knot Resolver 5.5.0 (2022-03-15) diff --git a/daemon/zimport.c b/daemon/zimport.c index 6bea6811f..a523a64f9 100644 --- a/daemon/zimport.c +++ b/daemon/zimport.c @@ -426,6 +426,7 @@ static void zi_zone_process(uv_timer_t *timer) kr_timer_start(&stopwatch); int ret = trie_apply(z_import->rrsets, zi_rrset_import, z_import); + (void)kr_cache_commit(&the_worker->engine->resolver.cache); // RW transaction open if (ret == 0) { kr_log_info(PREFILL, "performance: validating and caching took %.3lf s\n", kr_timer_elapsed(&stopwatch));