first deadlock from comment 27 fixed/workedaround.
Next deadlock is:
thread A is the same as comment 27, holding view->lock and waiting for the bucket lock in dns_resolver_shutdown.
now, thread B calls dispatch->authvalidated->nsecvalidate->create_fetch->dns_resolver_createfetch->dns_resolver_createfetch3 which does:
LOCK(&res->buckets[bucketnum].lock);
then calls fctx_create->fcount_incr which does:
LOCK(&fctx->res->lock);
where fctx->res is the view. So again, deadlock.
first deadlock from comment 27 fixed/workedaround.
Next deadlock is:
thread A is the same as comment 27, holding view->lock and waiting for the bucket lock in dns_resolver_ shutdown.
now, thread B calls dispatch- >authvalidated- >nsecvalidate- >create_ fetch-> dns_resolver_ createfetch- >dns_resolver_ createfetch3 which does:
LOCK( &res->buckets[ bucketnum] .lock);
then calls fctx_create- >fcount_ incr which does:
LOCK( &fctx-> res->lock) ;
where fctx->res is the view. So again, deadlock.