Commit Graph
29182 Commits
Author SHA1 Message Date
Michal Nowak e56554052c Merge branch '2323-add-non-threaded-CI-jobs' into 'v9_11'
[v9_11] Add --disable-threads to noatomics build job in CI

See merge request isc-projects/bind9!4450
2021-01-13 17:25:15 +00:00
Michal Nowak b23215ed19 Add --disable-threads to noatomics build job in CI 2021-01-13 18:10:24 +01:00
Michał Kępień 876dda6398 Merge branch '2366-add-CHANGES-entry-v9_11' into 'v9_11'
[v9_11] Add CHANGES entry for GL #2366

See merge request isc-projects/bind9!4546
2021-01-08 11:54:11 +00:00
Michał Kępień f94cd65410 Add CHANGES entry for GL #2366
(cherry picked from commit 995b72d2b7)
2021-01-08 12:52:14 +01:00
Michal Nowak 5b607485df Merge branch 'mnowak/copyrights-2021' into 'v9_11'
Copyright update for 2021

See merge request isc-projects/bind9!4536
2021-01-07 14:55:01 +00:00
Michal Nowak 187fd98bca update for 2021 2021-01-06 16:55:54 +01:00
Mark Andrews f1f78f0a28 Merge branch '2366-bind-9-16-10-build-fails-with-libmaxminddb-1-4-3-v9_11' into 'v9_11'
Fix 'configure --with-maxminddb=<path>'

See merge request isc-projects/bind9!4534
2021-01-06 08:42:52 +00:00
Mark Andrews 773abc3c52 Fix 'configure --with-maxminddb=<path>'
(cherry picked from commit cafb021b2a)
2021-01-06 08:40:52 +00:00
Mark Andrews b177131a16 Merge branch '2355-incorrect-increment-of-inactive-in-rbtdb-c-maybe_free_rbtdb-v9_11' into 'v9_11'
Resolve "Incorrect increment of inactive in rbtdb.c:maybe_free_rbtdb()"

See merge request isc-projects/bind9!4533
2021-01-06 08:40:29 +00:00
Mark Andrews c9cb0ff921 Add release note
(cherry picked from commit 584e589d84)
2021-01-06 19:21:35 +11:00
Mark Andrews 9c89571282 Add CHANGES
(cherry picked from commit 65702896bd)
2021-01-06 19:19:39 +11:00
Mark Andrews 25150c15e7 Inactive incorrectly incremented
It is possible to have two threads destroying an rbtdb at the same
time when detachnode() executes and removes the last reference to
a node between exiting being set to true for the node and testing
if the references are zero in maybe_free_rbtdb().  Move NODE_UNLOCK()
to after checking if references is zero to prevent detachnode()
changing the reference count too early.

(cherry picked from commit 859d2fdad6)
2021-01-06 19:18:54 +11:00
Mark Andrews 576e48f7d5 Merge branch '2348-bin-tools-mdig-compile-link-failure-because-of-missing-isccfg-dependency-2' into 'v9_11'
Resolve "bin/tools/mdig: compile/link failure because of missing isccfg dependency"

See merge request isc-projects/bind9!4494
2020-12-21 01:38:22 +00:00
Mark Andrews 5cec1ba2fa Handle shared library platforms that don't support inter library dependancies 2020-12-21 01:10:00 +00:00
Mark Andrews d744db22f3 fix LIB0 for isc-hmac-fixup and named-nzd2nzf 2020-12-21 01:10:00 +00:00
Mark Andrews f63b2d8fbd update link order of libbind9 2020-12-21 01:10:00 +00:00
Michał Kępień 28d6c11f89 Merge branch 'v9_11_26-release' into 'v9_11'
Merge 9.11.26 release branch

See merge request isc-projects/bind9!4502
2020-12-16 21:39:40 +00:00
Michał Kępień f9f7f4a95f Set up release notes for BIND 9.11.27 2020-12-16 22:37:18 +01:00
Michał Kępień 65142b527e Bump BIND_BASELINE_VERSION for ABI checks 2020-12-16 22:37:18 +01:00
Tinderbox UserandMichał Kępień 94c269633c Merge branch 'prep-release' into v9_11_26-release 2020-12-16 22:32:08 +01:00
Michał Kępień 52e342ebcd Merge branch 'michal/prepare-release-notes-for-bind-9.11.26' into 'v9_11_26-release'
Prepare release notes for BIND 9.11.26

See merge request isc-private/bind9!226
2020-12-16 22:32:08 +01:00
Tinderbox UserandMichał Kępień 363a2c3e5e prep 9.11.26 2020-12-16 22:32:08 +01:00
Michał Kępień 85887a43b8 Prepare release notes for BIND 9.11.26 2020-12-16 22:32:08 +01:00
Michał Kępień 5575baf143 Reorder release notes 2020-12-16 22:32:08 +01:00
Michał Kępień f39197e714 Tweak and reword release notes 2020-12-16 22:32:08 +01:00
Michał Kępień fe90f08656 Tweak and reword recent CHANGES entries 2020-12-16 22:32:08 +01:00
Michal NowakandMichał Kępień 2d0c8c8135 Miscellaneous minor documentation updates 2020-12-16 22:32:08 +01:00
Mark Andrews 01c6715169 Merge branch 'marka-noatomic-v9_11' into 'v9_11'
Address TSAN errors when atomics are not available

See merge request isc-projects/bind9!4267
2020-12-10 22:24:25 +00:00
Mark Andrews 8780605bc0 Flush client before putting it on inactive
WARNING: ThreadSanitizer: data race
    Write of size 4 at 0x000000000001 by thread T1:
    #0 get_client bin/named/client.c:3928:16
    #1 ns_client_replace bin/named/client.c:3725:12
    #2 query_recurse bin/named/query.c:4366:13
    #3 query_find bin/named/query.c
    #4 ns_query_start bin/named/query.c:9716:8
    #5 client_request bin/named/client.c:3127:3
    #6 dispatch lib/isc/task.c:1157:7
    #7 run lib/isc/task.c:1331:2

    Previous write of size 4 at 0x000000000001 by thread T2:
    #0 exit_check bin/named/client.c:706:17
    #1 ns_client_detach bin/named/client.c:3702:8
    #2 query_resume bin/named/query.c:4186:3
    #3 dispatch lib/isc/task.c:1157:7
    #4 run lib/isc/task.c:1331:2
2020-12-10 06:31:20 +00:00
Mark Andrews 042e1e3a44 Lock check of DNS_ZONEFLG_EXITING flag
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>
2020-12-10 06:31:20 +00:00
Mark Andrews 7982767d4a Ignore TSAN errors with getcounter and setcounter
WARNING: ThreadSanitizer: data race
    Read of size 8 at 0x000000000001 by thread T1:
    #0 getcounter lib/isc/stats.c:289:15
    #1 isc_stats_update_if_greater lib/isc/stats.c:464:24
    #2 client_accept bin/named/client.c:3599:2
    #3 client_start bin/named/client.c:833:4
    #4 dispatch lib/isc/task.c:1157:7
    #5 run lib/isc/task.c:1331:2

    Previous write of size 8 at 0x000000000001 by thread T2:
    #0 setcounter lib/isc/stats.c:313:27
    #1 isc_stats_update_if_greater lib/isc/stats.c:466:3
    #2 client_accept bin/named/client.c:3599:2
    #3 client_start bin/named/client.c:833:4
    #4 dispatch lib/isc/task.c:1157:7
    #5 run lib/isc/task.c:1331:2
