Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a race between VBP_Remove() and vbp_thread()
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. Fixes nigoroll/libvmod-dynamic#100
- Loading branch information