Cycles in lock order graphs [v9.11]
dns_view_findzonecut2 vs dns_resolver_createfetch3
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_mutex_lock <null>
#1 dns_view_findzonecut2 lib/dns/view.c:1300:2
#2 dns_view_findzonecut lib/dns/view.c:1261:9
#3 fctx_create lib/dns/resolver.c:4459:13
#4 dns_resolver_createfetch3 lib/dns/resolver.c:9630:12
#5 query_recurse bin/named/query.c:4368:11
#6 rpz_rrset_find bin/named/query.c:4677:13
#7 rpz_rewrite bin/named/query.c:5707:13
#8 query_find bin/named/query.c:7441:13
#9 query_resume bin/named/query.c:4164:12
#10 dispatch lib/isc/task.c:1157:7
#11 run lib/isc/task.c:1331:2
Mutex M1 previously acquired by the same thread here:
#0 pthread_mutex_lock <null>
#1 dns_resolver_createfetch3 lib/dns/resolver.c:9587:2
#2 query_recurse bin/named/query.c:4368:11
#3 rpz_rrset_find bin/named/query.c:4677:13
#4 rpz_rewrite bin/named/query.c:5707:13
#5 query_find bin/named/query.c:7441:13
#6 query_resume bin/named/query.c:4164:12
#7 dispatch lib/isc/task.c:1157:7
#8 run lib/isc/task.c:1331:2
Mutex M1 acquired here while holding mutex M2 in thread T1:
#0 pthread_mutex_lock <null>
#1 dns_resolver_shutdown lib/dns/resolver.c:9399:4
#2 view_flushanddetach lib/dns/view.c:603:4
#3 dns_view_detach lib/dns/view.c:654:2
#4 ns_client_endrequest bin/named/client.c:884:3
#5 exit_check bin/named/client.c:516:3
#6 ns_client_detach bin/named/client.c:3690:8
#7 query_find bin/named/query.c
#8 query_resume bin/named/query.c:4164:12
#9 dispatch lib/isc/task.c:1157:7
#10 run lib/isc/task.c:1331:2
Mutex M2 previously acquired by the same thread here:
#0 pthread_mutex_lock <null>
#1 view_flushanddetach lib/dns/view.c:601:3
#2 dns_view_detach lib/dns/view.c:654:2
#3 ns_client_endrequest bin/named/client.c:884:3
#4 exit_check bin/named/client.c:516:3
#5 ns_client_detach bin/named/client.c:3690:8
#6 query_find bin/named/query.c
#7 query_resume bin/named/query.c:4164:12
#8 dispatch lib/isc/task.c:1157:7
#9 run lib/isc/task.c:1331:2
Thread T1 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:60:8
#2 isc__taskmgr_create lib/isc/task.c:1468:7
#3 isc_taskmgr_create lib/isc/task.c:2109:11
#4 create_managers bin/named/./main.c:886:11
#5 setup bin/named/./main.c:1305:11
#6 main bin/named/./main.c:1556:2
SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) in pthread_mutex_lock
dns_view_find2 vs dns_adb_createfind2
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock)
Cycle in lock order graph: M1 (0x000000000000) => M2 (0x000000000001) => M3 (0x000000000000) => M1
Mutex M2 acquired here while holding mutex M1 in thread T1:
#0 pthread_mutex_lock <null>
#1 dns_view_find2 lib/dns/view.c:1038:2
#2 dbfind_name lib/dns/adb.c:3719:11
#3 dns_adb_createfind2 lib/dns/adb.c:3093:12
#4 dns_adb_createfind lib/dns/adb.c:2936:10
#5 notify_find_address lib/dns/zone.c:11137:11
#6 zone_notify lib/dns/zone.c:11593:3
#7 zone_maintenance lib/dns/zone.c:10268:4
#8 zone_timer lib/dns/zone.c:13113:2
#9 dispatch lib/isc/task.c:1157:7
#10 run lib/isc/task.c:1331:2
Mutex M1 previously acquired by the same thread here:
#0 pthread_mutex_lock <null>
#1 find_name_and_lock lib/dns/adb.c:2048:3
#2 dns_adb_createfind2 lib/dns/adb.c:3027:12
#3 dns_adb_createfind lib/dns/adb.c:2936:10
#4 notify_find_address lib/dns/zone.c:11137:11
#5 zone_notify lib/dns/zone.c:11593:3
#6 zone_maintenance lib/dns/zone.c:10268:4
#7 zone_timer lib/dns/zone.c:13113:2
#8 dispatch lib/isc/task.c:1157:7
#9 run lib/isc/task.c:1331:2
Mutex M3 acquired here while holding mutex M2 in thread T2:
#0 pthread_mutex_lock <null>
#1 dns_adb_shutdown lib/dns/adb.c:2909:2
#2 view_flushanddetach lib/dns/view.c:605:4
#3 dns_view_detach lib/dns/view.c:654:2
#4 ns_client_endrequest bin/named/client.c:884:3
#5 exit_check bin/named/client.c:516:3
#6 ns_client_detach bin/named/client.c:3690:8
#7 query_find bin/named/query.c
#8 query_resume bin/named/query.c:4164:12
#9 dispatch lib/isc/task.c:1157:7
#10 run lib/isc/task.c:1331:2
Mutex M2 previously acquired by the same thread here:
#0 pthread_mutex_lock <null>
#1 view_flushanddetach lib/dns/view.c:601:3
#2 dns_view_detach lib/dns/view.c:654:2
#3 ns_client_endrequest bin/named/client.c:884:3
#4 exit_check bin/named/client.c:516:3
#5 ns_client_detach bin/named/client.c:3690:8
#6 query_find bin/named/query.c
#7 query_resume bin/named/query.c:4164:12
#8 dispatch lib/isc/task.c:1157:7
#9 run lib/isc/task.c:1331:2
Mutex M1 acquired here while holding mutex M3 in thread T3:
#0 pthread_mutex_lock <null>
#1 shutdown_names lib/dns/adb.c:1231:3
#2 shutdown_stage2 lib/dns/adb.c:2894:8
#3 dispatch lib/isc/task.c:1157:7
#4 run lib/isc/task.c:1331:2
Mutex M3 previously acquired by the same thread here:
#0 pthread_mutex_lock <null>
#1 shutdown_stage2 lib/dns/adb.c:2891:2
#2 dispatch lib/isc/task.c:1157:7
#3 run lib/isc/task.c:1331:2
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:60:8
#2 isc__taskmgr_create lib/isc/task.c:1468:7
#3 isc_taskmgr_create lib/isc/task.c:2109:11
#4 create_managers bin/named/./main.c:886:11
#5 setup bin/named/./main.c:1305:11
#6 main bin/named/./main.c:1556:2
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:60:8
#2 isc__taskmgr_create lib/isc/task.c:1468:7
#3 isc_taskmgr_create lib/isc/task.c:2109:11
#4 create_managers bin/named/./main.c:886:11
#5 setup bin/named/./main.c:1305:11
#6 main bin/named/./main.c:1556:2
Thread T3 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:60:8
#2 isc__taskmgr_create lib/isc/task.c:1468:7
#3 isc_taskmgr_create lib/isc/task.c:2109:11
#4 create_managers bin/named/./main.c:886:11
#5 setup bin/named/./main.c:1305:11
#6 main bin/named/./main.c:1556:2
SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) in pthread_mutex_lock
dns_view_find2 vs dns_adb_createfind2
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock)
Cycle in lock order graph: M1 (0x000000000000) => M2 (0x000000000001) => M3 (0x000000000000) => M1
Mutex M2 acquired here while holding mutex M1 in thread T1:
#0 pthread_mutex_lock <null>
#1 dns_view_find2 lib/dns/view.c:1038:2
#2 dbfind_name lib/dns/adb.c:3719:11
#3 dns_adb_createfind2 lib/dns/adb.c:3133:12
#4 findname lib/dns/resolver.c:3166:11
#5 fctx_getaddresses lib/dns/resolver.c:3462:3
#6 fctx_try lib/dns/resolver.c:3819:12
#7 fctx_timeout lib/dns/resolver.c:4038:4
#8 dispatch lib/isc/task.c:1157:7
#9 run lib/isc/task.c:1331:2
Mutex M1 previously acquired by the same thread here:
#0 pthread_mutex_lock <null>
#1 find_name_and_lock lib/dns/adb.c:2048:3
#2 dns_adb_createfind2 lib/dns/adb.c:3027:12
#3 findname lib/dns/resolver.c:3166:11
#4 fctx_getaddresses lib/dns/resolver.c:3462:3
#5 fctx_try lib/dns/resolver.c:3819:12
#6 fctx_timeout lib/dns/resolver.c:4038:4
#7 dispatch lib/isc/task.c:1157:7
#8 run lib/isc/task.c:1331:2
Mutex M3 acquired here while holding mutex M2 in thread T2:
#0 pthread_mutex_lock <null>
#1 dns_adb_shutdown lib/dns/adb.c:2909:2
#2 view_flushanddetach lib/dns/view.c:605:4
#3 dns_view_detach lib/dns/view.c:654:2
#4 ns_client_endrequest bin/named/client.c:884:3
#5 exit_check bin/named/client.c:516:3
#6 ns_client_detach bin/named/client.c:3690:8
#7 query_find bin/named/query.c
#8 query_resume bin/named/query.c:4164:12
#9 dispatch lib/isc/task.c:1157:7
#10 run lib/isc/task.c:1331:2
Mutex M2 previously acquired by the same thread here:
#0 pthread_mutex_lock <null>
#1 view_flushanddetach lib/dns/view.c:601:3
#2 dns_view_detach lib/dns/view.c:654:2
#3 ns_client_endrequest bin/named/client.c:884:3
#4 exit_check bin/named/client.c:516:3
#5 ns_client_detach bin/named/client.c:3690:8
#6 query_find bin/named/query.c
#7 query_resume bin/named/query.c:4164:12
#8 dispatch lib/isc/task.c:1157:7
#9 run lib/isc/task.c:1331:2
Mutex M1 acquired here while holding mutex M3 in thread T2:
#0 pthread_mutex_lock <null>
#1 shutdown_names lib/dns/adb.c:1231:3
#2 shutdown_stage2 lib/dns/adb.c:2894:8
#3 dispatch lib/isc/task.c:1157:7
#4 run lib/isc/task.c:1331:2
Mutex M3 previously acquired by the same thread here:
#0 pthread_mutex_lock <null>
#1 shutdown_stage2 lib/dns/adb.c:2891:2
#2 dispatch lib/isc/task.c:1157:7
#3 run lib/isc/task.c:1331:2
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:60:8
#2 isc__taskmgr_create lib/isc/task.c:1468:7
#3 isc_taskmgr_create lib/isc/task.c:2109:11
#4 create_managers bin/named/./main.c:886:11
#5 setup bin/named/./main.c:1305:11
#6 main bin/named/./main.c:1556:2
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:60:8
#2 isc__taskmgr_create lib/isc/task.c:1468:7
#3 isc_taskmgr_create lib/isc/task.c:2109:11
#4 create_managers bin/named/./main.c:886:11
#5 setup bin/named/./main.c:1305:11
#6 main bin/named/./main.c:1556:2
SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) in pthread_mutex_lock