race condition in route_connected() leads to crash on startup/shutdown
Summary
Assertion failure in route_connected()->in ns_interfacemgr_attach():
#6 0x00007f901a31bab8 in ns_interfacemgr_attach (source=0x7f9015294000, target=0x7f901677aaf8) at interfacemgr.c:418
418 REQUIRE(NS_INTERFACEMGR_VALID(source));
BIND version used
- Affects v9.19 : v9_19_2
- Affects v9.18 : v9_18_4
It seems that v9.16 is not affected, or at least is not easily reproducible. I was not able to crash it after 2000 iterations and has given up.
Steps to reproduce
Easiest reproducer so far is this Bash loop:
for I in $(seq 1 1000); do /tmp/main/sbin/named -g -c /dev/null -n1 2>&1 & sleep 0.0$RANDOM; pkill named; done
What is the current bug behavior?
Crash after couple hundred iterations.
What is the expected correct behavior?
Well, no crash :-)
Relevant configuration files
None, see -c /dev/null
.