Daemon is leaking requests
The server seems to be leaking requests since version 2.0. This is the graph of worker.stats().concurrent
between restarts:
This counter gets increment every time a new task gets created https://gitlab.labs.nic.cz/knot/knot-resolver/blob/master/daemon/worker.c#L690 and decremented every time it gets freed, so that doesn't right.
I managed to reproduce it:
- Compile from latest master, start with no special configuration:
/usr/local/sbin/kresd -a 127.0.0.1#5354 -k root.keys
- Run dnsperf with the sample query data from https://www.nominum.com/measurement-tools/ for some time (~ 125651 queries) and stop it
- Check
worker.stats()
in console, it should drain to zero over time, but it stays 5-20 concurrent queries forever
> worker.stats()
[rss] => 73400320
[pagefaults] => 5330
[concurrent_requests] => 18
[queries] => 125651
[systime] => 198.250469
[timeout] => 8186
[csw] => 151011
[swaps] => 0
[udp] => 156770
[dropped] => 0
[ipv6] => 50576
[concurrent] => 18
[tcp] => 1848
[ipv4] => 108042
[usertime] => 22.501294
(I added tracking of worker->stats.rconcurrent
just to make sure it's the same as worker->stats.concurrent
)
cc @anb @vendemiat