]> git.ipfire.org Git - thirdparty/bind9.git/commit
Remove .listener member of controlistener struct
authorOndřej Surý <ondrej@sury.org>
Mon, 21 Sep 2020 08:16:36 +0000 (10:16 +0200)
committerOndřej Surý <ondrej@sury.org>
Mon, 21 Sep 2020 08:21:04 +0000 (10:21 +0200)
commitee40b963278d5a75a7aed7e0aca8f59f50503531
tree3bb29bce139f28c5166e739c8db3767e08438bb5
parent78304690b73ce8eaedda80a1fca44d4f073861f8
Remove .listener member of controlistener struct

In the new netmgr code, the .listener member was mostly functionally
only duplicating the .exiting member and was unneeded.  This also
resolves following ThreadSanitizer (harmless) warning:

    WARNING: ThreadSanitizer: data race
      Write of size 1 at 0x000000000001 by thread T1:
#0 control_senddone bin/named/controlconf.c:257:22
#1 tcp_send_cb lib/isc/netmgr/tcp.c:1027:2
#2 uv__write_callbacks /home/ondrej/Projects/tsan/libuv/src/unix/stream.c:953:7
#3 uv__stream_io /home/ondrej/Projects/tsan/libuv/src/unix/stream.c:1330:5
#4 uv__run_pending /home/ondrej/Projects/tsan/libuv/src/unix/core.c:812:5
#5 uv_run /home/ondrej/Projects/tsan/libuv/src/unix/core.c:377:19
#6 nm_thread lib/isc/netmgr/netmgr.c:500:11

      Previous write of size 1 at 0x000000000001 by thread T2:
#0 control_senddone bin/named/controlconf.c:257:22
#1 tcp_send_cb lib/isc/netmgr/tcp.c:1027:2
#2 uv__write_callbacks /home/ondrej/Projects/tsan/libuv/src/unix/stream.c:953:7
#3 uv__stream_io /home/ondrej/Projects/tsan/libuv/src/unix/stream.c:1330:5
#4 uv__run_pending /home/ondrej/Projects/tsan/libuv/src/unix/core.c:812:5
#5 uv_run /home/ondrej/Projects/tsan/libuv/src/unix/core.c:377:19
#6 nm_thread lib/isc/netmgr/netmgr.c:500:11

      Location is heap block of size 265 at 0x000000000009 allocated by thread T3:
#0 malloc <null>
#1 default_memalloc lib/isc/mem.c:713:8
#2 mem_get lib/isc/mem.c:622:8
#3 isc___mem_get lib/isc/mem.c:1044:9
#4 isc__mem_get lib/isc/mem.c:2432:10
#5 add_listener bin/named/controlconf.c:1133:13
#6 named_controls_configure bin/named/controlconf.c:1331:6
#7 load_configuration bin/named/server.c:9133:2
#8 run_server bin/named/server.c:9771:2
#9 dispatch lib/isc/task.c:1152:7
#10 run lib/isc/task.c:1344:2

      Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:73:8
#2 isc_nm_start lib/isc/netmgr/netmgr.c:223:3
#3 create_managers bin/named/main.c:909:15
#4 setup bin/named/main.c:1223:11
#5 main bin/named/main.c:1523:2

      Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:73:8
#2 isc_nm_start lib/isc/netmgr/netmgr.c:223:3
#3 create_managers bin/named/main.c:909:15
#4 setup bin/named/main.c:1223:11
#5 main bin/named/main.c:1523:2

      Thread T3 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:73:8
#2 isc_taskmgr_create lib/isc/task.c:1434:3
#3 create_managers bin/named/main.c:915:11
#4 setup bin/named/main.c:1223:11
#5 main bin/named/main.c:1523:2

    SUMMARY: ThreadSanitizer: data race bin/named/controlconf.c:257:22 in control_senddone
bin/named/controlconf.c