2020-12-10 06:31:19 +00:00
Mark Andrews 7382c3929a Ingore TSAN errors accessing 'last'
WARNING: ThreadSanitizer: data race
    Read of size 4 at 0x000000000001 by thread T1:
    #0 log_quota bin/named/query.c:4291:22
    #1 query_recurse bin/named/query.c:4346:4
    #2 query_find bin/named/query.c
    #3 ns_query_start bin/named/query.c:9716:8
    #4 client_request bin/named/client.c:3115:3
    #5 dispatch lib/isc/task.c:1157:7
    #6 run lib/isc/task.c:1331:2

    Previous write of size 4 at 0x000000000001 by thread T2:
    #0 last_cmpxchg bin/named/query.c:81:6
    #1 log_quota bin/named/query.c:4293:7
    #2 query_recurse bin/named/query.c:4346:4
    #3 query_find bin/named/query.c
    #4 ns_query_start bin/named/query.c:9716:8
    #5 client_request bin/named/client.c:3115:3
    #6 dispatch lib/isc/task.c:1157:7
    #7 run lib/isc/task.c:1331:2
2020-12-10 06:31:19 +00:00
Ondřej SurýandMark Andrews 761cedc2b4 Don't use rwlocks for reference counting
WARNING: ThreadSanitizer: data race
    Write of size 8 at 0x000000000001 by thread T1 (mutexes: write M1):
    #0 memset <null>
    #1 mem_put lib/isc/mem.c:819
    #2 isc___mem_free lib/isc/mem.c:1662
    #3 isc__mem_free lib/isc/mem.c:3078
    #4 isc___mem_putanddetach lib/isc/mem.c:1221
    #5 isc__mem_putanddetach lib/isc/mem.c:3033
    #6 destroyring lib/dns/tsig.c:494
    #7 dns_tsigkeyring_dumpanddetach lib/dns/tsig.c:665
    #8 destroy lib/dns/view.c:392
    #9 dns_view_weakdetach lib/dns/view.c:704
    #10 zone_free lib/dns/zone.c:1152
    #11 zone_shutdown lib/dns/zone.c:13123
    #12 dispatch lib/isc/task.c:1157
    #13 run lib/isc/task.c:1331
    #14 <null> <null>

    Previous atomic read of size 8 at 0x000000000001 by thread T2:
    #0 __tsan_atomic64_load <null>
    #1 isc_rwlock_unlock lib/isc/rwlock.c:612
    #2 dns_tsigkeyring_dumpanddetach lib/dns/tsig.c:632
    #3 destroy lib/dns/view.c:392
    #4 dns_view_weakdetach lib/dns/view.c:704
    #5 zone_free lib/dns/zone.c:1149
    #6 zone_shutdown lib/dns/zone.c:13123
    #7 dispatch lib/isc/task.c:1157
    #8 run lib/isc/task.c:1331
    #9 <null> <null>
2020-12-10 06:31:19 +00:00
Mark Andrews b86b3fe853 Ignore TSAN errors when accessing 'ns_client_requests' 2020-12-10 06:31:19 +00:00
Mark Andrews d85196cdca Ignore TSAN errors accessing init_count and header->count
WARNING: ThreadSanitizer: data race
    Write of size 4 at 0x000000000001 by thread T1 (mutexes: write M1):
    #0 subtractrdataset lib/dns/rbtdb.c:7065:21
    #1 dns_db_subtractrdataset lib/dns/db.c:807:10
    #2 diff_apply lib/dns/diff.c:377:14
    #3 dns_diff_apply lib/dns/diff.c:458:10
    #4 do_one_tuple lib/dns/zone.c:4103:11
    #5 update_one_rr lib/dns/zone.c:4132:10
    #6 keyfetch_done lib/dns/zone.c:9835:4
    #7 dispatch lib/isc/task.c:1157:7
    #8 run lib/isc/task.c:1331:2

    Previous write of size 4 at 0x000000000001 by thread T2 (mutexes: write M2):
    #0 addrdataset lib/dns/rbtdb.c:6869:21
    #1 dns_db_addrdataset lib/dns/db.c:783:10
    #2 addoptout lib/dns/ncache.c:264:10
    #3 dns_ncache_add lib/dns/ncache.c:101:10
    #4 ncache_adderesult lib/dns/resolver.c:5989:12
    #5 ncache_message lib/dns/resolver.c:6165:11
    #6 resquery_response lib/dns/resolver.c:8691:12
    #7 dispatch lib/isc/task.c:1157:7
    #8 run lib/isc/task.c:1331:2
2020-12-10 06:31:19 +00:00
Mark Andrews fdb893ede1 Address data race in dns_stats_detach over references
WARNING: ThreadSanitizer: data race
    Write of size 4 at 0x000000000001 by thread T1 (mutexes: write M1):
    #0 dns_stats_detach lib/dns/stats.c:115:19
    #1 destroy lib/dns/view.c:527:3
    #2 dns_view_weakdetach lib/dns/view.c:704:3
    #3 zone_free lib/dns/zone.c:1149:3
    #4 zone_shutdown lib/dns/zone.c:13123:3
    #5 dispatch lib/isc/task.c:1157:7
    #6 run lib/isc/task.c:1331:2

    Previous read of size 4 at 0x000000000001 by thread T2:
    #0 dns_stats_detach lib/dns/stats.c:118:13
    #1 destroy lib/dns/view.c:527:3
    #2 dns_view_weakdetach lib/dns/view.c:704:3
    #3 zone_free lib/dns/zone.c:1152:3
    #4 zone_shutdown lib/dns/zone.c:13123:3
    #5 dispatch lib/isc/task.c:1157:7
    #6 run lib/isc/task.c:1331:2
2020-12-10 06:31:19 +00:00
Mark Andrews e989ba66f0 Lock access to acache stats when not using atomics
WARNING: ThreadSanitizer: data race
    Write of size 4 at 0x000000000001 by thread T1 (mutexes: write M1):
    #0 dns_acache_getentry lib/dns/acache.c:1549:2
    #1 rdataset_getadditional lib/dns/rbtdb.c:9912:11
    #2 dns_rdataset_getadditional lib/dns/rdataset.c:711:11
    #3 query_addadditional2 bin/named/query.c:1991:11
    #4 additionaldata_ns lib/dns/./rdata/generic/ns_2.c:198:10
    #5 dns_rdata_additionaldata lib/dns/rdata.c:1246:2
    #6 dns_rdataset_additionaldata lib/dns/rdataset.c:629:12
    #7 query_addrdataset bin/named/query.c:2435:8
    #8 query_addrrset bin/named/query.c:2826:2
    #9 query_addbestns bin/named/query.c:3525:2
    #10 query_find bin/named/query.c:9204:4
    #11 query_resume bin/named/query.c:4188:12
    #12 dispatch lib/isc/task.c:1157:7
    #13 run lib/isc/task.c:1331:2

    Previous write of size 4 at 0x000000000001 by thread T2 (mutexes: write M2):
    #0 dns_acache_countquerymiss lib/dns/acache.c:1201:2
    #1 rdataset_getadditional lib/dns/rbtdb.c:9896:4
    #2 dns_rdataset_getadditional lib/dns/rdataset.c:711:11
    #3 query_addadditional2 bin/named/query.c:1991:11
    #4 additionaldata_ns lib/dns/./rdata/generic/ns_2.c:198:10
    #5 dns_rdata_additionaldata lib/dns/rdata.c:1246:2
    #6 dns_rdataset_additionaldata lib/dns/rdataset.c:629:12
    #7 query_addrdataset bin/named/query.c:2435:8
    #8 query_addrrset bin/named/query.c:2826:2
    #9 query_find bin/named/query.c:9176:4
    #10 query_resume bin/named/query.c:4188:12
    #11 dispatch lib/isc/task.c:1157:7
2020-12-10 06:31:19 +00:00
Mark Andrews d4a59f232e Ignore TSAN warnings in state_key_init - deliberate
WARNING: ThreadSanitizer: data race
    Write of size 1 at 0x000000000001 by thread T1 (mutexes: write M1, write M2):
    #0 state_key_init lib/dns/geoip2.c:150:5
    #1 get_entry_for lib/dns/geoip2.c:241:11
    #2 dns_geoip_match lib/dns/geoip2.c:410:10
    #3 dns_aclelement_match2 lib/dns/acl.c:493:11
    #4 dns_acl_match2 lib/dns/acl.c:298:7
    #5 allowed bin/named/client.c:1869:11
    #6 ns_client_isself bin/named/client.c:1934:7
    #7 notify_isself lib/dns/zone.c:11055:11
    #8 notify_send lib/dns/zone.c:11374:7
    #9 notify_find_address lib/dns/zone.c:11178:2
    #10 zone_notify lib/dns/zone.c:11616:3
    #11 zone_maintenance lib/dns/zone.c:10291:4
    #12 zone_timer lib/dns/zone.c:13136:2
    #13 dispatch lib/isc/task.c:1157:7
    #14 run lib/isc/task.c:1331:2

    Previous read of size 1 at 0x000000000001 by thread T2 (mutexes: write M3):
    #0 state_key_init lib/dns/geoip2.c:134:7
    #1 get_entry_for lib/dns/geoip2.c:241:11
    #2 dns_geoip_match lib/dns/geoip2.c:410:10
    #3 dns_aclelement_match2 lib/dns/acl.c:493:11
    #4 dns_acl_match2 lib/dns/acl.c:298:7
    #5 allowed bin/named/client.c:1869:11
    #6 ns_client_isself bin/named/client.c:1934:7
    #7 notify_isself lib/dns/zone.c:11055:11
    #8 notify_send lib/dns/zone.c:11374:7
    #9 notify_find_address lib/dns/zone.c:11178:2
    #10 zone_notify lib/dns/zone.c:11616:3
    #11 zone_maintenance lib/dns/zone.c:10291:4
    #12 zone_timer lib/dns/zone.c:13136:2
    #13 dispatch lib/isc/task.c:1157:7
    #14 run lib/isc/task.c:1331:2
2020-12-10 06:31:19 +00:00
Mark Andrews 5f6ab3512e Silence TSAN warning on spins in isc_rwlock_lock
WARNING: ThreadSanitizer: data race
    Write of size 4 at 0x000000000001 by thread T1:
    #0 isc_rwlock_lock lib/isc/rwlock.c:720:2
    #1 findnodeintree lib/dns/rbtdb.c:3060:2
    #2 findnsec3node lib/dns/rbtdb.c:3164:10
    #3 dns_db_findnsec3node lib/dns/db.c:528:10
    #4 diff_apply lib/dns/diff.c:318:5
    #5 dns_diff_applysilently lib/dns/diff.c:463:10
    #6 signname bin/dnssec/./dnssec-signzone.c:1118:11
    #7 sign bin/dnssec/./dnssec-signzone.c:1599:2
    #8 dispatch lib/isc/task.c:1157:7
    #9 run lib/isc/task.c:1331:2

    Previous read of size 4 at 0x000000000001 by thread T2:
    #0 isc_rwlock_lock lib/isc/rwlock.c:704:25
    #1 addrdataset lib/dns/rbtdb.c:6853:2
    #2 dns_db_addrdataset lib/dns/db.c:783:10
    #3 diff_apply lib/dns/diff.c:370:14
    #4 dns_diff_applysilently lib/dns/diff.c:463:10
    #5 signname bin/dnssec/./dnssec-signzone.c:1118:11
    #6 sign bin/dnssec/./dnssec-signzone.c:1599:2
    #7 dispatch lib/isc/task.c:1157:7
    #8 run lib/isc/task.c:1331:2
2020-12-10 06:31:19 +00:00
Mark Andrews a241c69920 Lock read of refs when atomics are not available.
WARNING: ThreadSanitizer: data race
    Read of size 4 at 0x000000000001 by thread T1 (mutexes: write M1):
    #0 zone_iattach lib/dns/zone.c:5412:2
    #1 soa_query lib/dns/zone.c:12725:2
    #2 dispatch lib/isc/task.c:1157:7
    #3 run lib/isc/task.c:1331:2

    Previous write of size 4 at 0x000000000001 by thread T2 (mutexes: write M2):
    #0 dns_zone_detach lib/dns/zone.c:5346:2
    #1 ns_server_refreshcommand bin/named/./server.c:9880:3
    #2 ns_control_docommand bin/named/control.c:247:12
    #3 control_recvmessage bin/named/controlconf.c:469:13
    #4 dispatch lib/isc/task.c:1157:7
    #5 run lib/isc/task.c:1331:2
2020-12-10 06:31:19 +00:00
Mark Andrews 1caef804d5 Ignore thread sanitizer warnings in stats counters
set ISC_NO_SANITIZE_THREAD for incrementcounter and decrementcounter

    WARNING: ThreadSanitizer: data race
    Write of size 8 at 0x000000000001 by thread T1:
    #0 decrementcounter lib/isc/stats.c:258:26
    #1 isc_stats_decrement lib/isc/stats.c:350:2
    #2 dec_stats lib/isc/unix/socket.c:934:3
    #3 socketclose lib/isc/unix/socket.c:2270:3
    #4 destroy lib/isc/unix/socket.c:2323:3
    #5 isc__socket_detach lib/isc/unix/socket.c:3275:3
    #6 isc_socket_detach lib/isc/unix/./../socket_api.c:128:3
    #7 exit_check bin/named/client.c:593:4
    #8 ns_client_next bin/named/client.c:947:8
    #9 client_request bin/named/client.c
    #10 dispatch lib/isc/task.c:1157:7
    #11 run lib/isc/task.c:1331:2

    Previous write of size 8 at 0x000000000001 by thread T2:
    #0 incrementcounter lib/isc/stats.c:239:26
    #1 isc_stats_increment lib/isc/stats.c:340:2
    #2 inc_stats lib/isc/unix/socket.c:923:3
    #3 internal_accept lib/isc/unix/socket.c:3741:4
    #4 dispatch lib/isc/task.c:1157:7
    #5 run lib/isc/task.c:1331:2
2020-12-10 06:31:19 +00:00
Mark Andrews 0e5a076cc1 Prevent inlining of code with thread sanitiser disabled 2020-12-10 06:31:19 +00:00
Mark Andrews c2676bccc5 Add TSAN builds and tests with --disable-atomics specified 2020-12-10 06:31:19 +00:00
Mark Andrews 1b47fbab11 Merge branch '2324-key_mutex-undeclared-in-geoip2-c-with-threads-disabled' into 'v9_11'
Resolve "'key_mutex' undeclared in geoip2.c with threads disabled"

See merge request isc-projects/bind9!4454
2020-12-10 03:10:04 +00:00
Mark Andrews d8047eeb94 Add CHANGES 2020-12-10 13:47:07 +11:00
Mark Andrews f3c402baed Only lock access to epoll_ctl when using watcher thread 2020-12-10 02:34:36 +00:00
Mark Andrews 7466b505b3 check result 2020-12-10 02:34:36 +00:00
Mark Andrews 136804b1a0 #ifdef protect key_mutex 2020-12-10 02:34:36 +00:00
Ondřej Surý 89a74d0b01 Merge branch 'ondrej/clang-format-11-v9_11' into 'v9_11'
Bump the clang version to 11 (v9.11)

See merge request isc-projects/bind9!4481
2020-12-08 19:09:22 +00:00
Ondřej Surý e39899a718 Bump the clang version to 11 (stable) 2020-12-08 19:41:48 +01:00