WARNING: ThreadSanitizer: data race
Read of size 4 at 0x000000000001 by thread T1 (mutexes: write M1):
#0 dns_zone_refresh lib/dns/zone.c:10447
#1 dns_zone_notifyreceive2 lib/dns/zone.c:13646
#2 dns_zone_notifyreceive2 lib/dns/zone.c:13497
#3 ns_notify_start bin/named/notify.c:150
#4 client_request bin/named/client.c:3137
#5 dispatch lib/isc/task.c:1157
#6 run lib/isc/task.c:1331
#7 <null> <null>
Previous write of size 4 at 0x000000000001 by thread T2 (mutexes: write M2):
#0 dns_zone_refresh lib/dns/zone.c:10466
#1 zone_maintenance lib/dns/zone.c:10236
#2 zone_timer lib/dns/zone.c:13136
#3 dispatch lib/isc/task.c:1157
#4 run lib/isc/task.c:1331
#5 <null> <null>
REQUIRE(DNS_ZONE_VALID(zone));
- if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_EXITING))
+ LOCK_ZONE(zone);
+ if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_EXITING)) {
+ UNLOCK_ZONE(zone);
return;
+ }
/*
* Set DNS_ZONEFLG_REFRESH so that there is only one refresh operation
* in progress at a time.
*/
- LOCK_ZONE(zone);
oldflags = zone->flags;
if (zone->masterscnt == 0) {
DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NOMASTERS);