varnishcache / varnish-cache

Varnish Cache source code repository
https://www.varnish-cache.org
Other
3.56k stars 366 forks source link

Add VCL_Shutdown to wait for VCL references to vanish #4078

Open nigoroll opened 4 months ago

nigoroll commented 4 months ago

A panic with SLASH/fellow exposed a problem in Varnish-Cache: We shut down stevedores unconditionally, no matter if still used or not. While an argument could be made that stevedores should wait for all object references to be returned before actually shutting down (which SLASH/fellow does, but limited to a fixed number of retries), this would not have helped in this particular case, because a .free_space variable was queried which, by definition, requires no reference on stevedore objects whatsoever.

So this PR adds VCL_Shutdown() to wait for all VCL references to vanish before closing stevedores.

nigoroll commented 4 months ago

A lot of tests on CCI are timing out, which is interesting because I did not see this locally.

nigoroll commented 4 months ago

bugwash