BIND issueshttps://gitlab.isc.org/isc-projects/bind9/-/issues2022-04-28T19:13:15Zhttps://gitlab.isc.org/isc-projects/bind9/-/issues/1631kasp system test failed (bad number of keys)2022-04-28T19:13:15ZMichał Kępieńkasp system test failed (bad number of keys)https://gitlab.isc.org/isc-projects/bind9/-/jobs/700050
```
I:kasp:check number of keys with algorithm 5 for zone legacy-keys.kasp in dir ns3 (56)
I:kasp:error: bad number (2) of key files for zone legacy-keys.kasp (expected 3)
I:kasp:f...https://gitlab.isc.org/isc-projects/bind9/-/jobs/700050
```
I:kasp:check number of keys with algorithm 5 for zone legacy-keys.kasp in dir ns3 (56)
I:kasp:error: bad number (2) of key files for zone legacy-keys.kasp (expected 3)
I:kasp:failed
I:kasp:check key 24906
I:kasp:check key 38941
I:kasp:error: No KEY2 found for zone legacy-keys.kasp
I:kasp:failed
I:kasp:check DNSKEY rrset is signed correctly for zone legacy-keys.kasp (57)
I:kasp:check SOA rrset is signed correctly for zone legacy-keys.kasp (58)
I:kasp:error: SOA RRset not signed with key no
I:kasp:failed
I:kasp:check CDS and CDNSKEY rrset are signed correctly for zone legacy-keys.kasp (59)
I:kasp:check A a.legacy-keys.kasp rrset is signed correctly for zone legacy-keys.kasp (60)
I:kasp:error: A RRset not signed with key no
I:kasp:failed
```BIND 9.17 Backburnerhttps://gitlab.isc.org/isc-projects/bind9/-/issues/1618Update Windows instructions for building with GeoIP support2021-10-05T11:00:11ZMichał KępieńUpdate Windows instructions for building with GeoIP supportThe GeoIP section of `win32utils/build.txt` is outdated and needs to be revised to reflect the current state of things:
```
Step 5: Download and build GeoIP
Geographic ("geoip") ACLs require libGeoIP. If you wish to build BIND 9
wi...The GeoIP section of `win32utils/build.txt` is outdated and needs to be revised to reflect the current state of things:
```
Step 5: Download and build GeoIP
Geographic ("geoip") ACLs require libGeoIP. If you wish to build BIND 9
without support for this feature, skip to step 6.
The libGeoIP source code is available from:
https://github.com/maxmind/geoip-api-c/releases.
As of this writing, the current version of libGeoIP is 1.6.0. There
is a known bug in this and all prior versions which prevents it from
building a suitable DLL with thread support on Windows. You can apply
the patch file bind9/win32utils/GeoIP.diff to address the problem.
This patch has been submitted upstream, and will be included in
future versions of libGeoIP.
```BIND 9.17 Backburnerhttps://gitlab.isc.org/isc-projects/bind9/-/issues/1617Remove dnssec-keymgr2021-10-05T11:00:01ZOndřej SurýRemove dnssec-keymgrThe `dnssec-keymgr` has been obsoleted by `dnssec-policy` in BIND 9.16. Remove it from the next development release. We should probably also add a warning to 9.16.x at some point, so people can migrate. I don't really want to maintain...The `dnssec-keymgr` has been obsoleted by `dnssec-policy` in BIND 9.16. Remove it from the next development release. We should probably also add a warning to 9.16.x at some point, so people can migrate. I don't really want to maintain `dnssec-keymgr` for next 6+ years.BIND 9.17 BackburnerOndřej SurýOndřej Surýhttps://gitlab.isc.org/isc-projects/bind9/-/issues/1604named assertion failed in mem.c2021-10-05T08:43:59ZMichal Nowaknamed assertion failed in mem.cI have a FreeBSD 12.1 under KVM (6 vCPU, 8 G RAM), where I am able to trigger core dump of `named` by running system test under a tight loop (e.g. `while true; do make -j6 -k test V=1; done`) and press-and-hold `Ctrl-C` until everything ...I have a FreeBSD 12.1 under KVM (6 vCPU, 8 G RAM), where I am able to trigger core dump of `named` by running system test under a tight loop (e.g. `while true; do make -j6 -k test V=1; done`) and press-and-hold `Ctrl-C` until everything eventually gets terminated. The test from which `named` originated varies but all the `named` backtraces are the same:
Here's the backtrace:
```
Core was generated by `/usr/home/newman/bind9/bin/named/.libs/named -D case-ns1 -X named.lock -m record'.
Program terminated with signal SIGABRT, Aborted.
#0 0x0000000800e0845a in thr_kill () from /lib/libc.so.7
[Current thread is 1 (LWP 102024)]
(gdb) bt
#0 0x0000000800e0845a in thr_kill () from /lib/libc.so.7
#1 0x0000000800e06844 in raise () from /lib/libc.so.7
#2 0x0000000800d79079 in abort () from /lib/libc.so.7
#3 0x00000000002309e5 in assertion_failed (file=0x8006dc1d7 "mem.c", line=2371, type=<optimized out>, cond=0x8006d29a5 "((mctx) != ((void *)0) && (mctx)->magic == (('A') << 24 | ('m') << 16 | ('c') << 8 | ('x')))") at ./main.c:261
#4 0x000000080070333a in isc_assertion_failed (file=0x18e88 <error: Cannot access memory at address 0x18e88>, line=6, type=isc_assertiontype_require, cond=0x800e0847a <thr_self+10> "\017\202\224\064") at assertions.c:48
#5 0x0000000800711dc5 in isc__mem_put (mctx=<optimized out>, ptr=<optimized out>, size=<optimized out>, file=<optimized out>, line=0) at mem.c:2371
#6 0x00000008002cb3b5 in ns_clientmgr_create (mctx=0x8011a8000, sctx=0x801911bd0, taskmgr=0x801901bd0, timermgr=0x801903bd0, interface=0x802a0a010, managerp=0x802a0a518) at client.c:2496
#7 0x00000008002d02b2 in ns_interface_create (mgr=0x801b7f010, addr=<optimized out>, name=0x7fffdf3f7960 "lo0", ifpret=0x7fffdf3f76f0) at interfacemgr.c:426
#8 0x00000008002cfb86 in ns_interface_setup (mgr=0x801b7f010, addr=0x6, name=0x0, ifpret=0x7fffdf3f7bf0, accept_tcp=true, dscp=-1, addr_in_use=0x7fffdf3f7c16) at interfacemgr.c:511
#9 0x00000008002cf8da in do_scan (mgr=<optimized out>, ext_listen=<optimized out>, verbose=<optimized out>) at interfacemgr.c:1081
#10 0x00000008002cea33 in ns_interfacemgr_scan0 (mgr=0x801b7f010, ext_listen=0x0, verbose=<optimized out>) at interfacemgr.c:1141
#11 0x00000008002ce9d9 in ns_interfacemgr_scan (mgr=0x801b7f010, verbose=false) at interfacemgr.c:1188
#12 0x000000000023ea9f in load_configuration (filename=<optimized out>, server=0x801906bd0, first_time=<optimized out>) at ./server.c:8638
#13 0x0000000000233815 in run_server (task=<optimized out>, event=0x0) at ./server.c:9580
#14 0x0000000800727329 in dispatch (manager=0x801901bd0, threadid=<optimized out>) at task.c:1150
#15 0x00000008007254af in run (queuep=<optimized out>) at task.c:1340
#16 0x0000000800c32776 in ?? () from /lib/libthr.so.3
#17 0x0000000000000000 in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffdf3f8000
```
BIND (7fae1ef12b8adffa223d3d11cd241454e42d96d9) was configured with `CC=clang CFLAGS="-fno-omit-frame-pointer -fno-optimize-sibling-calls -O1 -g -Wall -Wextra" ./configure --disable-maintainer-mode --enable-developer --with-libtool --disable-static --with-cmocka --with-libxml2 --with-json-c --prefix=$HOME/.local --without-make-clean`.
A more detailed backtrace attached: [gdb.case-ns1.out](/uploads/0d42822aad52c3a8308d3f68e2e31771/gdb.case-ns1.out).BIND 9.17 Backburnerhttps://gitlab.isc.org/isc-projects/bind9/-/issues/1580ydump.py using deprecated call.2021-10-05T07:46:01ZMark Andrewsydump.py using deprecated call.The following is emitted by the dnstap system test.
```
I:dnstap:checking dnstap-read YAML output
ydump.py:26: YAMLLoadWarning: calling yaml.load_all() without Loader=... is deprecated, as the default Loader is unsafe. Please read https...The following is emitted by the dnstap system test.
```
I:dnstap:checking dnstap-read YAML output
ydump.py:26: YAMLLoadWarning: calling yaml.load_all() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
pprint.pprint([l for l in yaml.load_all(f.stdout)])
```BIND 9.17 Backburnerhttps://gitlab.isc.org/isc-projects/bind9/-/issues/1568"inline" system test fails intermittently2020-01-21T14:23:44ZMichał Kępień"inline" system test fails intermittently - https://gitlab.isc.org/isc-private/bind9/-/jobs/571680
- https://gitlab.isc.org/isc-projects/bind9/-/jobs/574812
I believe this is caused by a missing call to `nextpart()` before a [call to `wait_for_log()`][1], which causes the l... - https://gitlab.isc.org/isc-private/bind9/-/jobs/571680
- https://gitlab.isc.org/isc-projects/bind9/-/jobs/574812
I believe this is caused by a missing call to `nextpart()` before a [call to `wait_for_log()`][1], which causes the latter to match the `all zones loaded` line for the *previous* `named` instance, effectively becoming a no-op (the `wait_for_log()` call in question is supposed to prevent invoking `rndc zonestatus` before all zones are loaded):
```
$ grep -E "(halt|zonestatus|all zones loaded)" bin/tests/system/inline/ns3/named.run
...
16-Jan-2020 15:45:52.765 received control channel command 'halt'
16-Jan-2020 15:45:54.007 all zones loaded
16-Jan-2020 15:45:54.045 received control channel command 'halt'
16-Jan-2020 15:45:55.295 received control channel command 'zonestatus delayedkeys'
16-Jan-2020 15:45:55.307 all zones loaded
```
[1]: https://gitlab.isc.org/isc-projects/bind9/blob/9c5547b1185a7b780554145ce28368d53ebe621f/bin/tests/system/inline/tests.sh#L1359BIND 9.17 Backburnerhttps://gitlab.isc.org/isc-projects/bind9/-/issues/1554CDS / CDNSKEY consistency checks don't work with deletion records2020-01-30T14:47:00ZMark AndrewsCDS / CDNSKEY consistency checks don't work with deletion recordsBIND 9.17 Backburnerhttps://gitlab.isc.org/isc-projects/bind9/-/issues/1519Handle uv_listen errors properly in childlisten_read_cb2021-10-05T07:15:43ZWitold KrecickiHandle uv_listen errors properly in childlisten_read_cbBIND 9.17 Backburnerhttps://gitlab.isc.org/isc-projects/bind9/-/issues/1514pkcs11-destroy dumps core when wrong PIN is used2021-10-05T07:14:44ZMichal Nowakpkcs11-destroy dumps core when wrong PIN is usedThe PIN is set to `1234` but when I set the slot and label to correct values, but PIN to a wrong one, I get abort:
```
root@e07d99029738:~/bind9# gdb /root/bind9/bin/pkcs11/pkcs11-destroy
GNU gdb (Debian 8.3.1-1) 8.3.1
...
This GDB was...The PIN is set to `1234` but when I set the slot and label to correct values, but PIN to a wrong one, I get abort:
```
root@e07d99029738:~/bind9# gdb /root/bind9/bin/pkcs11/pkcs11-destroy
GNU gdb (Debian 8.3.1-1) 8.3.1
...
This GDB was configured as "x86_64-linux-gnu".
...
Reading symbols from /root/bind9/bin/pkcs11/pkcs11-destroy...
(gdb) set args -s 1604939466 -l softhsm2 -p 1
(gdb) start
Temporary breakpoint 1 at 0x5470: file pkcs11-destroy.c, line 84.
Starting program: /root/bind9/bin/pkcs11/pkcs11-destroy -s 1604939466 -l softhsm2 -p 1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Temporary breakpoint 1, main (argc=7, argv=0x7fffffffec18) at pkcs11-destroy.c:84
84 CK_ATTRIBUTE search_template[] = {
(gdb) c
Continuing.
pk11.c:442: fatal error: pkcs_C_Login: Error = 0x000000A0
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) thread apply all bt full
Thread 1 (Thread 0x7ffff59e32c0 (LWP 19145)):
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
set = {__val = {0, 6731770221030783915, 0, 0, 0, 0, 93824992530064, 140737313896445, 140737314140848, 93824992546288, 72, 72, 93824992540192, 93823577358337, 93824992541680, 8064899351085853440}}
pid = <optimized out>
tid = <optimized out>
ret = <optimized out>
#1 0x00007ffff794c535 in __GI_abort () at abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x7ffff7ae1703 <_IO_2_1_stderr_+131>, sa_sigaction = 0x7ffff7ae1703 <_IO_2_1_stderr_+131>}, sa_mask = {__val = {140737348773216, 3432, 140737347469334, 0, 1, 140737348769408, 140737488348808, 1, 0, 0, 140737347476889, 10, 140737347477907, 140737348769856, 140737348769408, 140737348773216}}, sa_flags = -140930118, sa_restorer = 0x55555559ebd0}
sigs = {__val = {32, 0 <repeats 15 times>}}
#2 0x000055555555cb48 in isc_error_fatal (file=file@entry=0x555555565314 "pk11.c", line=line@entry=442, format=format@entry=0x5555555654d3 "%s: Error = 0x%.8lX\n") at error.c:67
args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fffffffe760, reg_save_area = 0x7fffffffe6a0}}
#3 0x000055555555b178 in pk11_error_fatalcheck (file=file@entry=0x555555565314 "pk11.c", line=line@entry=442, funcname=funcname@entry=0x5555555655f4 "pkcs_C_Login", rv=<optimized out>) at pk11.c:987
No locals.
#4 0x000055555555b9f3 in token_login (sp=<optimized out>, sp=<optimized out>) at pk11.c:442
rv = <optimized out>
token = 0x55555559ebd0
#5 0x000055555555bd3e in pk11_get_session (ctx=0x7fffffffe870, optype=OP_ANY, need_services=<optimized out>, rw=<optimized out>, logon=<optimized out>, pin=<optimized out>, slot=<optimized out>) at pk11.c:334
token = <optimized out>
freelist = <optimized out>
sp = 0x55555559eb00
ret = 0
#6 0x00005555555596c3 in main (argc=7, argv=<optimized out>) at pkcs11-destroy.c:150
result = <optimized out>
rv = <optimized out>
slot = 1604939466
hSession = <optimized out>
attr_id = "66"
akey = {26577600, 140737488349620, 2, 9223372036854775822, 0, 0, 0, 0, 0, 0, 2, 9223372036854775822, 0, 140737347945865, 140737348766784, 592, 0, 140737347515177, 0, 140737347500374, 0, 93824992337920, 624, 140737348766880, 140737488349976, 140737488350032, 140737354131248, 896, 140737354132160, 18446744073709551528, 592, 140737348766880, 576, 140737348766784, 37, 140737347504347, 0, 35, 0, 0, 576, 0, 72704, 72703, 121, 9, 244813135909, 1136, 5085241283009, 93824992300661}
pctx = {handle = 0x0, session = 0, ontoken = 0 '\000', object = 0}
lib_name = 0x0
label = <optimized out>
pin = 0x7fffffffee80 "1"
error = 0
id = <optimized out>
i = 0
wait = 5
c = <optimized out>
errflg = 0
ulObjectCount = 280375481794560
search_template = {{type = 3, pValue = 0x7fffffffee74, ulValueLen = 8}}
j = <optimized out>
len = <optimized out>
```
This is on updated Debian GNU/Linux bullseye/sid (sid Docker image from our repository).
BIND was configured with `--enable-native-pkcs11 --with-pkcs11=/usr/lib/softhsm/libsofthsm2.so`.BIND 9.17 Backburnerhttps://gitlab.isc.org/isc-projects/bind9/-/issues/1508case system test failed.2020-01-28T21:25:04ZMark Andrewscase system test failed.It looks like more time is required for the zone to transfer.
```
S:case:Fri Dec 13 03:51:17 UTC 2019
T:case:1:A
A:case:System test case
I:case:PORTRANGE:6100 - 6199
I:case:waiting for zone transfer to complete (1)
I:case:testing case p...It looks like more time is required for the zone to transfer.
```
S:case:Fri Dec 13 03:51:17 UTC 2019
T:case:1:A
A:case:System test case
I:case:PORTRANGE:6100 - 6199
I:case:waiting for zone transfer to complete (1)
I:case:testing case preserving responses - no acl (2)
I:case:testing no-case-compress acl '{ 10.53.0.2; }' (3)
I:case:testing load of dynamic zone with various $ORIGIN values (4)
I:case:transfer of dynamic zone with various $ORIGIN values (5)
I:case:change SOA owner case via update (6)
I:case:check SOA owner case is transfered to slave (7)
I:case:change A record owner case via update (8)
I:case:check A owner case is transfered to slave (9)
I:case:digcomp failed:
I:case:Only in postns1.good (missing from dig.ns2.test9):
I:case:> dYNAMIc. 300 IN SOA mname1. . 2000042409 20 20 1814400 3600
I:case:> Ns1.DyNaMIC. 300 IN A 10.53.0.1
I:case:> dYNAMIc. 300 IN SOA mname1. . 2000042409 20 20 1814400 3600
I:case:Only in dig.ns2.test9 (missing from postns1.good):
I:case:< dYNAMIc. 0 IN SOA mname1. . 2000042408 20 20 1814400 3600
I:case:< ns1.DYNAMIC. 300 IN A 10.53.0.1
I:case:< dYNAMIc. 0 IN SOA mname1. . 2000042408 20 20 1814400 3600
I:case:exit status: 1
R:case:FAIL
E:case:Fri Dec 13 03:51:33 UTC 2019
```
```
13-Dec-2019 03:51:32.520 client @0xe8703908 10.53.0.1#43751 (dynamic): AXFR request
13-Dec-2019 03:51:32.520 client @0xe8703908 10.53.0.1#43751 (dynamic): transfer of 'dynamic/IN': AXFR question section OK
13-Dec-2019 03:51:32.520 client @0xe8703908 10.53.0.1#43751 (dynamic): transfer of 'dynamic/IN': AXFR authority section OK
13-Dec-2019 03:51:32.520 client @0xe8703908 10.53.0.1#43751 (dynamic): zone transfer 'dynamic/AXFR/IN' approved
13-Dec-2019 03:51:32.520 client @0xe8703908 10.53.0.1#43751 (dynamic): transfer of 'dynamic/IN': AXFR started (serial 2000042408)
13-Dec-2019 03:51:32.520 dYNAMIc. 0 IN SOA mname1. . 2000042408 20 20 1814400 3600
13-Dec-2019 03:51:32.520 DyNaMiC. 300 IN NS ns1.DYNAMIC.
13-Dec-2019 03:51:32.520 DynamiC. 300 IN MX 0 mail.eXaMpLe.
13-Dec-2019 03:51:32.520 mAiL.DynamiC. 300 IN A 10.53.0.1
13-Dec-2019 03:51:32.520 ns1.DYNAMIC. 300 IN A 10.53.0.1
13-Dec-2019 03:51:32.520 dYNAMIc. 0 IN SOA mname1. . 2000042408 20 20 1814400 3600
13-Dec-2019 03:51:32.520 client @0xe8703908 10.53.0.1#43751 (dynamic): transfer of 'dynamic/IN': sending TCP message of 251 bytes
13-Dec-2019 03:51:32.520 client @0xe8703908 10.53.0.1#43751 (dynamic): transfer of 'dynamic/IN': AXFR ended: 1 messages, 6 records, 251 bytes, 0.001 secs (251000 bytes/sec)
13-Dec-2019 03:51:32.520 client @0xe8703908 10.53.0.1#43751 (dynamic): reset client
13-Dec-2019 03:51:32.520 client @0xe8703908 10.53.0.1#43751 (dynamic): endrequest
13-Dec-2019 03:51:32.520 query client=0xe8703908 thread=0xf1b6db40 (dynamic/AXFR): query_reset
13-Dec-2019 03:51:32.972 zone_needdump: zone dynamic/IN: enter
13-Dec-2019 03:51:33.004 zone_settimer: zone dynamic/IN: enter
13-Dec-2019 03:51:33.004 zone dynamic/IN: zone transfer finished: success
13-Dec-2019 03:51:33.004 zone dynamic/IN: transferred serial 2000042409
13-Dec-2019 03:51:33.004 zone_needdump: zone dynamic/IN: enter
13-Dec-2019 03:51:33.004 zone_settimer: zone dynamic/IN: enter
13-Dec-2019 03:51:33.004 zone_settimer: zone dynamic/IN: enter
13-Dec-2019 03:51:33.004 transfer of 'dynamic/IN' from 10.53.0.1#6100: Transfer status: success
13-Dec-2019 03:51:33.004 transfer of 'dynamic/IN' from 10.53.0.1#6100: Transfer completed: 1 messages, 6 records, 232 bytes, 5.344 secs (43 bytes/sec)
13-Dec-2019 03:51:33.004 transfer of 'dynamic/IN' from 10.53.0.1#6100: freeing transfer context
13-Dec-2019 03:51:33.024 zone_timer: zone dynamic/IN: enter
13-Dec-2019 03:51:33.024 zone_maintenance: zone dynamic/IN: enter
13-Dec-2019 03:51:33.024 zone dynamic/IN: sending notifies (serial 2000042409)
13-Dec-2019 03:51:33.024 dns_adb_createfind: found A for name ns1.DYNAMIC (0xe7f83170) in db
13-Dec-2019 03:51:33.024 zone_settimer: zone dynamic/IN: enter
13-Dec-2019 03:51:33.064 zone_shutdown: zone dynamic/IN: shutting down
13-Dec-2019 03:51:33.064 calling free_rbtdb(dynamic)
13-Dec-2019 03:51:33.064 done free_rbtdb(dynamic)
```BIND 9.17 BackburnerMark AndrewsMark Andrewshttps://gitlab.isc.org/isc-projects/bind9/-/issues/1504"rndc status" closed with ISC_R_DUPLICATE2021-10-05T07:13:28ZMichał Kępień"rndc status" closed with ISC_R_DUPLICATEAn interesting `dnssec` system test failure happened on Windows for 9.11.14:
- https://gitlab.isc.org/isc-private/bind9/-/jobs/473919
```
...
I:dnssec:check that 'rndc signing' without arguments is handled (155)
I:dnssec:check that '...An interesting `dnssec` system test failure happened on Windows for 9.11.14:
- https://gitlab.isc.org/isc-private/bind9/-/jobs/473919
```
...
I:dnssec:check that 'rndc signing' without arguments is handled (155)
I:dnssec:check that 'rndc signing -list' without zone is handled (156)
I:dnssec:check that 'rndc signing -clear' without additional arguments is handled (157)
I:dnssec:check that 'rndc signing -clear all' without zone is handled (158)
I:dnssec:check that 'rndc signing -nsec3param' without additional arguments is handled (159)
I:dnssec:check that 'rndc signing -nsec3param none' without zone is handled (160)
I:dnssec:check that 'rndc signing -nsec3param 1' without additional arguments is handled (161)
I:dnssec:check that 'rndc signing -nsec3param 1 0' without additional arguments is handled (162)
I:dnssec:check that 'rndc signing -nsec3param 1 0 0' without additional arguments is handled (163)
I:dnssec:check that 'rndc signing -nsec3param 1 0 0 -' without zone is handled (164)
rndc: connection to remote host closed
This may indicate that
* the remote server is using an older version of the command protocol,
* this host is not authorized to connect,
* the clocks are not synchronized,
* the key signing algorithm is incorrect, or
* the key is invalid.
I:dnssec:failed
I:dnssec:check that 'rndc signing -nsec3param' works with salt (165)
I:dnssec:check that 'rndc signing -nsec3param' works without salt (166)
I:dnssec:check that 'rndc signing -nsec3param' works with 'auto' as salt (167)
I:dnssec:check that 'rndc signing -nsec3param' with 'auto' as salt again generates a different salt (168)
...
```
It seems to me that a TCP connection opened by an `rndc status` [command][1] was immediately torn down with the following log message:
```
12-Dec-2019 0:07:33.960 invalid command from 10.53.0.3#54441: duplicate
```
Apparently this log message is produced by one of the `log_invalid()` calls in `bin/named/controlconf.c:control_recvmessage()`, but I was unable to quickly determine which one it may be. Any ideas? This seems to happen rather rarely.
[1]: https://gitlab.isc.org/isc-private/bind9/blob/ea409239d52814e58c6d3761035dbc1b3a76ab87/bin/tests/system/dnssec/tests.sh#L2565BIND 9.17 Backburnerhttps://gitlab.isc.org/isc-projects/bind9/-/issues/1503Hang when trying to access a privileged port without permission2020-01-23T10:56:23ZStephen MorrisHang when trying to access a privileged port without permissionRunning a test as an unprivileged user (i.e. without "sudo") on the latest version of master with the following "options" statement:
```
options {
directory "/home/jenkins/workspace/bind9-nsd-axfr/interop/bind/work";
allow-query ...Running a test as an unprivileged user (i.e. without "sudo") on the latest version of master with the following "options" statement:
```
options {
directory "/home/jenkins/workspace/bind9-nsd-axfr/interop/bind/work";
allow-query { any ; };
allow-notify { 10.53.0.1 ; } ;
listen-on port 5300 { 10.53.0.1 ; } ;
pid-file "/home/jenkins/workspace/bind9-nsd-axfr/interop/bind/work/named.pid";
};
```
(Note that as no "listen-on-v6" is specified, BIND will attempt to listen on all IPv6 interfaces on the default privileged port 53.) In 9.15.5 or earlier, when an unprivileged BIND starts and attempts open port 53 on an IPv6 interface, it fails with a permission problem and continues the initialization, e.g.
```
12-Dec-2019 16:26:28.179 using default UDP/IPv4 port range: [32768, 60999]
12-Dec-2019 16:26:28.179 using default UDP/IPv6 port range: [32768, 60999]
12-Dec-2019 16:26:28.180 listening on IPv6 interfaces, port 53
12-Dec-2019 16:26:28.188 could not listen on UDP socket: permission denied
12-Dec-2019 16:26:28.188 listening on all IPv6 interfaces failed
12-Dec-2019 16:26:28.188 listening on IPv4 interface lo, 10.53.0.1#5300
12-Dec-2019 16:26:28.190 generating session key for dynamic DNS
```
(.. and then reports a failure to open the port on the IPv6 interfaces every few seconds thereafter). In the latest version of "master" (commit 6f3fdf36b4), the behavior has changed: it hangs after outputting the message:
```
listening on IPv6 interfaces, port 53
```
The problem is easily overcome (e.g. specify "-4" on the command line). Nevertheless, BIND should not hang if it encounters a permission problem.
The test was run on a Fedora 30 system.BIND 9.17 Backburnerhttps://gitlab.isc.org/isc-projects/bind9/-/issues/1501SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) in pthrea...2020-09-17T07:48:07ZOndřej SurýSUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) in pthread_rwlock_wrlock - zone_postloadOne variant is race between `zone_postload` and `resume_iteration`, and the second variant is race between `zone_postload` and `receive_secure_db`.
```
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock)
Cycle in lock ...One variant is race between `zone_postload` and `resume_iteration`, and the second variant is race between `zone_postload` and `receive_secure_db`.
```
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock)
Cycle in lock order graph: M1 (0x000000000000) => M2 (0x000000000000) => M1
Mutex M2 acquired here while holding mutex M1 in thread T1:
#0 pthread_rwlock_wrlock <null>
#1 isc_rwlock_lock lib/isc/rwlock.c:54:4
#2 zone_postload lib/dns/zone.c:4908:2
#3 receive_secure_db lib/dns/zone.c:15645:11
#4 dispatch lib/isc/task.c:1143:7
#5 run lib/isc/task.c:1328:2
Mutex M1 previously acquired by the same thread here:
#0 pthread_rwlock_rdlock <null>
#1 isc_rwlock_lock lib/isc/rwlock.c:50:3
#2 resume_iteration lib/dns/rbtdb.c:8946:2
#3 dbiterator_first lib/dns/rbtdb.c:8993:3
#4 dns_dbiterator_first lib/dns/dbiterator.c:44:10
#5 receive_secure_db lib/dns/zone.c:15575:16
#6 dispatch lib/isc/task.c:1143:7
#7 run lib/isc/task.c:1328:2
Mutex M1 acquired here while holding mutex M2 in thread T2:
#0 pthread_rwlock_rdlock <null>
#1 isc_rwlock_lock lib/isc/rwlock.c:50:3
#2 findnodeintree lib/dns/rbtdb.c:2742:2
#3 findnode lib/dns/rbtdb.c:2804:10
#4 dns_db_findnode lib/dns/db.c:447:11
#5 zone_get_from_db lib/dns/zone.c:5373:11
#6 get_raw_serial lib/dns/zone.c:2398:12
#7 zone_gotwritehandle lib/dns/zone.c:2435:4
#8 dispatch lib/isc/task.c:1143:7
#9 run lib/isc/task.c:1328:2
Mutex M2 previously acquired by the same thread here:
#0 pthread_rwlock_rdlock <null>
#1 isc_rwlock_lock lib/isc/rwlock.c:50:3
#2 zone_gotwritehandle lib/dns/zone.c:2428:2
#3 dispatch lib/isc/task.c:1143:7
#4 run lib/isc/task.c:1328:2
Thread T1 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:75:8
#2 isc_taskmgr_create lib/isc/task.c:1419:3
#3 create_managers bin/named/./main.c:902:11
#4 setup bin/named/./main.c:1235:11
#5 main bin/named/./main.c:1515:2
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:75:8
#2 isc_taskmgr_create lib/isc/task.c:1419:3
#3 create_managers bin/named/./main.c:902:11
#4 setup bin/named/./main.c:1235:11
#5 main bin/named/./main.c:1515:2
SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) in pthread_rwlock_wrlock
```
```
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock)
Cycle in lock order graph: M1 (0x000000000001) => M2 (0x000000000002) => M1
Mutex M2 acquired here while holding mutex M1 in thread T1:
#0 pthread_rwlock_wrlock <null>
#1 isc_rwlock_lock lib/isc/rwlock.c:54:4
#2 zone_postload lib/dns/zone.c:4908:2
#3 receive_secure_db lib/dns/zone.c:15645:11
#4 dispatch lib/isc/task.c:1143:7
#5 run lib/isc/task.c:1328:2
Mutex M1 previously acquired by the same thread here:
#0 pthread_mutex_lock <null>
#1 receive_secure_db lib/dns/zone.c:15643:2
#2 dispatch lib/isc/task.c:1143:7
#3 run lib/isc/task.c:1328:2
Mutex M1 acquired here while holding mutex M2 in thread T1:
#0 pthread_mutex_lock <null>
#1 get_raw_serial lib/dns/zone.c:2396:2
#2 zone_gotwritehandle lib/dns/zone.c:2435:4
#3 dispatch lib/isc/task.c:1143:7
#4 run lib/isc/task.c:1328:2
Mutex M2 previously acquired by the same thread here:
#0 pthread_rwlock_rdlock <null>
#1 isc_rwlock_lock lib/isc/rwlock.c:50:3
#2 zone_gotwritehandle lib/dns/zone.c:2428:2
#3 dispatch lib/isc/task.c:1143:7
#4 run lib/isc/task.c:1328:2
Thread T1 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:75:8
#2 isc_taskmgr_create lib/isc/task.c:1419:3
#3 create_managers bin/named/./main.c:902:11
#4 setup bin/named/./main.c:1235:11
#5 main bin/named/./main.c:1515:2
SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) in pthread_rwlock_wrlock
```BIND 9.17 Backburnerhttps://gitlab.isc.org/isc-projects/bind9/-/issues/1489ThreadSanitizer: lock-order-inversion (potential deadlock) - findnodeintree v...2020-09-17T07:46:21ZOndřej SurýThreadSanitizer: lock-order-inversion (potential deadlock) - findnodeintree vs rss_post```
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=17286)
Cycle in lock order graph: M18589 (0x7b780002a018) => M33903 (0x7b50000500d0) => M18589
Mutex M33903 acquired here while holding mutex M18589 in thr...```
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=17286)
Cycle in lock order graph: M18589 (0x7b780002a018) => M33903 (0x7b50000500d0) => M18589
Mutex M33903 acquired here while holding mutex M18589 in thread T12:
#0 pthread_rwlock_rdlock <null> (named+0x442616)
#1 isc_rwlock_lock /home/ondrej/Projects/bind9/lib/isc/rwlock.c:50:3 (libisc.so.1504+0x49521)
#2 findnodeintree /home/ondrej/Projects/bind9/lib/dns/rbtdb.c:2742:2 (libdns.so.1505+0xed3db)
#3 findnode /home/ondrej/Projects/bind9/lib/dns/rbtdb.c:2804:10 (libdns.so.1505+0xdd39b)
#4 dns_db_findnode /home/ondrej/Projects/bind9/lib/dns/db.c:447:11 (libdns.so.1505+0x5fb68)
#5 resume_addnsec3chain /home/ondrej/Projects/bind9/lib/dns/zone.c:3573:11 (libdns.so.1505+0x1dda18)
#6 rss_post /home/ondrej/Projects/bind9/lib/dns/zone.c:19952:3 (libdns.so.1505+0x1dd1e8)
#7 setnsec3param /home/ondrej/Projects/bind9/lib/dns/zone.c:19760:3 (libdns.so.1505+0x1ce1fc)
#8 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134:7 (libisc.so.1504+0x52007)
#9 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319:2 (libisc.so.1504+0x4f3a8)
Mutex M18589 previously acquired by the same thread here:
#0 pthread_mutex_lock <null> (named+0x45e376)
#1 rss_post /home/ondrej/Projects/bind9/lib/dns/zone.c:19951:3 (libdns.so.1505+0x1dd1b4)
#2 setnsec3param /home/ondrej/Projects/bind9/lib/dns/zone.c:19760:3 (libdns.so.1505+0x1ce1fc)
#3 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134:7 (libisc.so.1504+0x52007)
#4 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319:2 (libisc.so.1504+0x4f3a8)
Mutex M18589 acquired here while holding mutex M33903 in thread T12:
#0 pthread_mutex_lock <null> (named+0x45e376)
#1 zone_nsec3chain /home/ondrej/Projects/bind9/lib/dns/zone.c:7991:3 (libdns.so.1505+0x1e6bdb)
#2 zone_maintenance /home/ondrej/Projects/bind9/lib/dns/zone.c:10819:4 (libdns.so.1505+0x1e074b)
#3 zone_timer /home/ondrej/Projects/bind9/lib/dns/zone.c:13650:2 (libdns.so.1505+0x1c4faa)
#4 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134:7 (libisc.so.1504+0x52007)
#5 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319:2 (libisc.so.1504+0x4f3a8)
Mutex M33903 previously acquired by the same thread here:
#0 pthread_rwlock_rdlock <null> (named+0x442616)
#1 isc_rwlock_lock /home/ondrej/Projects/bind9/lib/isc/rwlock.c:50:3 (libisc.so.1504+0x49521)
#2 resume_iteration /home/ondrej/Projects/bind9/lib/dns/rbtdb.c:8946:2 (libdns.so.1505+0xf01fb)
#3 dbiterator_next /home/ondrej/Projects/bind9/lib/dns/rbtdb.c:9223:3 (libdns.so.1505+0xef82a)
#4 dns_dbiterator_next /home/ondrej/Projects/bind9/lib/dns/dbiterator.c:88:10 (libdns.so.1505+0x62974)
#5 zone_nsec3chain /home/ondrej/Projects/bind9/lib/dns/zone.c:8127:13 (libdns.so.1505+0x1e6f60)
#6 zone_maintenance /home/ondrej/Projects/bind9/lib/dns/zone.c:10819:4 (libdns.so.1505+0x1e074b)
#7 zone_timer /home/ondrej/Projects/bind9/lib/dns/zone.c:13650:2 (libdns.so.1505+0x1c4faa)
#8 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134:7 (libisc.so.1504+0x52007)
#9 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319:2 (libisc.so.1504+0x4f3a8)
Thread T12 'isc-worker0003' (tid=17312, running) created by main thread at:
#0 pthread_create <null> (named+0x44011b)
#1 isc_thread_create /home/ondrej/Projects/bind9/lib/isc/pthreads/thread.c:75:8 (libisc.so.1504+0x6a9ea)
#2 isc_taskmgr_create /home/ondrej/Projects/bind9/lib/isc/task.c:1410:3 (libisc.so.1504+0x4f1b2)
#3 create_managers /home/ondrej/Projects/bind9/bin/named/./main.c:902:11 (named+0x4db206)
#4 setup /home/ondrej/Projects/bind9/bin/named/./main.c:1235:11 (named+0x4d98fe)
#5 main /home/ondrej/Projects/bind9/bin/named/./main.c:1515:2 (named+0x4d85c2)
SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) (/home/ondrej/Projects/bind9/bin/named/.libs/named+0x442616) in pthread_rwlock_rdlock
```BIND 9.17 Backburnerhttps://gitlab.isc.org/isc-projects/bind9/-/issues/1488ThreadSanitizer: lock-order-inversion (potential deadlock) - setnsec3paramete...2020-09-17T07:46:13ZOndřej SurýThreadSanitizer: lock-order-inversion (potential deadlock) - setnsec3parameters vs zone_asyncload```
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=17286)
Cycle in lock order graph: M17781 (0x7b780001c818) => M921966132255197904 (0x000000000000) => M17781
Mutex M921966132255197904 acquired here while h...```
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=17286)
Cycle in lock order graph: M17781 (0x7b780001c818) => M921966132255197904 (0x000000000000) => M17781
Mutex M921966132255197904 acquired here while holding mutex M17781 in thread T15:
#0 pthread_rwlock_rdlock <null> (named+0x442616)
#1 isc_rwlock_lock /home/ondrej/Projects/bind9/lib/isc/rwlock.c:50:3 (libisc.so.1504+0x49521)
#2 setnsec3parameters /home/ondrej/Projects/bind9/lib/dns/rbtdb.c:2288:2 (libdns.so.1505+0xec52f)
#3 iszonesecure /home/ondrej/Projects/bind9/lib/dns/rbtdb.c:2261:2 (libdns.so.1505+0xec486)
#4 endload /home/ondrej/Projects/bind9/lib/dns/rbtdb.c:7336:3 (libdns.so.1505+0xdb937)
#5 dns_db_endload /home/ondrej/Projects/bind9/lib/dns/db.c:301:10 (libdns.so.1505+0x5f3ee)
#6 zone_startload /home/ondrej/Projects/bind9/lib/dns/zone.c:2554:13 (libdns.so.1505+0x1cfd16)
#7 zone_load /home/ondrej/Projects/bind9/lib/dns/zone.c:2138:13 (libdns.so.1505+0x1b6796)
#8 zone_asyncload /home/ondrej/Projects/bind9/lib/dns/zone.c:2193:11 (libdns.so.1505+0x1b709c)
#9 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134:7 (libisc.so.1504+0x52007)
#10 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319:2 (libisc.so.1504+0x4f3a8)
Mutex M17781 previously acquired by the same thread here:
#0 pthread_mutex_lock <null> (named+0x45e376)
#1 zone_asyncload /home/ondrej/Projects/bind9/lib/dns/zone.c:2192:2 (libdns.so.1505+0x1b704b)
#2 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134:7 (libisc.so.1504+0x52007)
#3 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319:2 (libisc.so.1504+0x4f3a8)
Mutex M17781 acquired here while holding mutex M921966132255197904 in thread T9:
#0 pthread_mutex_lock <null> (named+0x45e376)
#1 zone_nsec3chain /home/ondrej/Projects/bind9/lib/dns/zone.c:8216:3 (libdns.so.1505+0x1e7942)
#2 zone_maintenance /home/ondrej/Projects/bind9/lib/dns/zone.c:10819:4 (libdns.so.1505+0x1e074b)
#3 zone_timer /home/ondrej/Projects/bind9/lib/dns/zone.c:13650:2 (libdns.so.1505+0x1c4faa)
#4 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134:7 (libisc.so.1504+0x52007)
#5 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319:2 (libisc.so.1504+0x4f3a8)
Mutex M921966132255197904 previously acquired by the same thread here:
#0 pthread_rwlock_rdlock <null> (named+0x442616)
#1 isc_rwlock_lock /home/ondrej/Projects/bind9/lib/isc/rwlock.c:50:3 (libisc.so.1504+0x49521)
#2 resume_iteration /home/ondrej/Projects/bind9/lib/dns/rbtdb.c:8946:2 (libdns.so.1505+0xf01fb)
#3 dbiterator_current /home/ondrej/Projects/bind9/lib/dns/rbtdb.c:9268:3 (libdns.so.1505+0xefa7a)
#4 dns_dbiterator_current /home/ondrej/Projects/bind9/lib/dns/dbiterator.c:103:10 (libdns.so.1505+0x62a1a)
#5 zone_nsec3chain /home/ondrej/Projects/bind9/lib/dns/zone.c:8253:3 (libdns.so.1505+0x1e7a78)
#6 zone_maintenance /home/ondrej/Projects/bind9/lib/dns/zone.c:10819:4 (libdns.so.1505+0x1e074b)
#7 zone_timer /home/ondrej/Projects/bind9/lib/dns/zone.c:13650:2 (libdns.so.1505+0x1c4faa)
#8 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134:7 (libisc.so.1504+0x52007)
#9 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319:2 (libisc.so.1504+0x4f3a8)
Thread T15 'isc-worker0006' (tid=17315, running) created by main thread at:
#0 pthread_create <null> (named+0x44011b)
#1 isc_thread_create /home/ondrej/Projects/bind9/lib/isc/pthreads/thread.c:75:8 (libisc.so.1504+0x6a9ea)
#2 isc_taskmgr_create /home/ondrej/Projects/bind9/lib/isc/task.c:1410:3 (libisc.so.1504+0x4f1b2)
#3 create_managers /home/ondrej/Projects/bind9/bin/named/./main.c:902:11 (named+0x4db206)
#4 setup /home/ondrej/Projects/bind9/bin/named/./main.c:1235:11 (named+0x4d98fe)
#5 main /home/ondrej/Projects/bind9/bin/named/./main.c:1515:2 (named+0x4d85c2)
Thread T9 'isc-worker0000' (tid=17309, running) created by main thread at:
#0 pthread_create <null> (named+0x44011b)
#1 isc_thread_create /home/ondrej/Projects/bind9/lib/isc/pthreads/thread.c:75:8 (libisc.so.1504+0x6a9ea)
#2 isc_taskmgr_create /home/ondrej/Projects/bind9/lib/isc/task.c:1410:3 (libisc.so.1504+0x4f1b2)
#3 create_managers /home/ondrej/Projects/bind9/bin/named/./main.c:902:11 (named+0x4db206)
#4 setup /home/ondrej/Projects/bind9/bin/named/./main.c:1235:11 (named+0x4d98fe)
#5 main /home/ondrej/Projects/bind9/bin/named/./main.c:1515:2 (named+0x4d85c2)
SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) (/home/ondrej/Projects/bind9/bin/named/.libs/named+0x442616) in pthread_rwlock_rdlock
```BIND 9.17 Backburnerhttps://gitlab.isc.org/isc-projects/bind9/-/issues/1487ThreadSanitizer: lock-order-inversion (potential deadlock) - nodecount vs zon...2020-09-17T07:46:07ZOndřej SurýThreadSanitizer: lock-order-inversion (potential deadlock) - nodecount vs zone_asyncload```
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=17286)
Cycle in lock order graph: M17329 (0x7b7800015018) => M35468 (0x7b50000302d0) => M17329
Mutex M35468 acquired here while holding mutex M17329 in thr...```
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=17286)
Cycle in lock order graph: M17329 (0x7b7800015018) => M35468 (0x7b50000302d0) => M17329
Mutex M35468 acquired here while holding mutex M17329 in thread T15:
#0 pthread_rwlock_rdlock <null> (named+0x442616)
#1 isc_rwlock_lock /home/ondrej/Projects/bind9/lib/isc/rwlock.c:50:3 (libisc.so.1504+0x49521)
#2 nodecount /home/ondrej/Projects/bind9/lib/dns/rbtdb.c:7637:2 (libdns.so.1505+0xe108d)
#3 dns_db_nodecount /home/ondrej/Projects/bind9/lib/dns/db.c:847:10 (libdns.so.1505+0x613ea)
#4 zone_postload /home/ondrej/Projects/bind9/lib/dns/zone.c:4570:8 (libdns.so.1505+0x1ca704)
#5 zone_load /home/ondrej/Projects/bind9/lib/dns/zone.c:2163:11 (libdns.so.1505+0x1b6ac5)
#6 zone_asyncload /home/ondrej/Projects/bind9/lib/dns/zone.c:2193:11 (libdns.so.1505+0x1b709c)
#7 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134:7 (libisc.so.1504+0x52007)
#8 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319:2 (libisc.so.1504+0x4f3a8)
Mutex M17329 previously acquired by the same thread here:
#0 pthread_mutex_lock <null> (named+0x45e376)
#1 zone_asyncload /home/ondrej/Projects/bind9/lib/dns/zone.c:2192:2 (libdns.so.1505+0x1b704b)
#2 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134:7 (libisc.so.1504+0x52007)
#3 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319:2 (libisc.so.1504+0x4f3a8)
Mutex M17329 acquired here while holding mutex M35468 in thread T13:
#0 pthread_mutex_lock <null> (named+0x45e376)
#1 zone_nsec3chain /home/ondrej/Projects/bind9/lib/dns/zone.c:7991:3 (libdns.so.1505+0x1e6bdb)
#2 zone_maintenance /home/ondrej/Projects/bind9/lib/dns/zone.c:10819:4 (libdns.so.1505+0x1e074b)
#3 zone_timer /home/ondrej/Projects/bind9/lib/dns/zone.c:13650:2 (libdns.so.1505+0x1c4faa)
#4 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134:7 (libisc.so.1504+0x52007)
#5 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319:2 (libisc.so.1504+0x4f3a8)
Mutex M35468 previously acquired by the same thread here:
#0 pthread_rwlock_rdlock <null> (named+0x442616)
#1 isc_rwlock_lock /home/ondrej/Projects/bind9/lib/isc/rwlock.c:50:3 (libisc.so.1504+0x49521)
#2 resume_iteration /home/ondrej/Projects/bind9/lib/dns/rbtdb.c:8946:2 (libdns.so.1505+0xf01fb)
#3 dbiterator_next /home/ondrej/Projects/bind9/lib/dns/rbtdb.c:9223:3 (libdns.so.1505+0xef82a)
#4 dns_dbiterator_next /home/ondrej/Projects/bind9/lib/dns/dbiterator.c:88:10 (libdns.so.1505+0x62974)
#5 zone_nsec3chain /home/ondrej/Projects/bind9/lib/dns/zone.c:8127:13 (libdns.so.1505+0x1e6f60)
#6 zone_maintenance /home/ondrej/Projects/bind9/lib/dns/zone.c:10819:4 (libdns.so.1505+0x1e074b)
#7 zone_timer /home/ondrej/Projects/bind9/lib/dns/zone.c:13650:2 (libdns.so.1505+0x1c4faa)
#8 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134:7 (libisc.so.1504+0x52007)
#9 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319:2 (libisc.so.1504+0x4f3a8)
Thread T15 'isc-worker0006' (tid=17315, running) created by main thread at:
#0 pthread_create <null> (named+0x44011b)
#1 isc_thread_create /home/ondrej/Projects/bind9/lib/isc/pthreads/thread.c:75:8 (libisc.so.1504+0x6a9ea)
#2 isc_taskmgr_create /home/ondrej/Projects/bind9/lib/isc/task.c:1410:3 (libisc.so.1504+0x4f1b2)
#3 create_managers /home/ondrej/Projects/bind9/bin/named/./main.c:902:11 (named+0x4db206)
#4 setup /home/ondrej/Projects/bind9/bin/named/./main.c:1235:11 (named+0x4d98fe)
#5 main /home/ondrej/Projects/bind9/bin/named/./main.c:1515:2 (named+0x4d85c2)
Thread T13 'isc-worker0004' (tid=17313, running) created by main thread at:
#0 pthread_create <null> (named+0x44011b)
#1 isc_thread_create /home/ondrej/Projects/bind9/lib/isc/pthreads/thread.c:75:8 (libisc.so.1504+0x6a9ea)
#2 isc_taskmgr_create /home/ondrej/Projects/bind9/lib/isc/task.c:1410:3 (libisc.so.1504+0x4f1b2)
#3 create_managers /home/ondrej/Projects/bind9/bin/named/./main.c:902:11 (named+0x4db206)
#4 setup /home/ondrej/Projects/bind9/bin/named/./main.c:1235:11 (named+0x4d98fe)
#5 main /home/ondrej/Projects/bind9/bin/named/./main.c:1515:2 (named+0x4d85c2)
SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) (/home/ondrej/Projects/bind9/bin/named/.libs/named+0x442616) in pthread_rwlock_rdlock
```BIND 9.17 Backburnerhttps://gitlab.isc.org/isc-projects/bind9/-/issues/1485ThreadSanitizer: data race (bin/named/.libs/named+0x449fe2) in ns__client_set...2020-09-17T08:14:41ZOndřej SurýThreadSanitizer: data race (bin/named/.libs/named+0x449fe2) in ns__client_setup lib/ns/client.c:2278:13There are more variants where the second thread runs:
* `fetch_callback()`
```
WARNING: ThreadSanitizer: data race
Write of size 8 at 0x000000000001 by thread T1:
#0 memset <null>
#1 ns__client_setup lib/ns/client.c:2278:13
...There are more variants where the second thread runs:
* `fetch_callback()`
```
WARNING: ThreadSanitizer: data race
Write of size 8 at 0x000000000001 by thread T1:
#0 memset <null>
#1 ns__client_setup lib/ns/client.c:2278:13
#2 ns__client_request lib/ns/client.c:1643:12
#3 processbuffer lib/isc/netmgr/tcpdns.c:177:3
#4 dnslisten_readcb lib/isc/netmgr/tcpdns.c:231:12
#5 read_cb lib/isc/netmgr/tcp.c:768:4
#6 <null> <null>
Previous read of size 8 at 0x000000000001 by thread T2:
#0 fetch_callback lib/ns/query.c:5680:29
#1 dispatch lib/isc/task.c:1143:7
#2 run lib/isc/task.c:1328:2
Location is heap block of size 7489 at 0x000000000012 allocated by thread T1:
#0 malloc <null>
#1 default_memalloc lib/isc/mem.c:685:8
#2 mem_get lib/isc/mem.c:598:8
#3 mem_allocateunlocked lib/isc/mem.c:1222:8
#4 isc___mem_allocate lib/isc/mem.c:1242:7
#5 isc__mem_allocate lib/isc/mem.c:2387:10
#6 isc___mem_get lib/isc/mem.c:1007:11
#7 isc__mem_get lib/isc/mem.c:2365:10
#8 alloc_handle lib/isc/netmgr/netmgr.c:918:3
#9 isc__nmhandle_get lib/isc/netmgr/netmgr.c:942:12
#10 processbuffer lib/isc/netmgr/tcpdns.c:176:15
#11 dnslisten_readcb lib/isc/netmgr/tcpdns.c:231:12
#12 read_cb lib/isc/netmgr/tcp.c:768:4
#13 <null> <null>
Thread T1 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:75:8
#2 isc_nm_start lib/isc/netmgr/netmgr.c:149:3
#3 create_managers bin/named/./main.c:895:15
#4 setup bin/named/./main.c:1235:11
#5 main bin/named/./main.c:1515:2
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:75:8
#2 isc_taskmgr_create lib/isc/task.c:1419:3
#3 create_managers bin/named/./main.c:902:11
#4 setup bin/named/./main.c:1235:11
#5 main bin/named/./main.c:1515:2
SUMMARY: ThreadSanitizer: data race in memset
```
```
WARNING: ThreadSanitizer: data race
Write of size 8 at 0x000000000001 by thread T1:
#0 memset <null>
#1 ns__client_setup lib/ns/client.c:2278:13
#2 ns__client_request lib/ns/client.c:1643:12
#3 udp_recv_cb lib/isc/netmgr/udp.c:317:2
#4 <null> <null>
Previous read of size 8 at 0x000000000001 by thread T2:
#0 fetch_callback lib/ns/query.c:5680:29
#1 dispatch lib/isc/task.c:1143:7
#2 run lib/isc/task.c:1328:2
Location is heap block of size 7489 at 0x000000000010 allocated by thread T1:
#0 malloc <null>
#1 default_memalloc lib/isc/mem.c:685:8
#2 mem_get lib/isc/mem.c:598:8
#3 mem_allocateunlocked lib/isc/mem.c:1222:8
#4 isc___mem_allocate lib/isc/mem.c:1242:7
#5 isc__mem_allocate lib/isc/mem.c:2387:10
#6 isc___mem_get lib/isc/mem.c:1007:11
#7 isc__mem_get lib/isc/mem.c:2365:10
#8 alloc_handle lib/isc/netmgr/netmgr.c:918:3
#9 isc__nmhandle_get lib/isc/netmgr/netmgr.c:942:12
#10 udp_recv_cb lib/isc/netmgr/udp.c:312:13
#11 <null> <null>
Thread T1 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:75:8
#2 isc_nm_start lib/isc/netmgr/netmgr.c:149:3
#3 create_managers bin/named/./main.c:895:15
#4 setup bin/named/./main.c:1235:11
#5 main bin/named/./main.c:1515:2
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:75:8
#2 isc_taskmgr_create lib/isc/task.c:1419:3
#3 create_managers bin/named/./main.c:902:11
#4 setup bin/named/./main.c:1235:11
#5 main bin/named/./main.c:1515:2
SUMMARY: ThreadSanitizer: data race in memset
```
* `isc_sockaddr_pf()`
```
WARNING: ThreadSanitizer: data race
Write of size 8 at 0x000000000001 by thread T1:
#0 memset <null>
#1 ns__client_setup lib/ns/client.c:2278:13
#2 ns__client_request lib/ns/client.c:1643:12
#3 udp_recv_cb lib/isc/netmgr/udp.c:317:2
#4 <null> <null>
Previous read of size 2 at 0x000000000001 by thread T2:
#0 isc_sockaddr_pf lib/isc/sockaddr.c:326:28
#1 ns_client_send lib/ns/client.c:633:11
#2 respond lib/ns/update.c:1559:2
#3 updatedone_action lib/ns/update.c:3391:2
#4 dispatch lib/isc/task.c:1143:7
#5 run lib/isc/task.c:1328:2
Location is heap block of size 7473 at 0x000000000013 allocated by thread T1:
#0 malloc <null>
#1 default_memalloc lib/isc/mem.c:685:8
#2 mem_get lib/isc/mem.c:598:8
#3 isc___mem_get lib/isc/mem.c:1013:9
#4 isc__mem_get lib/isc/mem.c:2365:10
#5 alloc_handle lib/isc/netmgr/netmgr.c:918:3
#6 isc__nmhandle_get lib/isc/netmgr/netmgr.c:942:12
#7 udp_recv_cb lib/isc/netmgr/udp.c:312:13
#8 <null> <null>
Thread T1 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:75:8
#2 isc_nm_start lib/isc/netmgr/netmgr.c:149:3
#3 create_managers bin/named/./main.c:895:15
#4 setup bin/named/./main.c:1235:11
#5 main bin/named/./main.c:1515:2
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:75:8
#2 isc_taskmgr_create lib/isc/task.c:1419:3
#3 create_managers bin/named/./main.c:902:11
#4 setup bin/named/./main.c:1235:11
#5 main bin/named/./main.c:1515:2
SUMMARY: ThreadSanitizer: data race in memset
```
* `updatedone_action()`
```
WARNING: ThreadSanitizer: data race
Write of size 8 at 0x000000000001 by thread T1:
#0 memset <null>
#1 ns__client_setup lib/ns/client.c:2278:13
#2 ns__client_request lib/ns/client.c:1643:12
#3 udp_recv_cb lib/isc/netmgr/udp.c:317:2
#4 <null> <null>
Previous read of size 8 at 0x000000000001 by thread T2:
#0 updatedone_action lib/ns/update.c:3393:29
#1 dispatch lib/isc/task.c:1143:7
#2 run lib/isc/task.c:1328:2
Location is heap block of size 7473 at 0x000000000010 allocated by thread T1:
#0 malloc <null>
#1 default_memalloc lib/isc/mem.c:685:8
#2 mem_get lib/isc/mem.c:598:8
#3 isc___mem_get lib/isc/mem.c:1013:9
#4 isc__mem_get lib/isc/mem.c:2365:10
#5 alloc_handle lib/isc/netmgr/netmgr.c:918:3
#6 isc__nmhandle_get lib/isc/netmgr/netmgr.c:942:12
#7 udp_recv_cb lib/isc/netmgr/udp.c:312:13
#8 <null> <null>
Thread T1 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:75:8
#2 isc_nm_start lib/isc/netmgr/netmgr.c:149:3
#3 create_managers bin/named/./main.c:895:15
#4 setup bin/named/./main.c:1235:11
#5 main bin/named/./main.c:1515:2
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:75:8
#2 isc_taskmgr_create lib/isc/task.c:1419:3
#3 create_managers bin/named/./main.c:902:11
#4 setup bin/named/./main.c:1235:11
#5 main bin/named/./main.c:1515:2
SUMMARY: ThreadSanitizer: data race in memset
```
```
WARNING: ThreadSanitizer: data race
Write of size 8 at 0x000000000001 by thread T1:
#0 memset <null>
#1 ns__client_setup lib/ns/client.c:2278:13
#2 ns__client_request lib/ns/client.c:1643:12
#3 udp_recv_cb lib/isc/netmgr/udp.c:317:2
#4 <null> <null>
Previous read of size 8 at 0x000000000001 by thread T2:
#0 updatedone_action lib/ns/update.c:3393:29
#1 dispatch lib/isc/task.c:1143:7
#2 run lib/isc/task.c:1328:2
Location is heap block of size 7489 at 0x000000000010 allocated by thread T1:
#0 malloc <null>
#1 default_memalloc lib/isc/mem.c:685:8
#2 mem_get lib/isc/mem.c:598:8
#3 mem_allocateunlocked lib/isc/mem.c:1222:8
#4 isc___mem_allocate lib/isc/mem.c:1242:7
#5 isc__mem_allocate lib/isc/mem.c:2387:10
#6 isc___mem_get lib/isc/mem.c:1007:11
#7 isc__mem_get lib/isc/mem.c:2365:10
#8 alloc_handle lib/isc/netmgr/netmgr.c:918:3
#9 isc__nmhandle_get lib/isc/netmgr/netmgr.c:942:12
#10 udp_recv_cb lib/isc/netmgr/udp.c:312:13
#11 <null> <null>
Thread T1 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:75:8
#2 isc_nm_start lib/isc/netmgr/netmgr.c:149:3
#3 create_managers bin/named/./main.c:895:15
#4 setup bin/named/./main.c:1235:11
#5 main bin/named/./main.c:1515:2
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:75:8
#2 isc_taskmgr_create lib/isc/task.c:1419:3
#3 create_managers bin/named/./main.c:902:11
#4 setup bin/named/./main.c:1235:11
#5 main bin/named/./main.c:1515:2
SUMMARY: ThreadSanitizer: data race in memset
```BIND 9.17 Backburnerhttps://gitlab.isc.org/isc-projects/bind9/-/issues/1478ThreadSanitizer: lock-order-inversion (potential deadlock) - dns_zone_setview...2020-09-17T07:45:17ZOndřej SurýThreadSanitizer: lock-order-inversion (potential deadlock) - dns_zone_setviewcommit vs dns_view_setviewcommit```
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=1260)
Cycle in lock order graph: M637958001013031032 (0x000000000000) => M423192645322475544 (0x000000000000) => M637958001013031032
Mutex M423192645322475...```
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=1260)
Cycle in lock order graph: M637958001013031032 (0x000000000000) => M423192645322475544 (0x000000000000) => M637958001013031032
Mutex M423192645322475544 acquired here while holding mutex M637958001013031032 in thread T9:
#0 pthread_mutex_lock <null> (libtsan.so.0+0x3d62b)
#1 dns_zone_setviewcommit /home/ondrej/Projects/bind9/lib/dns/zone.c:1530 (libdns.so.1505+0x20b0bf)
#2 dns_view_setviewcommit /home/ondrej/Projects/bind9/lib/dns/view.c:2355 (libdns.so.1505+0x1fd42d)
#3 load_configuration server.c:8971 (named+0x57743)
#4 run_server server.c:9654 (named+0x59a47)
#5 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134 (libisc.so.1504+0x56fa6)
#6 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319 (libisc.so.1504+0x56fa6)
#7 <null> <null> (libtsan.so.0+0x29b3d)
Mutex M637958001013031032 previously acquired by the same thread here:
#0 pthread_mutex_lock <null> (libtsan.so.0+0x3d62b)
#1 dns_view_setviewcommit /home/ondrej/Projects/bind9/lib/dns/view.c:2349 (libdns.so.1505+0x1fd3eb)
#2 load_configuration server.c:8971 (named+0x57743)
#3 run_server server.c:9654 (named+0x59a47)
#4 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134 (libisc.so.1504+0x56fa6)
#5 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319 (libisc.so.1504+0x56fa6)
#6 <null> <null> (libtsan.so.0+0x29b3d)
Mutex M637958001013031032 acquired here while holding mutex M423192645322475544 in thread T10:
#0 pthread_mutex_lock <null> (libtsan.so.0+0x3d62b)
#1 dns_view_findzonecut /home/ondrej/Projects/bind9/lib/dns/view.c:1242 (libdns.so.1505+0x1f7819)
#2 fctx_create /home/ondrej/Projects/bind9/lib/dns/resolver.c:4890 (libdns.so.1505+0x190c0d)
#3 dns_resolver_createfetch /home/ondrej/Projects/bind9/lib/dns/resolver.c:10581 (libdns.so.1505+0x1976b1)
#4 zone_refreshkeys /home/ondrej/Projects/bind9/lib/dns/zone.c:10575 (libdns.so.1505+0x22c089)
#5 zone_maintenance /home/ondrej/Projects/bind9/lib/dns/zone.c:10787 (libdns.so.1505+0x249326)
#6 zone_timer /home/ondrej/Projects/bind9/lib/dns/zone.c:13652 (libdns.so.1505+0x249326)
#7 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134 (libisc.so.1504+0x56fa6)
#8 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319 (libisc.so.1504+0x56fa6)
#9 <null> <null> (libtsan.so.0+0x29b3d)
Mutex M423192645322475544 previously acquired by the same thread here:
#0 pthread_mutex_lock <null> (libtsan.so.0+0x3d62b)
#1 zone_refreshkeys /home/ondrej/Projects/bind9/lib/dns/zone.c:10462 (libdns.so.1505+0x22b945)
#2 zone_maintenance /home/ondrej/Projects/bind9/lib/dns/zone.c:10787 (libdns.so.1505+0x249326)
#3 zone_timer /home/ondrej/Projects/bind9/lib/dns/zone.c:13652 (libdns.so.1505+0x249326)
#4 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134 (libisc.so.1504+0x56fa6)
#5 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319 (libisc.so.1504+0x56fa6)
#6 <null> <null> (libtsan.so.0+0x29b3d)
Thread T9 'isc-worker0000' (tid=1327, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x2be1b)
#1 isc_thread_create /home/ondrej/Projects/bind9/lib/isc/pthreads/thread.c:75 (libisc.so.1504+0x7bcc4)
#2 isc_taskmgr_create /home/ondrej/Projects/bind9/lib/isc/task.c:1410 (libisc.so.1504+0x59d63)
#3 create_managers main.c:902 (named+0x1aeec)
#4 setup main.c:1235 (named+0x1aeec)
#5 main main.c:1515 (named+0x1aeec)
Thread T10 'isc-worker0001' (tid=1329, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x2be1b)
#1 isc_thread_create /home/ondrej/Projects/bind9/lib/isc/pthreads/thread.c:75 (libisc.so.1504+0x7bcc4)
#2 isc_taskmgr_create /home/ondrej/Projects/bind9/lib/isc/task.c:1410 (libisc.so.1504+0x59d63)
#3 create_managers main.c:902 (named+0x1aeec)
#4 setup main.c:1235 (named+0x1aeec)
#5 main main.c:1515 (named+0x1aeec)
SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x3d62b) in pthread_mutex_lock
```BIND 9.17 Backburnerhttps://gitlab.isc.org/isc-projects/bind9/-/issues/1477ThreadSanitizer: lock-order-inversion (potential deadlock) - dns_keytable_fin...2020-09-17T08:16:37ZOndřej SurýThreadSanitizer: lock-order-inversion (potential deadlock) - dns_keytable_find vs resume_iteration```
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=1260)
Cycle in lock order graph: M340438830370852048 (0x000000000000) => M417844242807813680 (0x000000000000) => M340438830370852048
Mutex M417844242807813...```
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=1260)
Cycle in lock order graph: M340438830370852048 (0x000000000000) => M417844242807813680 (0x000000000000) => M340438830370852048
Mutex M417844242807813680 acquired here while holding mutex M340438830370852048 in thread T9:
#0 pthread_rwlock_rdlock <null> (libtsan.so.0+0x2cf99)
#1 isc_rwlock_lock /home/ondrej/Projects/bind9/lib/isc/rwlock.c:50 (libisc.so.1504+0x52197)
#2 dns_keytable_find /home/ondrej/Projects/bind9/lib/dns/keytable.c:479 (libdns.so.1505+0x9c179)
#3 sync_keyzone /home/ondrej/Projects/bind9/lib/dns/zone.c:4362 (libdns.so.1505+0x2279b5)
#4 zone_postload /home/ondrej/Projects/bind9/lib/dns/zone.c:4879 (libdns.so.1505+0x24d51a)
#5 zone_load /home/ondrej/Projects/bind9/lib/dns/zone.c:2163 (libdns.so.1505+0x251499)
#6 dns_zone_load /home/ondrej/Projects/bind9/lib/dns/zone.c:2177 (libdns.so.1505+0x251b31)
#7 load_zones server.c:9548 (named+0x2e61a)
#8 run_server server.c:9657 (named+0x59a5a)
#9 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134 (libisc.so.1504+0x56fa6)
#10 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319 (libisc.so.1504+0x56fa6)
#11 <null> <null> (libtsan.so.0+0x29b3d)
Mutex M340438830370852048 previously acquired by the same thread here:
#0 pthread_rwlock_rdlock <null> (libtsan.so.0+0x2cf99)
#1 isc_rwlock_lock /home/ondrej/Projects/bind9/lib/isc/rwlock.c:50 (libisc.so.1504+0x52197)
#2 resume_iteration /home/ondrej/Projects/bind9/lib/dns/rbtdb.c:8946 (libdns.so.1505+0x11dc47)
#3 dbiterator_first /home/ondrej/Projects/bind9/lib/dns/rbtdb.c:8993 (libdns.so.1505+0x11dc47)
#4 dns_dbiterator_first /home/ondrej/Projects/bind9/lib/dns/dbiterator.c:44 (libdns.so.1505+0x69316)
#5 dns_rriterator_first /home/ondrej/Projects/bind9/lib/dns/rriterator.c:69 (libdns.so.1505+0x1c002a)
#6 sync_keyzone /home/ondrej/Projects/bind9/lib/dns/zone.c:4344 (libdns.so.1505+0x22788d)
#7 zone_postload /home/ondrej/Projects/bind9/lib/dns/zone.c:4879 (libdns.so.1505+0x24d51a)
#8 zone_load /home/ondrej/Projects/bind9/lib/dns/zone.c:2163 (libdns.so.1505+0x251499)
#9 dns_zone_load /home/ondrej/Projects/bind9/lib/dns/zone.c:2177 (libdns.so.1505+0x251b31)
#10 load_zones server.c:9548 (named+0x2e61a)
#11 run_server server.c:9657 (named+0x59a5a)
#12 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134 (libisc.so.1504+0x56fa6)
#13 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319 (libisc.so.1504+0x56fa6)
#14 <null> <null> (libtsan.so.0+0x29b3d)
Mutex M340438830370852048 acquired here while holding mutex M417844242807813680 in thread T9:
#0 pthread_rwlock_rdlock <null> (libtsan.so.0+0x2cf99)
#1 isc_rwlock_lock /home/ondrej/Projects/bind9/lib/isc/rwlock.c:50 (libisc.so.1504+0x52197)
#2 zone_find /home/ondrej/Projects/bind9/lib/dns/rbtdb.c:3860 (libdns.so.1505+0x11efe0)
#3 dns_db_find /home/ondrej/Projects/bind9/lib/dns/db.c:511 (libdns.so.1505+0x6648d)
#4 addifmissing /home/ondrej/Projects/bind9/lib/dns/zone.c:4281 (libdns.so.1505+0x226c84)
#5 dns_keytable_forall /home/ondrej/Projects/bind9/lib/dns/keytable.c:901 (libdns.so.1505+0x9a9ff)
#6 sync_keyzone /home/ondrej/Projects/bind9/lib/dns/zone.c:4388 (libdns.so.1505+0x227f70)
#7 zone_postload /home/ondrej/Projects/bind9/lib/dns/zone.c:4879 (libdns.so.1505+0x24d51a)
#8 zone_load /home/ondrej/Projects/bind9/lib/dns/zone.c:2163 (libdns.so.1505+0x251499)
#9 dns_zone_load /home/ondrej/Projects/bind9/lib/dns/zone.c:2177 (libdns.so.1505+0x251b31)
#10 load_zones server.c:9548 (named+0x2e61a)
#11 run_server server.c:9657 (named+0x59a5a)
#12 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134 (libisc.so.1504+0x56fa6)
#13 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319 (libisc.so.1504+0x56fa6)
#14 <null> <null> (libtsan.so.0+0x29b3d)
Mutex M417844242807813680 previously acquired by the same thread here:
#0 pthread_rwlock_rdlock <null> (libtsan.so.0+0x2cf99)
#1 isc_rwlock_lock /home/ondrej/Projects/bind9/lib/isc/rwlock.c:50 (libisc.so.1504+0x52197)
#2 dns_keytable_forall /home/ondrej/Projects/bind9/lib/dns/keytable.c:885 (libdns.so.1505+0x9a89a)
#3 sync_keyzone /home/ondrej/Projects/bind9/lib/dns/zone.c:4388 (libdns.so.1505+0x227f70)
#4 zone_postload /home/ondrej/Projects/bind9/lib/dns/zone.c:4879 (libdns.so.1505+0x24d51a)
#5 zone_load /home/ondrej/Projects/bind9/lib/dns/zone.c:2163 (libdns.so.1505+0x251499)
#6 dns_zone_load /home/ondrej/Projects/bind9/lib/dns/zone.c:2177 (libdns.so.1505+0x251b31)
#7 load_zones server.c:9548 (named+0x2e61a)
#8 run_server server.c:9657 (named+0x59a5a)
#9 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134 (libisc.so.1504+0x56fa6)
#10 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319 (libisc.so.1504+0x56fa6)
#11 <null> <null> (libtsan.so.0+0x29b3d)
Thread T9 'isc-worker0000' (tid=1327, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x2be1b)
#1 isc_thread_create /home/ondrej/Projects/bind9/lib/isc/pthreads/thread.c:75 (libisc.so.1504+0x7bcc4)
#2 isc_taskmgr_create /home/ondrej/Projects/bind9/lib/isc/task.c:1410 (libisc.so.1504+0x59d63)
#3 create_managers main.c:902 (named+0x1aeec)
#4 setup main.c:1235 (named+0x1aeec)
#5 main main.c:1515 (named+0x1aeec)
SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x2cf99) in pthread_rwlock_rdlock
```BIND 9.17 BackburnerDiego dos Santos FronzaDiego dos Santos Fronzahttps://gitlab.isc.org/isc-projects/bind9/-/issues/1472ThreadSanitizer: lock-order-inversion (potential deadlock) - dns_resolver_cre...2020-06-15T21:36:56ZOndřej SurýThreadSanitizer: lock-order-inversion (potential deadlock) - dns_resolver_createfetch vs. dns_resolver_prime```
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=31641)
Cycle in lock order graph: M19990 (0x7b4c00010dc8) => M19989 (0x7b4c00010da0) => M19990
Mutex M19989 acquired here while holding mutex M19990 in thr...```
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=31641)
Cycle in lock order graph: M19990 (0x7b4c00010dc8) => M19989 (0x7b4c00010da0) => M19990
Mutex M19989 acquired here while holding mutex M19990 in thread T16:
#0 pthread_mutex_lock <null> (libtsan.so.0+0x3d62b)
#1 dns_resolver_createfetch /home/ondrej/Projects/bind9/lib/dns/resolver.c:10534 (libdns.so.1505+0x196d25)
#2 dns_resolver_prime /home/ondrej/Projects/bind9/lib/dns/resolver.c:10213 (libdns.so.1505+0x197af8)
#3 dns_view_find /home/ondrej/Projects/bind9/lib/dns/view.c:1113 (libdns.so.1505+0x1f7528)
#4 dbfind_name /home/ondrej/Projects/bind9/lib/dns/adb.c:3678 (libdns.so.1505+0x3f65f)
#5 dns_adb_createfind /home/ondrej/Projects/bind9/lib/dns/adb.c:3030 (libdns.so.1505+0x528d2)
#6 findname /home/ondrej/Projects/bind9/lib/dns/resolver.c:3382 (libdns.so.1505+0x186a47)
#7 fctx_getaddresses /home/ondrej/Projects/bind9/lib/dns/resolver.c:3669 (libdns.so.1505+0x19a933)
#8 fctx_try /home/ondrej/Projects/bind9/lib/dns/resolver.c:4029 (libdns.so.1505+0x1a1a94)
#9 fctx_start /home/ondrej/Projects/bind9/lib/dns/resolver.c:4651 (libdns.so.1505+0x1a5a0b)
#10 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134 (libisc.so.1504+0x56f36)
#11 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319 (libisc.so.1504+0x56f36)
#12 <null> <null> (libtsan.so.0+0x29b3d)
Mutex M19990 previously acquired by the same thread here:
#0 pthread_mutex_lock <null> (libtsan.so.0+0x3d62b)
#1 dns_resolver_prime /home/ondrej/Projects/bind9/lib/dns/resolver.c:10212 (libdns.so.1505+0x197a82)
#2 dns_view_find /home/ondrej/Projects/bind9/lib/dns/view.c:1113 (libdns.so.1505+0x1f7528)
#3 dbfind_name /home/ondrej/Projects/bind9/lib/dns/adb.c:3678 (libdns.so.1505+0x3f65f)
#4 dns_adb_createfind /home/ondrej/Projects/bind9/lib/dns/adb.c:3030 (libdns.so.1505+0x528d2)
#5 findname /home/ondrej/Projects/bind9/lib/dns/resolver.c:3382 (libdns.so.1505+0x186a47)
#6 fctx_getaddresses /home/ondrej/Projects/bind9/lib/dns/resolver.c:3669 (libdns.so.1505+0x19a933)
#7 fctx_try /home/ondrej/Projects/bind9/lib/dns/resolver.c:4029 (libdns.so.1505+0x1a1a94)
#8 fctx_start /home/ondrej/Projects/bind9/lib/dns/resolver.c:4651 (libdns.so.1505+0x1a5a0b)
#9 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134 (libisc.so.1504+0x56f36)
#10 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319 (libisc.so.1504+0x56f36)
#11 <null> <null> (libtsan.so.0+0x29b3d)
Mutex M19990 acquired here while holding mutex M19989 in thread T9:
#0 pthread_mutex_lock <null> (libtsan.so.0+0x3d62b)
#1 prime_done /home/ondrej/Projects/bind9/lib/dns/resolver.c:10149 (libdns.so.1505+0x1992cf)
#2 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134 (libisc.so.1504+0x56f36)
#3 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319 (libisc.so.1504+0x56f36)
#4 <null> <null> (libtsan.so.0+0x29b3d)
Mutex M19989 previously acquired by the same thread here:
#0 pthread_mutex_lock <null> (libtsan.so.0+0x3d62b)
#1 prime_done /home/ondrej/Projects/bind9/lib/dns/resolver.c:10145 (libdns.so.1505+0x19927e)
#2 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134 (libisc.so.1504+0x56f36)
#3 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319 (libisc.so.1504+0x56f36)
#4 <null> <null> (libtsan.so.0+0x29b3d)
Thread T16 'isc-worker0007' (tid=31710, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x2be1b)
#1 isc_thread_create /home/ondrej/Projects/bind9/lib/isc/pthreads/thread.c:75 (libisc.so.1504+0x7bc54)
#2 isc_taskmgr_create /home/ondrej/Projects/bind9/lib/isc/task.c:1410 (libisc.so.1504+0x59cf3)
#3 create_managers main.c:902 (named+0x1aeec)
#4 setup main.c:1235 (named+0x1aeec)
#5 main main.c:1515 (named+0x1aeec)
Thread T9 'isc-worker0000' (tid=31703, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x2be1b)
#1 isc_thread_create /home/ondrej/Projects/bind9/lib/isc/pthreads/thread.c:75 (libisc.so.1504+0x7bc54)
#2 isc_taskmgr_create /home/ondrej/Projects/bind9/lib/isc/task.c:1410 (libisc.so.1504+0x59cf3)
#3 create_managers main.c:902 (named+0x1aeec)
#4 setup main.c:1235 (named+0x1aeec)
#5 main main.c:1515 (named+0x1aeec)
SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x3d62b) in pthread_mutex_lock
```BIND 9.17 BackburnerDiego dos Santos FronzaDiego dos Santos Fronza