bind9/lib
Diego Fronza aab691d512 Fix ns_statscounter_recursclients underflow
The basic scenario for the problem was that in the process of
resolving a query, if any rrset was eligible for prefetching, then it
would trigger a call to query_prefetch(), this call would run in
parallel to the normal query processing.

The problem arises due to the fact that both query_prefetch(), and,
in the original thread, a call to ns_query_recurse(), try to attach
to the recursionquota, but recursing client stats counter is only
incremented if ns_query_recurse() attachs to it first.

Conversely, if fetch_callback() is called before prefetch_done(),
it would not only detach from recursionquota, but also decrement
the stats counter, if query_prefetch() attached to te quota first
that would result in a decrement not matched by an increment, as
expected.

To solve this issue an atomic bool was added, it is set once in
ns_query_recurse(), allowing fetch_callback() to check for it
and decrement stats accordingly.

For a more compreensive explanation check the thread comment below:
https://gitlab.isc.org/isc-projects/bind9/-/issues/1719#note_145857
2020-07-13 11:46:18 -03:00
..
bind9 prevent "primaries" lists from having duplicate names 2020-07-01 11:11:34 -07:00
dns Assert tsigout is non-NULL 2020-07-13 02:26:06 +00:00
irs Update library API versions 2020-06-18 10:03:05 +02:00
isc Add changes for [GL #1989] 2020-07-13 13:10:45 +10:00
isccc Update library API versions 2020-06-18 10:03:05 +02:00
isccfg add "primary-only" as a synonym for "master-only" 2020-07-01 11:11:34 -07:00
ns Fix ns_statscounter_recursclients underflow 2020-07-13 11:46:18 -03:00
samples Move the dependencies from sln to vcxproj files 2020-05-28 08:08:30 +02:00
win32/bindevt Move the dependencies from sln to vcxproj files 2020-05-28 08:08:30 +02:00
.gitignore Provide unit test driver 2020-05-21 12:13:01 +02:00
Makefile.am Complete rewrite the BIND 9 build system 2020-04-21 14:19:48 +02:00
unit-test-driver.sh.in Provide unit test driver 2020-05-21 12:13:01 +02:00