Skip to content

[9.18] Remove the contention when pruning RBTDB nodes

Ondřej Surý requested to merge 4596-regression-in-cache-cleaning-9.18 into bind-9.18

In #4383 (closed), we reported:

In some older BIND 9 branches, the extra queuing overhead eliminated by
this change could be remotely exploited to cause excessive memory use.
Due to architectural shift, this branch is not vulnerable to that issue,
but applying the fix to the latter is nevertheless deemed prudent for
consistency and to make the code future-proof.

The single queue for pruning the nodes increased the lock contention to the level where cleaning up nodes from the RBTDB would take too long and the memory that the cache was using would grow indefinitely.

This commit reverts the change to the pruning mechanism as the 9.18+ release was not affected by affor mentioned problem with queueing overhead.

Closes #4596 (closed)

Backport of !8765 (merged)

Edited by Ondřej Surý

Merge request reports