diff options
author | Thilo Bangert <bangert@gentoo.org> | 2008-10-23 19:30:05 +0000 |
---|---|---|
committer | Thilo Bangert <bangert@gentoo.org> | 2008-10-23 19:30:05 +0000 |
commit | 648bed7d5388690b913635cf3411a83c96b0c96c (patch) | |
tree | 07c45048ccc5a3bf29d95ee073a8c25e93a8d415 /www-servers/varnish/files | |
parent | amd64/x86 stable, bug #243078 (diff) | |
download | gentoo-2-648bed7d5388690b913635cf3411a83c96b0c96c.tar.gz gentoo-2-648bed7d5388690b913635cf3411a83c96b0c96c.tar.bz2 gentoo-2-648bed7d5388690b913635cf3411a83c96b0c96c.zip |
add ESI core dump fix - dont use default src_compile (thanks tommy)
(Portage version: 2.1.4.5)
Diffstat (limited to 'www-servers/varnish/files')
-rw-r--r-- | www-servers/varnish/files/varnish-2.0.1-fix-ESI-coredump.diff | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/www-servers/varnish/files/varnish-2.0.1-fix-ESI-coredump.diff b/www-servers/varnish/files/varnish-2.0.1-fix-ESI-coredump.diff new file mode 100644 index 000000000000..1dd4e2e59406 --- /dev/null +++ b/www-servers/varnish/files/varnish-2.0.1-fix-ESI-coredump.diff @@ -0,0 +1,86 @@ +diff -Naur varnish-2.0.1.orig/bin/varnishd/cache_hash.c varnish-2.0.1/bin/varnishd/cache_hash.c +--- varnish-2.0.1.orig/bin/varnishd/cache_hash.c 2008-10-17 20:59:49.000000000 +0200 ++++ varnish-2.0.1/bin/varnishd/cache_hash.c 2008-10-23 21:00:29.000000000 +0200 +@@ -266,7 +266,8 @@ + + if (busy_o != NULL) { + /* There are one or more busy objects, wait for them */ +- VTAILQ_INSERT_TAIL(&oh->waitinglist, sp, list); ++ if (sp->esis == 0) ++ VTAILQ_INSERT_TAIL(&oh->waitinglist, sp, list); + sp->objhead = oh; + UNLOCK(&oh->mtx); + return (NULL); +diff -Naur varnish-2.0.1.orig/bin/varnishd/cache_vrt_esi.c varnish-2.0.1/bin/varnishd/cache_vrt_esi.c +--- varnish-2.0.1.orig/bin/varnishd/cache_vrt_esi.c 2008-10-17 20:59:49.000000000 +0200 ++++ varnish-2.0.1/bin/varnishd/cache_vrt_esi.c 2008-10-23 20:59:35.000000000 +0200 +@@ -796,7 +796,6 @@ + void + ESI_Deliver(struct sess *sp) + { +- + struct esi_bit *eb; + struct object *obj; + +@@ -839,7 +838,16 @@ + sp->step = STP_RECV; + http_ForceGet(sp->http); + http_Unset(sp->http, H_Content_Length); +- CNT_Session(sp); ++ while (1) { ++ CNT_Session(sp); ++ if (sp->step == STP_DONE) ++ break; ++ AN(sp->wrk); ++ WSL_Flush(sp->wrk, 0); ++ DSL(0x20, SLT_Debug, sp->id, "loop waiting for ESI"); ++ usleep(10000); ++ } ++ assert(sp->step == STP_DONE); + sp->esis--; + sp->obj = obj; + +diff -Naur varnish-2.0.1.orig/varnishtest/tests/r00345.vtc varnish-2.0.1/varnishtest/tests/r00345.vtc +--- varnish-2.0.1.orig/varnishtest/tests/r00345.vtc 1970-01-01 01:00:00.000000000 +0100 ++++ varnish-2.0.1/varnishtest/tests/r00345.vtc 2008-10-23 20:56:40.000000000 +0200 +@@ -0,0 +1,40 @@ ++# $Id: varnish-2.0.1-fix-ESI-coredump.diff,v 1.1 2008/10/23 19:30:05 bangert Exp $
++
++test "#345, ESI waitinglist trouble"
++
++server s1 {
++ rxreq
++ txresp -body {<esi:include src="someurl">}
++ rxreq
++ sema r1 sync 2
++ delay 1
++ txresp -body {DATA}
++} -start
++
++varnish v1 -arg "-p diag_bitmap=0x20" -vcl+backend {
++ sub vcl_fetch {
++ if (req.url == "/") {
++ esi;
++ }
++ }
++} -start
++
++client c1 {
++ txreq
++ rxresp
++ expect resp.bodylen == 4
++} -start
++
++client c2 {
++ txreq
++ sema r1 sync 2
++ rxresp
++ expect resp.bodylen == 4
++} -run
++
++client c1 {
++ txreq
++ rxresp
++ expect resp.bodylen == 4
++} -run
++
|