Closed nigoroll closed 1 year ago
I believe this is a https://github.com/varnishcache/varnish-cache bug. Suppose the following happens:
vbp_task()
finishes with vt->running = 0
and a heap insert. The vbp_cond
is signaled under the lock, but now instead of vbp_thread()
waking up first, VBP_Remove()
gets the lock and reaches assert(vt->heap_idx == VBH_NOIDX);
before the racing vbp_thread()
deleted the heap.
This is unlikely to happen with static backends, because for those, the probe is stopped via the vcl temperature before they get removed.
Seen with ad2285bb5915ceee6949f02bdca15333bdd159d5 on varnish-cache 69fe28ffd981a3714f32faa54a4c47c6c5f1753e, which is based on 48681cc872c17d339bb6ddb47304db0685e844ba: