When we receive a cold/discard vmod event, we do a pthread_join with
obj->mtx held.
This creates the possibility for a deadlock if, at the same time we're
about to pthread_join, another thread is in dynamic_update, which tries
to hold the same mutex:
When we receive a cold/discard vmod event, we do a pthread_join with obj->mtx held.
This creates the possibility for a deadlock if, at the same time we're about to pthread_join, another thread is in dynamic_update, which tries to hold the same mutex:
The solution is after we get the DNS results, we do an early check if the obj is still active. If it's not, just exit there and finish the thread.
Since we're dropping the update and exiting the thread, the user can be confused if this is logged in SLT_Error or SLT_VCL_Log.
This fixes varnishcache/varnish-cache#2103