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.
@mbgrydeland your feedback on anything like this would be greatly appreciated.
it has been pointed out that whatever wait might be indefinite, depending on the use case, it it remains undecided if this should be something to address within varnish or from the outside (read: SIGKILL)
using the warn call should allow the stevedore to replace its function pointers with some which always fail, making the problem at least less likely to be hit
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.