This is a deadlock in bind9 code; thread A runs ns_client_endrequest->dns_view_detach->view_flushanddetach, which includes:
LOCK(&view->lock);
if (!RESSHUTDOWN(view))
dns_resolver_shutdown(view->resolver);
inside dns_resolver_shutdown, for each resolver bucket, it does:
for (i = 0; i < res->nbuckets; i++) {
LOCK(&res->buckets[i].lock);
at this point, one of the bucket locks is held, and thread A is blocked
holding view->lock, but waiting for the view->resolver->bucket[i].lock.
meanwhile, thread B runs dispatch->validated, and does:
bucketnum = fctx->bucketnum;
LOCK(&res->buckets[bucketnum].lock);
then while still holding that lock calls
dns_validator_destroy->destroy->dns_view_weakdetach
which does:
LOCK(&view->lock);
leaving thread A and thread B in a deadlock, with thread A waiting for the
bucket.lock that thread B holds, and thread B waiting for the view->lock that
thread A holds.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1710278
Title:
[2.3a1] named stuck on reload, DNS broken
To manage notifications about this bug go to:
https://bugs.launchpad.net/bind/+bug/1710278/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
