Skip to content
  • Mark Andrews's avatar
    Complete the isc_nmhandle_detach() in the worker thread. · f95ba8aa
    Mark Andrews authored
    isc_nmhandle_detach() needs to complete in the same thread
    as shutdown_walk_cb() to avoid a race.  Clear the caller's
    pointer then pass control to the worker if necessary.
    
        WARNING: ThreadSanitizer: data race
        Write of size 8 at 0x000000000001 by thread T1:
        #0 isc_nmhandle_detach lib/isc/netmgr/netmgr.c:1258:15
        #1 control_command bin/named/controlconf.c:388:3
        #2 dispatch lib/isc/task.c:1152:7
        #3 run lib/isc/task.c:1344:2
    
        Previous read of size 8 at 0x000000000001 by thread T2:
        #0 isc_nm_pauseread lib/isc/netmgr/netmgr.c:1449:33
        #1 recv_data lib/isccc/ccmsg.c:109:2
        #2 isc__nm_tcp_shutdown lib/isc/netmgr/tcp.c:1157:4
        #3 shutdown_walk_cb lib/isc/netmgr/netmgr.c:1515:3
        #4 uv_walk <null>
        #5 process_queue lib/isc/netmgr/netmgr.c:659:4
        #6 process_normal_queue lib/isc/netmgr/netmgr.c:582:10
        #7 process_queues lib/isc/netmgr/netmgr.c:590:8
        #8 async_cb lib/isc/netmgr/netmgr.c:548:2
        #9 <null> <null>
    f95ba8aa