race condition in ticket 144 - 1.1 backport fix? [patch]
Daniel Papasian
daniel at papasian.org
Thu Jan 10 03:31:58 CET 2008
Hello everyone,
First off, thank you all for the work you've put into varnish - the VCL
configuration is clean and exciting, the code is elegantly written, and
the performance I've seen in tests is astounding. I'm looking forward
to putting it into production use in the coming months.
I believe the crash reported in this ticket:
http://varnish.projects.linpro.no/ticket/144
is the race condition mentioned in cache_backend.c with the backend
address list getting deleted while it's being used.
I see that in 1.2 the backend code is significantly different and more
flexible, and I suspect the bug does not exist there. Are there plans
to backport this backend code to 1.1? If not, I have a patch that I
believe fixes the issue on the 1.1 branch by acquiring a lock before the
addr structure is used. I wrote it before seeing that it was fixed in
1.2 and trunk, so the variable names are perhaps a bit off, but I've
made sure the important one (the mutex in the backend struct) is the same.
I've been unable to repeat the crash from the ticket itself so for all I
know I'm not helping at all, but I don't see it start to crash when I
apply the patch and it certainly looks more correct to me.
The patch is here: http://papasian.org/~dannyp/dpapasian-144.patch
--
Daniel Papasian
daniel at papasian.org
More information about the varnish-dev
mailing list