From kristian at varnish-software.com Wed May 2 09:54:20 2012 From: kristian at varnish-software.com (Kristian Lyngstol) Date: Wed, 2 May 2012 11:54:20 +0200 Subject: Fix for saintmode In-Reply-To: <57B3EDB1-4BDB-4656-B1F8-50366D970610@fastly.com> References: <57B3EDB1-4BDB-4656-B1F8-50366D970610@fastly.com> Message-ID: <20120502095420.GB3859@freud.kly.no> Greetings, PHK asked me to take a look at this and get back to you about it... There seems to have been some history here I missed. On Tue, Feb 21, 2012 at 01:10:17PM -0800, Artur Bergman wrote: > Saintmode sadly locks on every request to vbe_healthy, this means if > you do req.backend.healty you acquire the lock. > > It does this even if the list is empty. Following patch fix this, it > introduces a tiny race which I am happy to live with. > > --- a/varnish-cache/bin/varnishd/cache_backend.c > +++ b/varnish-cache/bin/varnishd/cache_backend.c > @@ -266,7 +266,7 @@ vbe_Healthy(double now, uintptr_t target, struct backend *backend) > threshold = backend->saintmode_threshold; > > /* Saintmode is disabled */ > - if (threshold == 0) > + if (threshold == 0 || VTAILQ_EMPTY(&backend->troublelist)) > return (1); > > /* No need to test if we don't have an object head to test against. This is already in master... Not sure what this is about, but I sense a misunderstanding? - Kristian From jocelyn.delarosa at smartjog.com Thu May 3 12:15:09 2012 From: jocelyn.delarosa at smartjog.com (Jocelyn De La Rosa) Date: Thu, 03 May 2012 14:15:09 +0200 Subject: [PATCH][varnish3.0.2-streaming] Release the stream_busyobj if we go to error while another thread is streaming Message-ID: <4FA276CD.4040302@smartjog.com> Hi, Here's a patch that release the stream_busyobj from the sess in cnt_error. So if the object is currently fetched (and streamed) for another client, varnish will properly deliver the error and varnish wont die. It happened to me when we did a PURGE request on a object that was fetched at the same time. Using the following vcl: sub vcl_fetch { set beresp.do_stream = true; } sub vcl_hit { if (req.request == "PURGE") { purge; error 200 "Purged."; } } ----- Varnish died: Child (1290) died signal=6 Child (1290) Panic message: Assert error in RES_StreamWrite(), cache_response.c line 444: Condition(stlen <= st->len) not true. ... Full trace here: http://pastebin.com/DaqDZ9U6 I hope it's the right way to fix it, Cheers, -- Jocelyn De La Rosa - Developer, Research& Engineering SmartJog | www.smartjog.com 27 Blvd Hippolyte Marqu?s, 94200 Ivry-sur-Seine, France -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Release-the-stream_busyobj-if-we-go-to-error-while-a.patch Type: text/x-patch Size: 1021 bytes Desc: not available URL: From martin at varnish-software.com Tue May 8 09:08:02 2012 From: martin at varnish-software.com (Martin Blix Grydeland) Date: Tue, 8 May 2012 11:08:02 +0200 Subject: Patch set for aiding in vmod building against installed (and packaged) Varnish instances Message-ID: Attached is a patch set for the Varnish build parts, to aid in compiling and using out-of-tree vmods against an installed or packaged Varnish instance. The patch set will: Fix a installed directory structure bug from the trunk source tree reorganization Install some semi-private non-api header files (e.g. cache.h) that are needed to build vmods in /usr/share/varnish/include. Rename the vmod interface utlitity to 'vmodtool.py', and add it as an install target. Add a varnishapi-uninstalled.pc pkgconfig file for building vmods against an uninstalled tree. Regards, Martin Blix Grydeland -- Martin Blix Grydeland Varnish Software AS -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Make-the-installed-headers-be-nobase.patch Type: application/octet-stream Size: 777 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-Move-lib-libvmod_std-vmod.py-to-lib-libvcl-vmodtool..patch Type: application/octet-stream Size: 19493 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0003-Install-vmodtool.py-in-pkgdatadir.patch Type: application/octet-stream Size: 670 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0004-Install-headers-needed-for-vmod-compilation-in.patch Type: application/octet-stream Size: 3268 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0005-Add-a-varnishapi-uninstalled.pc-file-for-use-by-out-.patch Type: application/octet-stream Size: 1468 bytes Desc: not available URL: From martin at varnish-software.com Tue May 8 12:24:47 2012 From: martin at varnish-software.com (Martin Blix Grydeland) Date: Tue, 8 May 2012 14:24:47 +0200 Subject: [PATCH 1/2] Fix vmod_log (VRT_StringList returns end of string, not beginning) Message-ID: <1336479888-4745-1-git-send-email-martin@varnish-software.com> --- lib/libvmod_std/vmod_std.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/libvmod_std/vmod_std.c b/lib/libvmod_std/vmod_std.c index 5b5c0aa..8ae9ec1 100644 --- a/lib/libvmod_std/vmod_std.c +++ b/lib/libvmod_std/vmod_std.c @@ -147,19 +147,18 @@ vmod_random(struct sess *sp, double lo, double hi) void __match_proto__() vmod_log(struct sess *sp, const char *fmt, ...) { - char *p; unsigned u; va_list ap; txt t; u = WS_Reserve(sp->req->ws, 0); - p = sp->req->ws->f; + t.b = sp->req->ws->f; va_start(ap, fmt); - p = VRT_StringList(p, u, fmt, ap); + t.e = VRT_StringList(t.b, u, fmt, ap); va_end(ap); - if (p != NULL) { - t.b = p; - t.e = strchr(p, '\0'); + if (t.e != NULL) { + assert(t.e > t.b); + t.e--; VSLbt(sp->req->vsl, SLT_VCL_Log, t); } WS_Release(sp->req->ws, 0); -- 1.7.4.1 From martin at varnish-software.com Tue May 8 12:24:48 2012 From: martin at varnish-software.com (Martin Blix Grydeland) Date: Tue, 8 May 2012 14:24:48 +0200 Subject: [PATCH 2/2] Don't consider a vcc expr to be constant after vcc_expr_tostring. In-Reply-To: <1336479888-4745-1-git-send-email-martin@varnish-software.com> References: <1336479888-4745-1-git-send-email-martin@varnish-software.com> Message-ID: <1336479888-4745-2-git-send-email-martin@varnish-software.com> Avoids vcc errors from constructs like "std.log("Test: " + 1);" --- lib/libvcl/vcc_expr.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/lib/libvcl/vcc_expr.c b/lib/libvcl/vcc_expr.c index 30e63d9..19a455c 100644 --- a/lib/libvcl/vcc_expr.c +++ b/lib/libvcl/vcc_expr.c @@ -434,8 +434,10 @@ vcc_expr_tostring(struct expr **e, enum var_type fmt) case TIME: p = "VRT_time_string(sp, \v1)"; break; default: break; } - if (p != NULL) + if (p != NULL) { *e = vcc_expr_edit(fmt, p, *e, NULL); + (*e)->constant = 0; + } } /*-------------------------------------------------------------------- -- 1.7.4.1 From daghf at varnish-software.com Wed May 9 11:05:47 2012 From: daghf at varnish-software.com (Dag Haavi Finstad) Date: Wed, 9 May 2012 13:05:47 +0200 Subject: [PATCH] Fix for #1073 Message-ID: Hi Enclosed is a patch with fix & test for #1073. Reviewed by Kristian. -- Dag Haavi Finstad -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fix-for-1073.patch Type: application/octet-stream Size: 2309 bytes Desc: not available URL: From tfheen at varnish-software.com Wed May 9 12:04:58 2012 From: tfheen at varnish-software.com (Tollef Fog Heen) Date: Wed, 9 May 2012 14:04:58 +0200 Subject: Patch set for aiding in vmod building against installed (and packaged) Varnish instances In-Reply-To: References: Message-ID: <20120509120458.GB14434@err.no> ]] Martin Blix Grydeland > Attached is a patch set for the Varnish build parts, to aid in compiling > and using out-of-tree vmods against an installed or packaged Varnish > instance. I think this makes a lot of sense, so +1 from me, please commit unless you get any protests from anybody else. -- Tollef Fog Heen Technical lead, Varnish Software t: +47 21 98 92 64 From tfheen at varnish-software.com Wed May 9 12:12:25 2012 From: tfheen at varnish-software.com (Tollef Fog Heen) Date: Wed, 9 May 2012 14:12:25 +0200 Subject: Minimum version of curl for libvmod-curl In-Reply-To: <8349678DF4CCC3428201CED9DF7B4D9C11EF66D7@richter.lild01.pictime.fr> References: <8349678DF4CCC3428201CED9DF7B4D9C11EF66D7@richter.lild01.pictime.fr> Message-ID: <20120509121225.GC14434@err.no> ]] Delacroix, Gauthier Hi, sorry for not seeing your email earlier. > Which is the minimum version to use ? (I have 7.15.5 on CentOS 5) Seems like the timeout options were added in 7.16.2 -- Tollef Fog Heen Technical lead, Varnish Software t: +47 21 98 92 64 From phk at phk.freebsd.dk Thu May 10 07:27:13 2012 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Thu, 10 May 2012 07:27:13 +0000 Subject: Patch set for aiding in vmod building against installed (and packaged) Varnish instances In-Reply-To: Your message of "Tue, 08 May 2012 11:08:02 +0200." Message-ID: <31129.1336634833@critter.freebsd.dk> In message , Martin Blix Grydeland writes: >Attached is a patch set for the Varnish build parts, to aid in compiling >and using out-of-tree vmods against an installed or packaged Varnish >instance. I don't really have an opinion here, but I notice that we (still!) have no docs at all for our install-strategy. I'm not looking for a big bulky thing, just a one-pager which says "Varnish installs these files these places for theses reasons." -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From phk at phk.freebsd.dk Thu May 10 07:43:38 2012 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Thu, 10 May 2012 07:43:38 +0000 Subject: [PATCH 1/2] Fix vmod_log (VRT_StringList returns end of string, not beginning) In-Reply-To: Your message of "Tue, 08 May 2012 14:24:47 +0200." <1336479888-4745-1-git-send-email-martin@varnish-software.com> Message-ID: <40280.1336635818@critter.freebsd.dk> In message <1336479888-4745-1-git-send-email-martin at varnish-software.com>, Mart in Blix Grydeland writes: Please add a ticket + vtc case, so we keep it from reappearing. >--- > lib/libvmod_std/vmod_std.c | 11 +++++------ > 1 files changed, 5 insertions(+), 6 deletions(-) > >diff --git a/lib/libvmod_std/vmod_std.c b/lib/libvmod_std/vmod_std.c >index 5b5c0aa..8ae9ec1 100644 >--- a/lib/libvmod_std/vmod_std.c >+++ b/lib/libvmod_std/vmod_std.c >@@ -147,19 +147,18 @@ vmod_random(struct sess *sp, double lo, double hi) > void __match_proto__() > vmod_log(struct sess *sp, const char *fmt, ...) > { >- char *p; > unsigned u; > va_list ap; > txt t; > > u = WS_Reserve(sp->req->ws, 0); >- p = sp->req->ws->f; >+ t.b = sp->req->ws->f; > va_start(ap, fmt); >- p = VRT_StringList(p, u, fmt, ap); >+ t.e = VRT_StringList(t.b, u, fmt, ap); > va_end(ap); >- if (p != NULL) { >- t.b = p; >- t.e = strchr(p, '\0'); >+ if (t.e != NULL) { >+ assert(t.e > t.b); >+ t.e--; > VSLbt(sp->req->vsl, SLT_VCL_Log, t); > } > WS_Release(sp->req->ws, 0); >-- >1.7.4.1 > > >_______________________________________________ >varnish-dev mailing list >varnish-dev at varnish-cache.org >https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev > -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From phk at phk.freebsd.dk Thu May 10 07:43:59 2012 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Thu, 10 May 2012 07:43:59 +0000 Subject: [PATCH 2/2] Don't consider a vcc expr to be constant after vcc_expr_tostring. In-Reply-To: Your message of "Tue, 08 May 2012 14:24:48 +0200." <1336479888-4745-2-git-send-email-martin@varnish-software.com> Message-ID: <40290.1336635839@critter.freebsd.dk> In message <1336479888-4745-2-git-send-email-martin at varnish-software.com>, Mart in Blix Grydeland writes: Also here: Please add a ticket + vtc test case to prevent regression. >Avoids vcc errors from constructs like "std.log("Test: " + 1);" >--- > lib/libvcl/vcc_expr.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > >diff --git a/lib/libvcl/vcc_expr.c b/lib/libvcl/vcc_expr.c >index 30e63d9..19a455c 100644 >--- a/lib/libvcl/vcc_expr.c >+++ b/lib/libvcl/vcc_expr.c >@@ -434,8 +434,10 @@ vcc_expr_tostring(struct expr **e, enum var_type fmt) > case TIME: p = "VRT_time_string(sp, \v1)"; break; > default: break; > } >- if (p != NULL) >+ if (p != NULL) { > *e = vcc_expr_edit(fmt, p, *e, NULL); >+ (*e)->constant = 0; >+ } > } > > /*-------------------------------------------------------------------- >-- >1.7.4.1 > > >_______________________________________________ >varnish-dev mailing list >varnish-dev at varnish-cache.org >https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev > -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From phk at phk.freebsd.dk Thu May 10 07:52:52 2012 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Thu, 10 May 2012 07:52:52 +0000 Subject: [PATCH] Fix for #1073 In-Reply-To: Your message of "Wed, 09 May 2012 13:05:47 +0200." Message-ID: <50071.1336636372@critter.freebsd.dk> In message , Dag Haavi Finstad writes: >Enclosed is a patch with fix & test for #1073. OK. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From phk at phk.freebsd.dk Thu May 10 09:26:06 2012 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Thu, 10 May 2012 09:26:06 +0000 Subject: [PATCH] Improved hash director behavior In-Reply-To: Your message of "Mon, 12 Mar 2012 16:21:28 +0100." <4F5E1478.9090107@wavecdn.com> Message-ID: <92626.1336641966@critter.freebsd.dk> In message <4F5E1478.9090107 at wavecdn.com>, WaveCDN Development writes: >This patch improves the behavior of the hash director when some of its >backends get unhealty. The hash range of each unhealthy backend is >splitted and mapped to the remaining healthy backends. Thus, not the >complete hash range is beeing remapped and backends will perform better. Sorry about the delay. I have done it slightly differently in [master] 0352ea2... Feel free to yell at me if that is not good enough. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From phk at phk.freebsd.dk Thu May 10 09:57:51 2012 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Thu, 10 May 2012 09:57:51 +0000 Subject: deactivate obj updates In-Reply-To: Your message of "Tue, 10 Jan 2012 07:52:11 PST." <18AD381627308B47A6AED6D2E69D552F18E68857F0@IE2RD2XVS201.red002.local> Message-ID: <17300.1336643871@critter.freebsd.dk> In message <18AD381627308B47A6AED6D2E69D552F18E68857F0 at IE2RD2XVS201.red002.loca l>, Uxio Faria Giraldez writes: Sorry about the delay on this. I have decided that obj.hits and obj.lastuse are too useful to be ditched entirely, but instead I have added a parameter "obj_readonly" which disbles updating them. Hope this works for you. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From varnish at bsdchicks.com Thu May 10 15:27:25 2012 From: varnish at bsdchicks.com (Rogier R. Mulhuijzen) Date: Thu, 10 May 2012 17:27:25 +0200 (CEST) Subject: deactivate obj updates In-Reply-To: <17300.1336643871@critter.freebsd.dk> References: <17300.1336643871@critter.freebsd.dk> Message-ID: <20120510172430.K37583@ishtar.drwilco.net> Shouldn't these really go into objcore? I agree they're useful, but writes are reduced by quite a bit by moving these in a situation where not everything fits in memory. On Thu, 10 May 2012, Poul-Henning Kamp wrote: > In message <18AD381627308B47A6AED6D2E69D552F18E68857F0 at IE2RD2XVS201.red002.loca > l>, Uxio Faria Giraldez writes: > > Sorry about the delay on this. > > I have decided that obj.hits and obj.lastuse are too useful to be > ditched entirely, but instead I have added a parameter "obj_readonly" > which disbles updating them. > > Hope this works for you. > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk at FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. > > _______________________________________________ > varnish-dev mailing list > varnish-dev at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev > From phk at phk.freebsd.dk Thu May 10 21:41:10 2012 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Thu, 10 May 2012 21:41:10 +0000 Subject: deactivate obj updates In-Reply-To: Your message of "Thu, 10 May 2012 17:27:25 +0200." <20120510172430.K37583@ishtar.drwilco.net> Message-ID: <1590.1336686070@critter.freebsd.dk> In message <20120510172430.K37583 at ishtar.drwilco.net>, "Rogier R. Mulhuijzen" w rites: >Shouldn't these really go into objcore? They are only usable when you have an object in hand, whereas objcore is all about not needing to do that for operations on other ojects. The other problem is, as usual, -spersistent -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From martin at varnish-software.com Wed May 16 12:05:15 2012 From: martin at varnish-software.com (Martin Blix Grydeland) Date: Wed, 16 May 2012 14:05:15 +0200 Subject: [PATCH] Remember to deref our objcore refs on fetch failures and rearm the exp_timer on fetch failure ttl changes. Message-ID: <1337169915-19489-1-git-send-email-martin@varnish-software.com> Fixes: #1138 --- bin/varnishd/cache/cache_center.c | 4 +- bin/varnishd/cache/cache_fetch.c | 3 +- bin/varnishtest/tests/r01138.vtc | 45 +++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 bin/varnishtest/tests/r01138.vtc diff --git a/bin/varnishd/cache/cache_center.c b/bin/varnishd/cache/cache_center.c index 332211a..335bda7 100644 --- a/bin/varnishd/cache/cache_center.c +++ b/bin/varnishd/cache/cache_center.c @@ -323,7 +323,7 @@ cnt_deliver(struct sess *sp, struct worker *wrk, struct req *req) assert(bo->state >= BOS_FAILED); if (bo->state == BOS_FAILED) { - req->obj = NULL; + HSH_Deref(&wrk->stats, NULL, &req->obj); VBO_DerefBusyObj(wrk, &req->busyobj); req->err_code = 503; sp->step = STP_ERROR; @@ -901,7 +901,7 @@ cnt_fetchbody(struct sess *sp, struct worker *wrk, struct req *req) VBO_DerefBusyObj(wrk, &req->busyobj); } else if (bo->state == BOS_FAILED) { /* handle early failures */ - req->obj = NULL; + HSH_Deref(&wrk->stats, NULL, &req->obj); VBO_DerefBusyObj(wrk, &req->busyobj); req->err_code = 503; sp->step = STP_ERROR; diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c index ee9147d..7cc1a90 100644 --- a/bin/varnishd/cache/cache_fetch.c +++ b/bin/varnishd/cache/cache_fetch.c @@ -647,7 +647,8 @@ FetchBody(struct worker *wrk, void *priv) if (bo->state == BOS_FAILED) { wrk->stats.fetch_failed++; VDI_CloseFd(&bo->vbc); - obj->exp.ttl = -1.; + EXP_Clr(&obj->exp); + EXP_Rearm(obj); obj->len = 0; } else { assert(bo->state == BOS_FETCHING); diff --git a/bin/varnishtest/tests/r01138.vtc b/bin/varnishtest/tests/r01138.vtc new file mode 100644 index 0000000..33f0559 --- /dev/null +++ b/bin/varnishtest/tests/r01138.vtc @@ -0,0 +1,45 @@ +varnishtest "Leaking objects on fetch failures - #1138" + +server s1 { + rxreq + expect req.url == "/test1" + txresp -nolen -hdr "Content-Length: 1024" -bodylen 512 + close + + accept + rxreq + expect req.url == "/test2" + delay 0.2 + txresp -nolen -hdr "Content-Length: 1024" -bodylen 512 +} -start + +varnish v1 -arg "-p expiry_sleep=0.1 -p default_keep=0 -p default_grace=0" -vcl+backend { + sub vcl_fetch { + if (req.url ~ "/test1") { + # Having no streaming will test error condition + # in cnt_fetchbody() + set beresp.do_stream = false; + } else if (req.url ~ "/test2") { + # Doing streaming and slow delivery will test error + # condition in cnt_delivery() + set beresp.do_stream = true; + } + } +} -start + +client c1 { + txreq -url "/test1" + rxresp + expect resp.status == 503 +} -run + +client c2 { + txreq -url "/test2" + rxresp + expect resp.status == 503 +} -run + +# Allow exp_timer to do it's job +delay 1 + +varnish v1 -expect n_object == 0 -- 1.7.4.1 From martin at varnish-software.com Fri May 18 14:34:30 2012 From: martin at varnish-software.com (Martin Blix Grydeland) Date: Fri, 18 May 2012 16:34:30 +0200 Subject: [PATCH] Change the ttl when salvaging an object on transient storage before creating the object, so that the change actually takes place. Message-ID: <1337351670-17117-1-git-send-email-martin@varnish-software.com> Fixes: #1140 --- bin/varnishd/cache/cache_center.c | 4 ++-- bin/varnishtest/tests/r01140.vtc | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 bin/varnishtest/tests/r01140.vtc diff --git a/bin/varnishd/cache/cache_center.c b/bin/varnishd/cache/cache_center.c index 335bda7..5344467 100644 --- a/bin/varnishd/cache/cache_center.c +++ b/bin/varnishd/cache/cache_center.c @@ -813,12 +813,12 @@ cnt_fetchbody(struct sess *sp, struct worker *wrk, struct req *req) * Try to salvage the transaction by allocating a * shortlived object on Transient storage. */ - req->obj = STV_NewObject(bo, &req->objcore, TRANSIENT_STORAGE, - l, nhttp); if (bo->exp.ttl > cache_param->shortlived) bo->exp.ttl = cache_param->shortlived; bo->exp.grace = 0.0; bo->exp.keep = 0.0; + req->obj = STV_NewObject(bo, &req->objcore, TRANSIENT_STORAGE, + l, nhttp); } bo->stats = NULL; if (req->obj == NULL) { diff --git a/bin/varnishtest/tests/r01140.vtc b/bin/varnishtest/tests/r01140.vtc new file mode 100644 index 0000000..483e0d6 --- /dev/null +++ b/bin/varnishtest/tests/r01140.vtc @@ -0,0 +1,31 @@ +varnishtest "Transient-salvaged objects ttl should be shortened - #1140" + +server s1 { + # This response should almost completely fill the storage + rxreq + txresp -bodylen 1048050 + # The next one should not fit in the storage, ending up in transient + rxreq + txresp -bodylen 1024 +} -start + +varnish v1 -arg "-p expiry_sleep=0.01 -p nuke_limit=0 -p shortlived=1" -storage "-smalloc,1m" -vcl+backend { +} -start + +client c1 { + txreq -url /url1 + rxresp + expect resp.status == 200 + expect resp.bodylen == 1048050 + + txreq -url /url2 + rxresp + expect resp.status == 200 + expect resp.bodylen == 1024 +} -run + +varnish v1 -expect SMA.Transient.g_bytes != 0 + +delay 1.5 + +varnish v1 -expect SMA.Transient.g_bytes == 0 -- 1.7.9.5 From varnish-dev at projects.linpro.no Mon May 28 23:05:30 2012 From: varnish-dev at projects.linpro.no (varnish-dev at projects.linpro.no) Date: Mon, 28 May 2012 18:05:30 -0500 Subject: Your monthly income can be increased to 1950 dollars paid. Message-ID: <7075211929.DC637A17628744@mnbhvo.jamygmpxx.org> Good afternoon! You already have a current job, but you are searching for ways to increase your income funds? Would you like to make an additional income without investing even a single cent? Our company is a leader in providing consulting services and financial support to privately owned investment organizations. And currently we are recruiting an additional personnel offering part time employment to all talented and professional individuals. We offer a decent job which doesn't confront with any moral or ethical principles. It will not matter what gender, age, economic status you are ? the main conditions for employment are conscientiousness and diligence. For many of our applicants this work began with partial employment and was combined with their main jobs, but after 2 weeks most of them decided to work for our company on a full time basis and earn up to 2000 EUR per month. Are you still debating? We assure you that we will exert every effort to discredit all your doubts and help you understand the whole process in detail before putting you into work. Should you find this interesting please contact us immediately and you will receive an application form and more detailed information regarding this job offer. Our experienced HR representatives will listen carefully to your employment needs and then work diligently to match your skills and qualifications to the duties which will be assigned to you. Whether you're looking for temporary, temporary-to-permanent or permanent opportunities do not miss your chance and send us your contact details (e.g. Phone number, email address, first and last name ) to apply now. Please send the request to our email answer at fasteurojobs.com,and I will answer you personally as soon as possible Looking forward to hearing from you soon. From varnish-dev at projects.linpro.no Tue May 29 04:28:27 2012 From: varnish-dev at projects.linpro.no (varnish-dev at projects.linpro.no) Date: Mon, 28 May 2012 22:28:27 -0600 Subject: Take a spare three-hour work week in our clinic and get 580 dollars. Message-ID: <4FC44D7E.602090@projects.linpro.no> Good afternoon! You already have a current job, but you are searching for ways to increase your income funds? Would you like to make an additional income without investing even a single cent? Our company is a leader in providing consulting services and financial support to privately owned investment organizations. And currently we are recruiting an additional personnel offering part time employment to all talented and professional individuals. We offer a decent job which doesn't confront with any moral or ethical principles. It will not matter what gender, age, economic status you are ? the main conditions for employment are conscientiousness and diligence. For many of our applicants this work began with partial employment and was combined with their main jobs, but after 2 weeks most of them decided to work for our company on a full time basis and earn up to 2000 EUR per month. Are you still debating? We assure you that we will exert every effort to discredit all your doubts and help you understand the whole process in detail before putting you into work. Should you find this interesting please contact us immediately and you will receive an application form and more detailed information regarding this job offer. Our experienced HR representatives will listen carefully to your employment needs and then work diligently to match your skills and qualifications to the duties which will be assigned to you. Whether you're looking for temporary, temporary-to-permanent or permanent opportunities do not miss your chance and send us your contact details (e.g. Phone number, email address, first and last name ) to apply now. Please send the request to our email admin at fasteurojobs.com,and I will answer you personally as soon as possible Looking forward to hearing from you soon. From martin at varnish-software.com Thu May 31 11:29:35 2012 From: martin at varnish-software.com (Martin Blix Grydeland) Date: Thu, 31 May 2012 13:29:35 +0200 Subject: Persistent storage backend patches Message-ID: Hi, I'm doing some work on the persistent storage backend of Varnish. See the wiki page at https://www.varnish-cache.org/trac/wiki/ImprovedPersistencefor the details. Attached is an early preview of the work to share the progress and direction of the work. At this stage most of milestone 1 is implemented (with the exception of segment list syncing without holding locks). Regards, Martin Blix Grydeland -- Martin Blix Grydeland Varnish Software AS -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: persistent.tar.gz Type: application/x-gzip Size: 11578 bytes Desc: not available URL: