Mark Andrews
05cb799274
Take complete ownership or *keyp before calling tsigkey_free.
2020-09-08 09:25:43 +10:00
Mark Andrews
8b80f40993
Take complete ownership of *aclp before calling destroy.
2020-09-08 09:25:43 +10:00
Mark Andrews
bf0bac4068
isc_refcount_current should be memory_order_acquire
2020-09-08 09:25:43 +10:00
Mark Andrews
fffcfe8acc
To read locknum we need to obtain the lock identified by locknum
...
this is a catch 22. make dns_rbtnode_t:locknum independent
2020-09-08 09:25:43 +10:00
Mark Andrews
deb3bf845b
Address tsan error in view:destroy()
2020-09-08 09:25:43 +10:00
Mark Andrews
e17a750221
move resolver->spillat* under renamed spill_lock
2020-09-08 09:25:43 +10:00
Mark Andrews
52a715b122
isc_mutex_init_errcheck prototype should not be under ISC_MUTEX_PROFILE
2020-09-08 09:25:43 +10:00
Mark Andrews
054dc48a1f
Only read dns_master_indent and dns_master_indentstr in named
...
The old code was not thread safe w.r.t. to the use of these variable.
We now only set them at the start of execution and copy them to
the message structure so they can be safely updated. This is the
minimal change to make them thread safe.
2020-09-08 09:25:43 +10:00
Mark Andrews
00d315046b
Defer read of zl->server and zl->reconfig until
...
the reference counter has gone to zero and there is
nolonger a possibility of changes in other threads.
2020-09-08 09:25:43 +10:00
Mark Andrews
1f7ccaba1b
Prevent loads_pending going to zero while kicking the loads.
2020-09-08 09:25:43 +10:00
Mark Andrews
a26d0c5ef3
Access ns_client_requests atomically
2020-09-08 09:25:43 +10:00
Mark Andrews
16e7e27328
Address data races between socket bitfields
...
* address data race between sock->pending_recv and sock->connected
* address data race between sock->bound and sock->pending_recv
==================
WARNING: ThreadSanitizer: data race (pid=1985)
Read of size 2 at 0x7b54000c07c0 by thread T6:
#0 isc__socket_sendto /builds/isc-projects/bind9/lib/isc/unix/socket.c:5291:2 (libisc.so.1107+0x65a00)
#1 isc__socket_send /builds/isc-projects/bind9/lib/isc/unix/socket.c:5270:10 (libisc.so.1107+0x65944)
#2 isc_socket_send /builds/isc-projects/bind9/lib/isc/unix/./../socket_api.c:329:10 (libisc.so.1107+0x6b3c9)
#3 sendstream /builds/isc-projects/bind9/bin/named/xfrout.c:1548:3 (named+0x555038)
#4 ns_xfr_start /builds/isc-projects/bind9/bin/named/xfrout.c:1132:2 (named+0x553147)
#5 ns_query_start /builds/isc-projects/bind9/bin/named/query.c:9572:4 (named+0x4f3329)
#6 client_request /builds/isc-projects/bind9/bin/named/client.c:3115:3 (named+0x4de6af)
#7 dispatch /builds/isc-projects/bind9/lib/isc/task.c:1157:7 (libisc.so.1107+0x50845)
#8 run /builds/isc-projects/bind9/lib/isc/task.c:1331:2 (libisc.so.1107+0x4d799)
Previous write of size 2 at 0x7b54000c07c0 by thread T14 (mutexes: write M57, write M855819529908651432):
#0 dispatch_recv /builds/isc-projects/bind9/lib/isc/unix/socket.c:3353:21 (libisc.so.1107+0x6c601)
#1 process_fd /builds/isc-projects/bind9/lib/isc/unix/socket.c:4048:5 (libisc.so.1107+0x6c1be)
#2 process_fds /builds/isc-projects/bind9/lib/isc/unix/socket.c:4161:3 (libisc.so.1107+0x6bfc0)
#3 watcher /builds/isc-projects/bind9/lib/isc/unix/socket.c:4407:10 (libisc.so.1107+0x64398)
2020-09-08 09:25:43 +10:00
Mark Andrews
bcfbc17384
Lock access to ctx->blocked as it is updated by multiple threads
2020-09-08 09:25:43 +10:00
Mark Andrews
5659c64359
Merge branch '2120-the-dynamic-load-flags-are-inconsistent-with-thread-analysis-v9_11' into 'v9_11'
...
Resolve "The dynamic load flags are inconsistent with thread analysis"
See merge request isc-projects/bind9!4097
2020-09-07 23:10:32 +00:00
Mark Andrews
690f557b09
Don't run dyndb and dlzexternal if running TSAN as
...
the dlopen flags being used are incompatible with TSAN.
(cherry picked from commit 86316ed29d )
2020-09-08 08:46:14 +10:00
Mark Andrews
b66b5a096c
alphabetize tests/usage
...
(cherry picked from commit bbece7389e )
2020-09-08 08:43:45 +10:00
Michal Nowak
072b8c7e09
Merge branch 'mnowak/gcov-fix-No-such-file-or-directory-lib_dns_atomic.h' into 'v9_11'
...
Copy atomic.h where gcov expects it
See merge request isc-projects/bind9!4086
2020-09-03 10:54:04 +00:00
Michal Nowak
1af880e1e1
Copy atomic.h where gcov expects it
...
gcov started to fail after isc-projects/bind9!3991 when generating HTML
report with:
Traceback (most recent call last):
File "/usr/bin/gcovr", line 11, in <module>
load_entry_point('gcovr==4.1', 'console_scripts', 'gcovr')()
File "/usr/lib/python3/dist-packages/gcovr/__main__.py", line 588, in main
print_html_report(covdata, options)
File "/usr/lib/python3/dist-packages/gcovr/html_generator.py", line 275, in print_html_report
errors='replace')
FileNotFoundError: [Errno 2] No such file or directory: 'lib/dns/atomic.h'
The solution is to copy arch-specific isc/atomic.h where gcov expect it.
2020-09-03 12:19:32 +02:00
Mark Andrews
ff0f07b66d
Merge branch 'marka-check-deny-name-with-grant-subdomain-v9_11' into 'v9_11'
...
Check 'deny name' + 'grant subdomain' for the same name
See merge request isc-projects/bind9!4083
2020-09-03 07:16:55 +00:00
Mark Andrews
b1c36e7818
Check 'deny name' + 'grant subdomain' for the same name
...
(cherry picked from commit a402ffbced )
2020-09-03 16:22:54 +10:00
Mark Andrews
8779f4fb15
Merge branch '2115-the-load-of-huge-zone-can-take-over-100-secs-when-running-under-a-sanitiser-v9_11' into 'v9_11'
...
Increase zone load timeout in the "rndc" test
See merge request isc-projects/bind9!4077
2020-09-02 22:22:43 +00:00
Mark Andrews
b2c93102de
Increase zone load timeout in the "rndc" test
...
The "huge.zone" zone can take longer than 100 seconds to load when
running under a sanitizer. Increase the relevant zone load timeout to
prevent intermittent failures of the "rndc" system test.
(cherry picked from commit fd08918df5 )
2020-09-03 07:15:54 +10:00
Michał Kępień
0518cdabcf
Merge branch 'michal/update-postal-mail-address-in-the-arm' into 'v9_11'
...
Update postal mail address in the ARM
See merge request isc-projects/bind9!4072
2020-09-02 16:33:00 +00:00
Michał Kępień
be37b11157
Update postal mail address in the ARM
...
Ensure ISC's postal mail address present on the second page of the PDF
version of the BIND ARM is up to date.
2020-09-02 18:12:16 +02:00
Mark Andrews
edc0752944
Merge branch '2054-dig-bufsize-0-sets-bufsize-to-4096-v9_11' into 'v9_11'
...
dig +bufsize=0 failed to disable EDNS as a side effect.
See merge request isc-projects/bind9!4066
2020-09-02 11:55:25 +00:00
Mark Andrews
46dc1c34f9
dig +bufsize=0 failed to disable EDNS as a side effect.
...
(cherry picked from commit 0dc04cb901 )
2020-09-02 20:47:19 +10:00
Mark Andrews
571d3418ff
Merge branch '2083-9-11-zt_test-data-race' into 'v9_11'
...
Resolve "9.11 zt_test data race"
See merge request isc-projects/bind9!3991
2020-09-02 10:08:06 +00:00
Mark Andrews
ca0c1e5b4b
Update 'init_count' atomically to silence tsan errors.
2020-09-02 09:35:43 +00:00
Mark Andrews
d8fa989c29
Lock access to flags in dns__zone_loadpending
...
==================
WARNING: ThreadSanitizer: data race (pid=1938)
Read of size 4 at 0x7b7800000dd4 by main thread:
#0 dns__zone_loadpending /builds/isc-projects/bind9/lib/dns/zone.c:2308:10 (libdns.so.1110+0x1da342)
#1 asyncload_zone /builds/isc-projects/bind9/lib/dns/tests/zt_test.c:204:9 (zt_test+0x4b8303)
#2 <null> <null> (libcmocka.so.0+0x50d8)
#3 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16 (libc.so.6+0x2409a)
Previous write of size 4 at 0x7b7800000dd4 by thread T16 (mutexes: write M2181):
#0 zone_asyncload /builds/isc-projects/bind9/lib/dns/zone.c:2237:3 (libdns.so.1110+0x1da08d)
#1 dispatch /builds/isc-projects/bind9/lib/isc/task.c:1157:7 (libisc.so.1107+0x50845)
#2 run /builds/isc-projects/bind9/lib/isc/task.c:1331:2 (libisc.so.1107+0x4d799)
2020-09-02 09:35:43 +00:00
Mark Andrews
d45f53c2cd
Address data race over 'done' in zt_test
...
==================
WARNING: ThreadSanitizer: data race (pid=697)
Read of size 1 at 0x7ffcf51dd2b7 by main thread:
#0 asyncload_zone /builds/isc-projects/bind9/lib/dns/tests/zt_test.c:206:2 (zt_test+0x4b835f)
#1 <null> <null> (libcmocka.so.0+0x50d8)
#2 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16 (libc.so.6+0x2409a)
Previous write of size 1 at 0x7ffcf51dd2b7 by thread T15:
#0 load_done /builds/isc-projects/bind9/lib/dns/tests/zt_test.c:89:8 (zt_test+0x4b8d99)
#1 zone_asyncload /builds/isc-projects/bind9/lib/dns/zone.c:2243:3 (libdns.so.1110+0x1da0f6)
#2 dispatch /builds/isc-projects/bind9/lib/isc/task.c:1157:7 (libisc.so.1107+0x50845)
#3 run /builds/isc-projects/bind9/lib/isc/task.c:1331:2 (libisc.so.1107+0x4d799)
2020-09-02 09:35:43 +00:00
Mark Andrews
b70cd0ff09
Merge branch '2087-v9_11-task_test-tsan-errors' into 'v9_11'
...
Resolve "v9_11 task_test tsan errors"
See merge request isc-projects/bind9!3995
2020-09-02 09:34:37 +00:00
Mark Andrews
5cc2806cea
Add locking to address tsan errors.
...
Address data races with 'a', 'b', 'c', 'd', 'e', 'counter', 'done',
'nevents', 'nsdevents', 'all_done', and 'eventcnt'.
Add isc_mutex_init/isc_mutex_destroy.
2020-09-02 08:43:42 +00:00
Ondřej Surý
0b2b02520e
Merge branch '2037-deferred-system-test-fix-v9_11' into 'v9_11'
...
Fix the new pkcs11 and tcp test [v9.11]
See merge request isc-projects/bind9!4051
2020-09-02 07:44:33 +00:00
Mark Andrews and Ondřej Surý
c237ca4d43
Dump the returned packet
2020-09-02 08:54:40 +02:00
Ondřej Surý
36ec930560
Add -r <repeats> option to packet.pl
...
For some tests, we need to send big data streams (for TCP) or repeated
packets (for UDP), this commits adds `-r` option to packet.pl that sends
the same input <repeats> times using the specified protocol.
(cherry picked from commit dd46559a19 )
2020-09-02 08:54:40 +02:00
Ondřej Surý
abae6c0f95
Properly format 2037-pk11_numbits-crash-test.pkt file
...
(cherry picked from commit 22e0272063 )
2020-09-02 08:54:40 +02:00
Mark Andrews
10b19f8b1f
Merge branch '2084-9-11-data-race-in-dispatch_test' into 'v9_11'
...
Resolve "9.11 data race in dispatch_test"
See merge request isc-projects/bind9!3992
2020-09-02 03:42:57 +00:00
Mark Andrews
9b66341971
Lock access when updating/reading manager->epoll_events[fd]
...
WARNING: ThreadSanitizer: data race (pid=110)
Write of size 4 at 0x7ba400014050 by main thread (mutexes: write M1100, write M75):
#0 socket_create /builds/isc-projects/bind9/lib/isc/unix/socket.c:3012:34 (libisc.so.1105+0x6085c)
#1 isc__socket_create /builds/isc-projects/bind9/lib/isc/unix/socket.c:3044:10 (libisc.so.1105+0x60583)
#2 isc_socket_create /builds/isc-projects/bind9/lib/isc/unix/./../socket_api.c:105:11 (libisc.so.1105+0x6a4a0)
#3 open_socket /builds/isc-projects/bind9/lib/dns/dispatch.c:1708:12 (libdns.so.1110+0x7491c)
#4 get_udpsocket /builds/isc-projects/bind9/lib/dns/dispatch.c:2904:13 (libdns.so.1110+0x745ec)
#5 dispatch_createudp /builds/isc-projects/bind9/lib/dns/dispatch.c:2994:12 (libdns.so.1110+0x6e159)
#6 dns_dispatch_getudp_dup /builds/isc-projects/bind9/lib/dns/dispatch.c:2823:11 (libdns.so.1110+0x6d8f2)
#7 dns_dispatch_getudp /builds/isc-projects/bind9/lib/dns/dispatch.c:2849:10 (libdns.so.1110+0x6e99e)
#8 make_dispatchset /builds/isc-projects/bind9/lib/dns/tests/dispatch_test.c:81:11 (dispatch_test+0x4ba8fc)
#9 dispatchset_create /builds/isc-projects/bind9/lib/dns/tests/dispatch_test.c:115:11 (dispatch_test+0x4b9f99)
#10 <null> <null> (libcmocka.so.0+0x50d8)
#11 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16 (libc.so.6+0x2409a)
Previous write of size 4 at 0x7ba400014050 by thread T14:
#0 unwatch_fd /builds/isc-projects/bind9/lib/isc/unix/socket.c (libisc.so.1105+0x6b913)
#1 wakeup_socket /builds/isc-projects/bind9/lib/isc/unix/socket.c:1128:9 (libisc.so.1105+0x701fc)
#2 process_ctlfd /builds/isc-projects/bind9/lib/isc/unix/socket.c:4253:3 (libisc.so.1105+0x6c048)
#3 process_fds /builds/isc-projects/bind9/lib/isc/unix/socket.c:4157:10 (libisc.so.1105+0x6bcb4)
#4 watcher /builds/isc-projects/bind9/lib/isc/unix/socket.c:4396:10 (libisc.so.1105+0x64188)
Location is heap block of size 16385 at 0x7ba400014000 allocated by main thread:
#0 malloc <null> (dispatch_test+0x42b7c4)
#1 internal_memalloc /builds/isc-projects/bind9/lib/isc/mem.c:887:8 (libisc.so.1105+0x37e38)
#2 mem_get /builds/isc-projects/bind9/lib/isc/mem.c:792:8 (libisc.so.1105+0x32c2c)
#3 isc___mem_get /builds/isc-projects/bind9/lib/isc/mem.c:1310:9 (libisc.so.1105+0x325d7)
#4 isc__mem_get /builds/isc-projects/bind9/lib/isc/mem.c:3012:11 (libisc.so.1105+0x34f80)
#5 isc__socketmgr_create2 /builds/isc-projects/bind9/lib/isc/unix/socket.c:4704:26 (libisc.so.1105+0x6379a)
#6 isc__socketmgr_create /builds/isc-projects/bind9/lib/isc/unix/socket.c:4652:10 (libisc.so.1105+0x635f2)
#7 isc_socketmgr_create /builds/isc-projects/bind9/lib/isc/unix/./../socket_api.c:74:11 (libisc.so.1105+0x6a2c7)
#8 create_managers /builds/isc-projects/bind9/lib/dns/tests/dnstest.c:120:2 (dispatch_test+0x4bb28a)
#9 dns_test_begin /builds/isc-projects/bind9/lib/dns/tests/dnstest.c:192:3 (dispatch_test+0x4bb182)
#10 _setup /builds/isc-projects/bind9/lib/dns/tests/dispatch_test.c:53:11 (dispatch_test+0x4b9ff8)
#11 <null> <null> (libcmocka.so.0+0x51e2)
#12 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16 (libc.so.6+0x2409a)
Mutex M1100 (0x7b5000000230) created at:
#0 pthread_mutex_init <null> (dispatch_test+0x42e60d)
#1 isc__mutex_init /builds/isc-projects/bind9/lib/isc/pthreads/mutex.c:287:8 (libisc.so.1105+0x72377)
#2 dns_dispatchmgr_create /builds/isc-projects/bind9/lib/dns/dispatch.c:1778:11 (libdns.so.1110+0x6a055)
#3 make_dispatchset /builds/isc-projects/bind9/lib/dns/tests/dispatch_test.c:75:11 (dispatch_test+0x4ba883)
#4 dispatchset_create /builds/isc-projects/bind9/lib/dns/tests/dispatch_test.c:115:11 (dispatch_test+0x4b9f99)
#5 <null> <null> (libcmocka.so.0+0x50d8)
#6 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16 (libc.so.6+0x2409a)
Mutex M75 (0x7bb800000320) created at:
#0 pthread_mutex_init <null> (dispatch_test+0x42e60d)
#1 isc__mutex_init /builds/isc-projects/bind9/lib/isc/pthreads/mutex.c:287:8 (libisc.so.1105+0x72377)
#2 isc__socketmgr_create2 /builds/isc-projects/bind9/lib/isc/unix/socket.c:4729:12 (libisc.so.1105+0x63914)
#3 isc__socketmgr_create /builds/isc-projects/bind9/lib/isc/unix/socket.c:4652:10 (libisc.so.1105+0x635f2)
#4 isc_socketmgr_create /builds/isc-projects/bind9/lib/isc/unix/./../socket_api.c:74:11 (libisc.so.1105+0x6a2c7)
#5 create_managers /builds/isc-projects/bind9/lib/dns/tests/dnstest.c:120:2 (dispatch_test+0x4bb28a)
#6 dns_test_begin /builds/isc-projects/bind9/lib/dns/tests/dnstest.c:192:3 (dispatch_test+0x4bb182)
#7 _setup /builds/isc-projects/bind9/lib/dns/tests/dispatch_test.c:53:11 (dispatch_test+0x4b9ff8)
#8 <null> <null> (libcmocka.so.0+0x51e2)
#9 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16 (libc.so.6+0x2409a)
Thread T14 'isc-socket' (tid=150, running) created by main thread at:
#0 pthread_create <null> (dispatch_test+0x42d08b)
#1 isc_thread_create /builds/isc-projects/bind9/lib/isc/pthreads/thread.c:60:8 (libisc.so.1105+0x724e8)
#2 isc__socketmgr_create2 /builds/isc-projects/bind9/lib/isc/unix/socket.c:4788:6 (libisc.so.1105+0x63cc6)
#3 isc__socketmgr_create /builds/isc-projects/bind9/lib/isc/unix/socket.c:4652:10 (libisc.so.1105+0x635f2)
#4 isc_socketmgr_create /builds/isc-projects/bind9/lib/isc/unix/./../socket_api.c:74:11 (libisc.so.1105+0x6a2c7)
#5 create_managers /builds/isc-projects/bind9/lib/dns/tests/dnstest.c:120:2 (dispatch_test+0x4bb28a)
#6 dns_test_begin /builds/isc-projects/bind9/lib/dns/tests/dnstest.c:192:3 (dispatch_test+0x4bb182)
#7 _setup /builds/isc-projects/bind9/lib/dns/tests/dispatch_test.c:53:11 (dispatch_test+0x4b9ff8)
#8 <null> <null> (libcmocka.so.0+0x51e2)
#9 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16 (libc.so.6+0x2409a)
SUMMARY: ThreadSanitizer: data race /builds/isc-projects/bind9/lib/isc/unix/socket.c:3012:34 in socket_create
2020-09-02 03:07:03 +00:00
Mark Andrews
d9a2cccc97
Lock on msg == SELECT_POKE_CLOSE as it triggers a tsan error
...
WARNING: ThreadSanitizer: data race (pid=1941)
Write of size 4 at 0x7ba40000f050 by main thread (mutexes: write M1100, write M75):
#0 socket_create /builds/isc-projects/bind9/1126G:3009:29 (libisc.so.1105+0x60822)
#1 isc__socket_create /builds/isc-projects/bind9/lib/isc/unix/socket.c:3043:10 (libisc.so.1105+0x60583)
#2 isc_socket_create /builds/isc-projects/bind9/lib/isc/unix/./../socket_api.c:105:11 (libisc.so.1105+0x6a4a0)
#3 open_socket /builds/isc-projects/bind9/lib/dns/dispatch.c:1708:12 (libdns.so.1110+0x7491c)
#4 get_udpsocket /builds/isc-projects/bind9/lib/dns/dispatch.c:2904:13 (libdns.so.1110+0x745ec)
#5 dispatch_createudp /builds/isc-projects/bind9/lib/dns/dispatch.c:2994:12 (libdns.so.1110+0x6e159)
#6 dns_dispatch_getudp_dup /builds/isc-projects/bind9/lib/dns/dispatch.c:2823:11 (libdns.so.1110+0x6d8f2)
#7 dns_dispatch_getudp /builds/isc-projects/bind9/lib/dns/dispatch.c:2849:10 (libdns.so.1110+0x6e99e)
#8 make_dispatchset /builds/isc-projects/bind9/lib/dns/tests/dispatch_test.c:81:11 (dispatch_test+0x4ba8fc)
#9 dispatchset_create /builds/isc-projects/bind9/lib/dns/tests/dispatch_test.c:115:11 (dispatch_test+0x4b9f99)
#10 <null> <null> (libcmocka.so.0+0x50d8)
#11 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16 (libc.so.6+0x2409a)
Previous write of size 4 at 0x7ba40000f050 by thread T14:
#0 wakeup_socket /builds/isc-projects/bind9/lib/isc/unix/socket.c:1126:24 (libisc.so.1105+0x70181)
#1 process_ctlfd /builds/isc-projects/bind9/lib/isc/unix/socket.c:4252:3 (libisc.so.1105+0x6c048)
#2 process_fds /builds/isc-projects/bind9/lib/isc/unix/socket.c:4156:10 (libisc.so.1105+0x6bcb4)
#3 watcher /builds/isc-projects/bind9/lib/isc/unix/socket.c:4395:10 (libisc.so.1105+0x64188)
Location is heap block of size 16385 at 0x7ba40000f000 allocated by main thread:
#0 malloc <null> (dispatch_test+0x42b7c4)
#1 internal_memalloc /builds/isc-projects/bind9/lib/isc/mem.c:887:8 (libisc.so.1105+0x37e38)
#2 mem_get /builds/isc-projects/bind9/lib/isc/mem.c:792:8 (libisc.so.1105+0x32c2c)
#3 isc___mem_get /builds/isc-projects/bind9/lib/isc/mem.c:1310:9 (libisc.so.1105+0x325d7)
#4 isc__mem_get /builds/isc-projects/bind9/lib/isc/mem.c:3012:11 (libisc.so.1105+0x34f80)
#5 isc__socketmgr_create2 /builds/isc-projects/bind9/lib/isc/unix/socket.c:4697:21 (libisc.so.1105+0x6374f)
#6 isc__socketmgr_create /builds/isc-projects/bind9/lib/isc/unix/socket.c:4651:10 (libisc.so.1105+0x635f2)
#7 isc_socketmgr_create /builds/isc-projects/bind9/lib/isc/unix/./../socket_api.c:74:11 (libisc.so.1105+0x6a2c7)
#8 create_managers /builds/isc-projects/bind9/lib/dns/tests/dnstest.c:120:2 (dispatch_test+0x4bb28a)
#9 dns_test_begin /builds/isc-projects/bind9/lib/dns/tests/dnstest.c:192:3 (dispatch_test+0x4bb182)
#10 _setup /builds/isc-projects/bind9/lib/dns/tests/dispatch_test.c:53:11 (dispatch_test+0x4b9ff8)
#11 <null> <null> (libcmocka.so.0+0x51e2)
#12 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16 (libc.so.6+0x2409a)
Mutex M1100 (0x7b5000000230) created at:
#0 pthread_mutex_init <null> (dispatch_test+0x42e60d)
#1 isc__mutex_init /builds/isc-projects/bind9/lib/isc/pthreads/mutex.c:287:8 (libisc.so.1105+0x72317)
#2 dns_dispatchmgr_create /builds/isc-projects/bind9/lib/dns/dispatch.c:1778:11 (libdns.so.1110+0x6a055)
#3 make_dispatchset /builds/isc-projects/bind9/lib/dns/tests/dispatch_test.c:75:11 (dispatch_test+0x4ba883)
#4 dispatchset_create /builds/isc-projects/bind9/lib/dns/tests/dispatch_test.c:115:11 (dispatch_test+0x4b9f99)
#5 <null> <null> (libcmocka.so.0+0x50d8)
#6 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16 (libc.so.6+0x2409a)
Mutex M75 (0x7bb800000320) created at:
#0 pthread_mutex_init <null> (dispatch_test+0x42e60d)
#1 isc__mutex_init /builds/isc-projects/bind9/lib/isc/pthreads/mutex.c:287:8 (libisc.so.1105+0x72317)
#2 isc__socketmgr_create2 /builds/isc-projects/bind9/lib/isc/unix/socket.c:4728:12 (libisc.so.1105+0x63914)
#3 isc__socketmgr_create /builds/isc-projects/bind9/lib/isc/unix/socket.c:4651:10 (libisc.so.1105+0x635f2)
#4 isc_socketmgr_create /builds/isc-projects/bind9/lib/isc/unix/./../socket_api.c:74:11 (libisc.so.1105+0x6a2c7)
#5 create_managers /builds/isc-projects/bind9/lib/dns/tests/dnstest.c:120:2 (dispatch_test+0x4bb28a)
#6 dns_test_begin /builds/isc-projects/bind9/lib/dns/tests/dnstest.c:192:3 (dispatch_test+0x4bb182)
#7 _setup /builds/isc-projects/bind9/lib/dns/tests/dispatch_test.c:53:11 (dispatch_test+0x4b9ff8)
#8 <null> <null> (libcmocka.so.0+0x51e2)
#9 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16 (libc.so.6+0x2409a)
Thread T14 'isc-socket' (tid=1969, running) created by main thread at:
#0 pthread_create <null> (dispatch_test+0x42d08b)
#1 isc_thread_create /builds/isc-projects/bind9/lib/isc/pthreads/thread.c:60:8 (libisc.so.1105+0x72488)
#2 isc__socketmgr_create2 /builds/isc-projects/bind9/lib/isc/unix/socket.c:4787:6 (libisc.so.1105+0x63cc6)
#3 isc__socketmgr_create /builds/isc-projects/bind9/lib/isc/unix/socket.c:4651:10 (libisc.so.1105+0x635f2)
#4 isc_socketmgr_create /builds/isc-projects/bind9/lib/isc/unix/./../socket_api.c:74:11 (libisc.so.1105+0x6a2c7)
#5 create_managers /builds/isc-projects/bind9/lib/dns/tests/dnstest.c:120:2 (dispatch_test+0x4bb28a)
#6 dns_test_begin /builds/isc-projects/bind9/lib/dns/tests/dnstest.c:192:3 (dispatch_test+0x4bb182)
#7 _setup /builds/isc-projects/bind9/lib/dns/tests/dispatch_test.c:53:11 (dispatch_test+0x4b9ff8)
#8 <null> <null> (libcmocka.so.0+0x51e2)
#9 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16 (libc.so.6+0x2409a)
SUMMARY: ThreadSanitizer: data race /builds/isc-projects/bind9/lib/isc/unix/socket.c:3009:29 in socket_create
2020-09-02 03:07:03 +00:00
Mark Andrews
54e35ae174
Destroy the mutex
2020-09-02 03:07:03 +00:00
Mark Andrews
338aea8447
Lock 'responses' before reading it
...
WARNING: ThreadSanitizer: data race
Read of size 4 at 0x000000000001 by main thread:
#0 dispatch_getnext lib/dns/tests/dispatch_test.c:327
#1 <null> <null>
#2 __libc_start_main ../csu/libc-start.c:308
Previous write of size 4 at 0x000000000001 by thread T1 (mutexes: write M1):
#0 response lib/dns/tests/dispatch_test.c:234
#1 dispatch lib/isc/task.c:1157
#2 run lib/isc/task.c:1331
#3 <null> <null>
Location is global 'responses' of size 4 at 0x000000000001
Mutex M1 (0x000000000009) created at:
#0 pthread_mutex_init <null>
#1 isc__mutex_init lib/isc/pthreads/mutex.c:287
#2 dispatch_getnext lib/dns/tests/dispatch_test.c:273
#3 <null> <null>
#4 __libc_start_main ../csu/libc-start.c:308
Thread T1 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:60
#2 isc__taskmgr_create lib/isc/task.c:1468
#3 isc_taskmgr_create lib/isc/task.c:2109
#4 create_managers lib/dns/tests/dnstest.c:118
#5 dns_test_begin lib/dns/tests/dnstest.c:192
#6 _setup lib/dns/tests/dispatch_test.c:53
#7 <null> <null>
#8 __libc_start_main ../csu/libc-start.c:308
SUMMARY: ThreadSanitizer: data race lib/dns/tests/dispatch_test.c:327 in dispatch_getnext
2020-09-02 03:07:03 +00:00
Mark Andrews
d8de7340ab
Merge branch '2081-data-race-in-zonemgr_test-v9_11' into 'v9_11'
...
Resolve "data race in zonemgr_test"
See merge request isc-projects/bind9!4057
2020-09-02 02:30:52 +00:00
Mark Andrews
5c73320075
Add CHANGES note
...
(cherry picked from commit ca1b0f1539 )
2020-09-02 11:47:58 +10:00
Mark Andrews
a7da8f84ca
isc_ratelimiter needs to hold a reference to its task
...
to prevent the task subsystem shutting down before the
ratelimiter is freed.
(cherry picked from commit b8e4b6d303 )
2020-09-02 11:47:37 +10:00
Mark Andrews
1446e11985
Merge branch '2085-9-11-socket_test-tsan-errors' into 'v9_11'
...
Resolve "9.11 socket_test tsan errors"
See merge request isc-projects/bind9!3993
2020-09-02 01:01:30 +00:00
Mark Andrews
310004d8ac
Add locking to socket_test to silence tsan reports.
...
There where data races accessing completion.
2020-09-02 00:25:56 +00:00
Mark Andrews
28185bdcf3
Merge branch '2049-cleanup-sock-v9_11' into 'v9_11'
...
remove unused variable sock
See merge request isc-projects/bind9!4053
2020-09-01 23:36:22 +00:00
Mark Andrews
c9f7d7c05f
remove unused variable sock
...
(cherry picked from commit b1c424ddf3 )
2020-09-02 09:00:22 +10:00
Mark Andrews
8f28b38979
Merge branch '2086-v9_11-timer_test-tsan-errors' into 'v9_11'
...
Resolve "v9_11 timer_test tsan errors"
See merge request isc-projects/bind9!3994
2020-09-01 22:51:53 +00:00
Mark Andrews
8094b821b3
Lock access to 'eventcnt' in timer_test.
...
There was a data race accessing 'eventcnt'.
2020-09-01 22:15:23 +00:00