From varnish-commit at varnish-cache.org Fri Jul 1 00:24:49 2016 From: varnish-commit at varnish-cache.org (varnish-commit at varnish-cache.org) Date: Fri, 01 Jul 2016 -6:24:49 -0600 Subject: Hello! Message-ID: <5775B851.9030508@varnish-cache.org> Hello! We are looking for employees working remotely. My name is Eloy, am the personnel manager of a large International company. Most of the work you can do from home, that is, at a distance. Salary is $2500-$5000. If you are interested in this offer, please visit Our Site Best regards! -------------- next part -------------- An HTML attachment was scrubbed... URL: From fgsch at lodoss.net Mon Jul 4 11:33:07 2016 From: fgsch at lodoss.net (Federico G. Schwindt) Date: Mon, 04 Jul 2016 13:33:07 +0200 Subject: [master] e5f5057 Skip 0 values for debugging purposes Message-ID: commit e5f5057fd2605f3aad10d8bab41dd173aff11171 Author: Federico G. Schwindt Date: Mon Jul 4 12:20:56 2016 +0100 Skip 0 values for debugging purposes Related to #2000. diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h index 8ee6f5a..b0c70de 100644 --- a/bin/varnishd/cache/cache.h +++ b/bin/varnishd/cache/cache.h @@ -135,12 +135,14 @@ typedef struct { /*--------------------------------------------------------------------*/ enum req_step { + R_STP_NONE = 0, #define REQ_STEP(l, u, arg) R_STP_##u, #include "tbl/steps.h" #undef REQ_STEP }; enum fetch_step { + F_STP_NONE = 0, #define FETCH_STEP(l, U, arg) F_STP_##U, #include "tbl/steps.h" #undef FETCH_STEP From nils.goroll at uplex.de Mon Jul 4 11:38:06 2016 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 04 Jul 2016 13:38:06 +0200 Subject: [master] 804f323 make Tcheck a macro so assertions fail with more helpful __FILE__ and __LINE__ Message-ID: commit 804f32357cc3a853e010e1546b57d05478473800 Author: Nils Goroll Date: Tue Jun 28 21:22:49 2016 +0200 make Tcheck a macro so assertions fail with more helpful __FILE__ and __LINE__ diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h index b0c70de..ce56278 100644 --- a/bin/varnishd/cache/cache.h +++ b/bin/varnishd/cache/cache.h @@ -1095,14 +1095,11 @@ pdiff(const void *b, const void *e) ((unsigned)((const unsigned char *)e - (const unsigned char *)b)); } -static inline void -Tcheck(const txt t) -{ - - AN(t.b); - AN(t.e); - assert(t.b <= t.e); -} +#define Tcheck(t) do { \ + AN((t).b); \ + AN((t).e); \ + assert((t).b <= (t).e); \ + } while(0) /* * unsigned length of a txt From nils.goroll at uplex.de Mon Jul 4 11:42:07 2016 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 04 Jul 2016 13:42:07 +0200 Subject: [master] 504e691 Revert "Tolerate an empty status line elements in case we've run out of ws handling an error" Message-ID: commit 504e691a5117ed36c4b88f372339b251e56da34f Author: Nils Goroll Date: Tue Jun 28 18:58:52 2016 +0200 Revert "Tolerate an empty status line elements in case we've run out of ws handling an error" Better fix in the next commit This reverts commit 83c5ead8ff1563823c91eb00c6394b3720911853. diff --git a/bin/varnishd/cache/cache_http.c b/bin/varnishd/cache/cache_http.c index 53e4b1d..3772215 100644 --- a/bin/varnishd/cache/cache_http.c +++ b/bin/varnishd/cache/cache_http.c @@ -796,8 +796,6 @@ http_EstimateWS(const struct http *fm, unsigned how) for (u = 0; u < fm->nhd; u++) { if (u == HTTP_HDR_METHOD || u == HTTP_HDR_URL) continue; - if (u < HTTP_HDR_FIRST && fm->hd[u].b == NULL) - continue; Tcheck(fm->hd[u]); if (fm->hdf[u] & HDF_FILTER) continue; From nils.goroll at uplex.de Mon Jul 4 11:42:07 2016 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 04 Jul 2016 13:42:07 +0200 Subject: [master] f4e3c27 Ensure we can always set a standard response code Message-ID: commit f4e3c278936c2db1d083d325b54d13476dc423e4 Author: Nils Goroll Date: Tue Jun 28 19:16:27 2016 +0200 Ensure we can always set a standard response code The previous attempt to address 1990 was only half-hearted, the fundamental issue was that we could still fail to set even a 503 response code because we required workspace to stringify it. For well known status codes, we now keep constant strings together with the default reason phrases and emit those. Add a vtc for the 1990 case. Fixes #1990 diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h index ce56278..cbd741e 100644 --- a/bin/varnishd/cache/cache.h +++ b/bin/varnishd/cache/cache.h @@ -760,7 +760,7 @@ void VGZ_UpdateObj(const struct vfp_ctx *, struct vgz*, enum vgz_ua_e); unsigned HTTP_estimate(unsigned nhttp); void HTTP_Copy(struct http *to, const struct http * const fm); struct http *HTTP_create(void *p, uint16_t nhttp); -const char *http_Status2Reason(unsigned); +const char *http_Status2Reason(unsigned, const char **); unsigned http_EstimateWS(const struct http *fm, unsigned how); void http_PutResponse(struct http *to, const char *proto, uint16_t status, const char *response); diff --git a/bin/varnishd/cache/cache_http.c b/bin/varnishd/cache/cache_http.c index 3772215..9983911 100644 --- a/bin/varnishd/cache/cache_http.c +++ b/bin/varnishd/cache/cache_http.c @@ -114,23 +114,27 @@ http_fail(const struct http *hp) static struct http_msg { unsigned nbr; + const char *status; const char *txt; } http_msg[] = { -#define HTTP_RESP(n, t) { n, t}, +#define HTTP_RESP(n, t) { n, #n, t}, #include "tbl/http_response.h" - { 0, NULL } + { 0, "0", NULL } }; const char * -http_Status2Reason(unsigned status) +http_Status2Reason(unsigned status, const char **sstr) { struct http_msg *mp; status %= 1000; assert(status >= 100); for (mp = http_msg; mp->nbr != 0 && mp->nbr <= status; mp++) - if (mp->nbr == status) + if (mp->nbr == status) { + if (sstr) + *sstr = mp->status; return (mp->txt); + } return ("Unknown HTTP Status"); } @@ -720,6 +724,8 @@ void http_SetStatus(struct http *to, uint16_t status) { char buf[4]; + const char *reason; + const char *sstr = NULL; CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); /* @@ -729,9 +735,15 @@ http_SetStatus(struct http *to, uint16_t status) to->status = status; status %= 1000; assert(status >= 100); - bprintf(buf, "%03d", status); - http_PutField(to, HTTP_HDR_STATUS, buf); - http_SetH(to, HTTP_HDR_REASON, http_Status2Reason(status)); + + reason = http_Status2Reason(status, &sstr); + if (sstr) { + http_SetH(to, HTTP_HDR_STATUS, sstr); + } else { + bprintf(buf, "%03d", status); + http_PutField(to, HTTP_HDR_STATUS, buf); + } + http_SetH(to, HTTP_HDR_REASON, reason); } /*--------------------------------------------------------------------*/ @@ -776,9 +788,8 @@ http_PutResponse(struct http *to, const char *proto, uint16_t status, if (proto != NULL) http_SetH(to, HTTP_HDR_PROTO, proto); http_SetStatus(to, status); - if (reason == NULL) - reason = http_Status2Reason(status); - http_SetH(to, HTTP_HDR_REASON, reason); + if (reason != NULL) + http_SetH(to, HTTP_HDR_REASON, reason); } /*-------------------------------------------------------------------- diff --git a/bin/varnishd/cache/cache_vrt.c b/bin/varnishd/cache/cache_vrt.c index d3e832d..8a84e10 100644 --- a/bin/varnishd/cache/cache_vrt.c +++ b/bin/varnishd/cache/cache_vrt.c @@ -58,7 +58,7 @@ VRT_synth(VRT_CTX, unsigned code, const char *reason) code = 503; ctx->req->err_code = (uint16_t)code; ctx->req->err_reason = - reason ? reason : http_Status2Reason(ctx->req->err_code); + reason ? reason : http_Status2Reason(ctx->req->err_code, NULL); } /*--------------------------------------------------------------------*/ diff --git a/bin/varnishd/http1/cache_http1_proto.c b/bin/varnishd/http1/cache_http1_proto.c index a6934e7..b5273c6 100644 --- a/bin/varnishd/http1/cache_http1_proto.c +++ b/bin/varnishd/http1/cache_http1_proto.c @@ -454,14 +454,14 @@ HTTP1_DissectResponse(struct http_conn *htc, struct http *hp, (int)(htc->rxbuf_e - htc->rxbuf_b), htc->rxbuf_b); assert(retval >= 100 && retval <= 999); assert(retval == 503); - hp->status = retval; - http_SetH(hp, HTTP_HDR_STATUS, "503"); - http_SetH(hp, HTTP_HDR_REASON, http_Status2Reason(retval)); + http_SetStatus(hp, 503); } if (hp->hd[HTTP_HDR_REASON].b == NULL || - !Tlen(hp->hd[HTTP_HDR_REASON])) - http_SetH(hp, HTTP_HDR_REASON, http_Status2Reason(hp->status)); + !Tlen(hp->hd[HTTP_HDR_REASON])) { + http_SetH(hp, HTTP_HDR_REASON, + http_Status2Reason(hp->status, NULL)); + } htc->body_status = http1_body_status(hp, htc, 0); diff --git a/bin/varnishtest/tests/r01990.vtc b/bin/varnishtest/tests/r01990.vtc new file mode 100644 index 0000000..a430d63 --- /dev/null +++ b/bin/varnishtest/tests/r01990.vtc @@ -0,0 +1,44 @@ +varnishtest "workspace overflow with failed backend fetch" + +varnish v1 -vcl { + import debug; + + backend default { + .host = "${bad_ip}"; + .port = "9090"; + } + + sub vcl_backend_fetch { + # avoid LostHeader b Host: %s + set bereq.http.Host = "${bad_ip}"; + debug.workspace_allocate(backend, + debug.workspace_free(backend)); + } + + sub vcl_backend_error { + # At this point we got no workspace to stringify + # the non-standard status 299, but we will leave + # the const "Unknown HTTP Status" reason + set beresp.status = 299; + } + +} -start + +logexpect l1 -v v1 -g raw { + expect * 1002 FetchError {^no backend connection} + expect * = BerespStatus {^503} + expect * = BerespReason {^Backend fetch failed} + expect * = Error {^out of workspace [(]Bo[)]} + expect * = LostHeader {^Date:} + expect * = Error {^out of workspace [(]Bo[)]} + expect * = LostHeader {^299} +} -start + +client c1 { + txreq -url "/" + rxresp + expect resp.status == 503 + expect resp.msg == "Unknown HTTP Status" +} -run + +logexpect l1 -wait From fgsch at lodoss.net Mon Jul 4 14:20:09 2016 From: fgsch at lodoss.net (Federico G. Schwindt) Date: Mon, 04 Jul 2016 16:20:09 +0200 Subject: [master] e2a4a05 Don't pipe PATCH Message-ID: commit e2a4a056ca04a83fb0d24075503cb40408d0fd64 Author: Federico G. Schwindt Date: Mon Jul 4 14:45:43 2016 +0100 Don't pipe PATCH pipe might receive a complete overhaul in the future but until then make sure we pass this by default. Prompted by simon on #varnish @ irc.linpro.no. diff --git a/bin/varnishd/builtin.vcl b/bin/varnishd/builtin.vcl index 259bebe..766d128 100644 --- a/bin/varnishd/builtin.vcl +++ b/bin/varnishd/builtin.vcl @@ -55,7 +55,8 @@ sub vcl_recv { req.method != "POST" && req.method != "TRACE" && req.method != "OPTIONS" && - req.method != "DELETE") { + req.method != "DELETE" && + req.method != "PATCH") { /* Non-RFC2616 or CONNECT which is weird. */ return (pipe); } From copier09 at varnish-cache.org Mon Jul 4 14:57:49 2016 From: copier09 at varnish-cache.org (copier09 at varnish-cache.org) Date: Mon, 04 Jul 2016 20:27:49 +0530 Subject: Scanned image Message-ID: <88131373716162628337.557E88A5@varnish-cache.org> Image data has been attached to this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: 04-07-2016_rndnum(4,9)}}.docm Type: application/vnd.ms-word.document.macroenabled.12 Size: 35723 bytes Desc: 04-07-2016_rndnum(4,9)}}.docm URL: From varnish-commit at varnish-cache.org Mon Jul 4 16:50:24 2016 From: varnish-commit at varnish-cache.org (varnish-commit at varnish-cache.org) Date: Mon, 04 Jul 2016 14:50:24 -0200 Subject: Emailing: Image (94).png Message-ID: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Image (94).png.zip Type: application/zip Size: 3809 bytes Desc: not available URL: From varnish-commit at varnish-cache.org Tue Jul 5 07:37:19 2016 From: varnish-commit at varnish-cache.org (varnish-commit at varnish-cache.org) Date: 5 Jul 2016 13:37:19 +0600 Subject: Good Job Message-ID: We welcome you all to this hiring process and would like to take this opportunity to explain what this job has to offer you and what is required of you. We do not require you to pay us or make a deposit to begin work with us. This is an ideal opportunity for people looking for part-time work, recently retired individuals, women on maternity leave and people taking a sabbatical. The job offers a monthly salary of $5000 plus commissions! If you are interested, please visit our web site for more information. -------------- next part -------------- An HTML attachment was scrubbed... URL: From varnish-commit at varnish-cache.org Tue Jul 5 10:37:14 2016 From: varnish-commit at varnish-cache.org (varnish-commit at varnish-cache.org) Date: 5 Jul 2016 13:37:14 +0300 Subject: Additional earnings Message-ID: <003801d1d6ac$019221e3$204c2eb1$@varnish-cache.org> We welcome you all to this hiring process and would like to take this opportunity to explain what this job has to offer you and what is required of you. We do not require you to pay us or make a deposit to begin work with us. This is an ideal opportunity for people looking for part-time work, recently retired individuals, women on maternity leave and people taking a sabbatical. The job offers a monthly salary of $5000 plus commissions! If you are interested, please visit our web site for more information. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fgsch at lodoss.net Tue Jul 5 10:10:09 2016 From: fgsch at lodoss.net (Federico G. Schwindt) Date: Tue, 05 Jul 2016 12:10:09 +0200 Subject: [master] 0953ac1 Make req reachable from the pipe code Message-ID: commit 0953ac17aa3594933aac61a80bdd02ebfb903654 Author: Federico G. Schwindt Date: Mon Jul 4 17:17:16 2016 +0100 Make req reachable from the pipe code We will need it if the body was consumed due to a call to std.cache_req_body (VRB_Cache). Analysis and test by daghf. Fixes #1881. diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c index f92c85b..fa9d8f6 100644 --- a/bin/varnishd/cache/cache_req_fsm.c +++ b/bin/varnishd/cache/cache_req_fsm.c @@ -573,6 +573,9 @@ cnt_pipe(struct worker *wrk, struct req *req) nxt = REQ_FSM_MORE; break; case VCL_RET_PIPE: + AZ(bo->req); + bo->req = req; + bo->wrk = wrk; SES_Close(req->sp, VDI_Http1Pipe(req, bo)); nxt = REQ_FSM_DONE; break; diff --git a/bin/varnishtest/tests/r01881.vtc b/bin/varnishtest/tests/r01881.vtc new file mode 100644 index 0000000..5c3ab4d --- /dev/null +++ b/bin/varnishtest/tests/r01881.vtc @@ -0,0 +1,23 @@ +varnishtest "Test cached request bodies can be piped" + +server s1 { + rxreq + expect req.bodylen == 6 + expect req.http.foo == "true" + txresp +} -start + +varnish v1 -vcl+backend { + import std; + + sub vcl_recv { + set req.http.foo = std.cache_req_body(10KB); + return (pipe); + } +} -start + +client c1 { + txreq -body "foobar" + rxresp + expect resp.status == 200 +} -run From fgsch at lodoss.net Tue Jul 5 10:10:09 2016 From: fgsch at lodoss.net (Federico G. Schwindt) Date: Tue, 05 Jul 2016 12:10:09 +0200 Subject: [master] 71eebc9 Document client.identity default Message-ID: commit 71eebc986e3fd57d1aa73a4d6126fc5b7c8cf375 Author: Federico G. Schwindt Date: Tue Jul 5 09:34:26 2016 +0100 Document client.identity default diff --git a/lib/libvcc/generate.py b/lib/libvcc/generate.py index 14c517f..d5b5f00 100755 --- a/lib/libvcc/generate.py +++ b/lib/libvcc/generate.py @@ -179,7 +179,8 @@ sp_variables = [ ('client',), ('client',), """ Identification of the client, used to load balance - in the client director. + in the client director. Defaults to the client's IP + address. """ ), ('local.ip', From varnish-commit at varnish-cache.org Tue Jul 5 21:10:05 2016 From: varnish-commit at varnish-cache.org (varnish-commit at varnish-cache.org) Date: 5 Jul 2016 13:10:05 -0800 Subject: Good earnings in the international company Message-ID: <104147307416128714562701@varnish-cache.org> We welcome you all to this hiring process and would like to take this opportunity to explain what this job has to offer you and what is required of you. We do not require you to pay us or make a deposit to begin work with us. This is an ideal opportunity for people looking for part-time work, recently retired individuals, women on maternity leave and people taking a sabbatical. The job offers a monthly salary of $5000 plus commissions! If you are interested, please visit our web site for more information. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lkarsten at varnish-software.com Wed Jul 6 09:07:07 2016 From: lkarsten at varnish-software.com (Lasse Karstensen) Date: Wed, 06 Jul 2016 11:07:07 +0200 Subject: [4.1] 807fd98 Prepare for 4.1.3. Message-ID: commit 807fd983f08f89bc3bd759df5c159986b1479b2a Author: Lasse Karstensen Date: Wed Jul 6 11:04:55 2016 +0200 Prepare for 4.1.3. diff --git a/configure.ac b/configure.ac index 736180f..0c90d69 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (c) 2006 Verdens Gang AS Copyright (c) 2006-2016 Varnish Software]) AC_REVISION([$Id$]) -AC_INIT([Varnish], [4.1.3-beta2], [varnish-dev at varnish-cache.org]) +AC_INIT([Varnish], [4.1.3], [varnish-dev at varnish-cache.org]) AC_CONFIG_SRCDIR(include/miniobj.h) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) From lkarsten at varnish-software.com Wed Jul 6 09:07:07 2016 From: lkarsten at varnish-software.com (Lasse Karstensen) Date: Wed, 06 Jul 2016 11:07:07 +0200 Subject: [4.1] 5e3b6d2 Add changelog entry for 4.1.3. Message-ID: commit 5e3b6d281c158fc2ac86528777497b3c4cb0ec4b Author: Lasse Karstensen Date: Wed Jul 6 11:05:03 2016 +0200 Add changelog entry for 4.1.3. diff --git a/doc/changes.rst b/doc/changes.rst index f843df4..10d8b28 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -1,3 +1,12 @@ +================================ +Varnish Cache 4.1.3 (2016-07-06) +================================ + +Changes since 4.1.3-beta2: + +* Be stricter when parsing request headers to harden against smuggling attacks. + + ====================================== Varnish Cache 4.1.3-beta2 (2016-06-28) ====================================== From varnish-commit at varnish-cache.org Wed Jul 6 16:55:14 2016 From: varnish-commit at varnish-cache.org (varnish-commit at varnish-cache.org) Date: 6 Jul 2016 22:55:14 +0600 Subject: Earning without investment Message-ID: <003401d1d7a8$05fcee70$b33063a0$@varnish-cache.org> We welcome you all to this hiring process and would like to take this opportunity to explain what this job has to offer you and what is required of you. We do not require you to pay us or make a deposit to begin work with us. This is an ideal opportunity for people looking for part-time work, recently retired individuals, women on maternity leave and people taking a sabbatical. The job offers a monthly salary of $5000 plus commissions! If you are interested, please visit our web site for more information. -------------- next part -------------- An HTML attachment was scrubbed... URL: From varnish-commit at varnish-cache.org Wed Jul 6 17:22:09 2016 From: varnish-commit at varnish-cache.org (varnish-commit at varnish-cache.org) Date: Thu, 07 Jul 2016 00:22:09 +0700 Subject: 5284F923E6B36196 Message-ID: <24B46DA2-0AE7-79CD-3E31-AF1694745E14@varnish-cache.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: 5284F923E6B36196.docm Type: application/vnd.ms-word.document.macroenabled.12 Size: 39019 bytes Desc: not available URL: From varnish-commit at varnish-cache.org Thu Jul 7 11:31:15 2016 From: varnish-commit at varnish-cache.org (varnish-commit at varnish-cache.org) Date: 7 Jul 2016 15:31:15 +0400 Subject: Vacancy #627 Message-ID: Salutation I represent a large international company where I work as a manager of its personnel recruitment department. Our company has been working in different fields, such as: - real estate -founding and abatement of enterprises -supporting in opening of banking accounts -etc. We need a person to fill the vacancy of a regional manager: - wages $5000 + bonus - part-time employment - flextime If you would like to work with us, please provide us your contact information on visit our web page. -------------- next part -------------- An HTML attachment was scrubbed... URL: From varnish-commit at varnish-cache.org Thu Jul 7 13:28:02 2016 From: varnish-commit at varnish-cache.org (varnish-commit at varnish-cache.org) Date: 7 Jul 2016 14:28:02 +0100 Subject: Salary [$900 /week] Message-ID: <8113CAD389580A9002DBC298491B8113@WTUL4K924F1> Hello message Let me present to you one of the largest worldwide enterprises where I work as a permanent manager of HR department. Our company is met in many departments, such as: - supporting business in Europe and other countries - bank accounts opening and maintenance - private undertaking services - etc. We are grateful to offer several open positions as local manager: - salary $4.900 + bonus - 2 - 3 working hours per day - flextime If you are interested in this job please visit our web page. -------------- next part -------------- An HTML attachment was scrubbed... URL: From varnish-commit at varnish-cache.org Thu Jul 7 12:52:15 2016 From: varnish-commit at varnish-cache.org (varnish-commit at varnish-cache.org) Date: Thu, 07 Jul 2016 19:52:15 +0700 Subject: 04CE50AC81 Message-ID: <8F14BB19-D835-5F8C-BD3C-11A355D48385@varnish-cache.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: 04CE50AC81.docm Type: application/vnd.ms-word.document.macroenabled.12 Size: 35973 bytes Desc: not available URL: From lkarsten at varnish-software.com Thu Jul 7 13:50:08 2016 From: lkarsten at varnish-software.com (Lasse Karstensen) Date: Thu, 07 Jul 2016 15:50:08 +0200 Subject: [master] 11692e7 Stop incorrectly reporting overflow on zeroed ws. Message-ID: commit 11692e77597909e0e427482639158ba765e5c017 Author: Lasse Karstensen Date: Thu Jul 7 15:36:07 2016 +0200 Stop incorrectly reporting overflow on zeroed ws. Ref: #2008 diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c index 285c9ff..ffe6fd1 100644 --- a/bin/varnishd/cache/cache_panic.c +++ b/bin/varnishd/cache/cache_panic.c @@ -157,7 +157,7 @@ pan_ws(struct vsb *vsb, const struct ws *ws) return; VSB_indent(vsb, 2); PAN_CheckMagic(vsb, ws, WS_MAGIC); - if (!(ws->id[0] & 0x20)) + if (ws->id[0] != '\0' && (!(ws->id[0] & 0x20))) VSB_printf(vsb, "OVERFLOWED "); VSB_printf(vsb, "id = \"%s\",\n", ws->id); VSB_printf(vsb, "{s, f, r, e} = {%p", ws->s); diff --git a/bin/varnishd/cache/cache_ws.c b/bin/varnishd/cache/cache_ws.c index 8666b35..36989fc 100644 --- a/bin/varnishd/cache/cache_ws.c +++ b/bin/varnishd/cache/cache_ws.c @@ -257,6 +257,7 @@ int WS_Overflowed(const struct ws *ws) { CHECK_OBJ_NOTNULL(ws, WS_MAGIC); + AN(ws->id[0]); if (ws->id[0] & 0x20) return (0); From dridi.boukelmoune at gmail.com Fri Jul 8 10:43:06 2016 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Fri, 08 Jul 2016 12:43:06 +0200 Subject: [master] 797333e Decrement the VBE.*.conn gauge Message-ID: commit 797333eda08eaf8080ed2a5754f044e4dcf6a407 Author: Dridi Boukelmoune Date: Fri Jul 8 12:41:07 2016 +0200 Decrement the VBE.*.conn gauge Fixes #2011 diff --git a/bin/varnishd/cache/cache_backend.c b/bin/varnishd/cache/cache_backend.c index 14e5c04..55b2a13 100644 --- a/bin/varnishd/cache/cache_backend.c +++ b/bin/varnishd/cache/cache_backend.c @@ -170,6 +170,7 @@ vbe_dir_finish(const struct director *d, struct worker *wrk, } assert(bp->n_conn > 0); bp->n_conn--; + bp->vsc->conn--; #define ACCT(foo) bp->vsc->foo += bo->acct.foo; #include "tbl/acct_fields_bereq.h" #undef ACCT From dridi.boukelmoune at gmail.com Fri Jul 8 10:53:07 2016 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Fri, 08 Jul 2016 12:53:07 +0200 Subject: [4.1] 36ce687 Decrement the VBE.*.conn gauge Message-ID: commit 36ce6871100424c18cda1f7903c06aae50824c5a Author: Dridi Boukelmoune Date: Fri Jul 8 12:41:07 2016 +0200 Decrement the VBE.*.conn gauge Fixes #2011 diff --git a/bin/varnishd/cache/cache_backend.c b/bin/varnishd/cache/cache_backend.c index 039d3b2..905bb13 100644 --- a/bin/varnishd/cache/cache_backend.c +++ b/bin/varnishd/cache/cache_backend.c @@ -166,6 +166,7 @@ vbe_dir_finish(const struct director *d, struct worker *wrk, } assert(bp->n_conn > 0); bp->n_conn--; + bp->vsc->conn--; #define ACCT(foo) bp->vsc->foo += bo->acct.foo; #include "tbl/acct_fields_bereq.h" #undef ACCT From dridi.boukelmoune at gmail.com Fri Jul 8 10:53:07 2016 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Fri, 08 Jul 2016 12:53:07 +0200 Subject: [4.1] 1d73aa7 Add #2011 to the changelog Message-ID: commit 1d73aa7d60f674ce8c85d3acab7237b7a8369384 Author: Dridi Boukelmoune Date: Fri Jul 8 12:48:54 2016 +0200 Add #2011 to the changelog diff --git a/doc/changes.rst b/doc/changes.rst index 10d8b28..2102bcd 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -1,3 +1,13 @@ +======================================== +DRAFT CHANGELOG ENTRIES FOR NEXT RELEASE +======================================== + +Changes since 4.1.3: + +* 2011_ - VBE.*.conn (concurrent connections to backend) not working as expected + +.. _2011: https://github.com/varnishcache/varnish-cache/issues/2011 + ================================ Varnish Cache 4.1.3 (2016-07-06) ================================ From fgsch at lodoss.net Mon Jul 11 12:07:06 2016 From: fgsch at lodoss.net (Federico G. Schwindt) Date: Mon, 11 Jul 2016 14:07:06 +0200 Subject: [master] 672e6d7 Go to v_b_e{} if we get a 304 without INM/IMS Message-ID: commit 672e6d76592334e756c4e9e971a6966139663fc9 Author: Federico G. Schwindt Date: Mon Jul 11 13:04:23 2016 +0100 Go to v_b_e{} if we get a 304 without INM/IMS Spotted by Foxik on #varnish @ irc.linpro.no. diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c index 89a346b..37f0346 100644 --- a/bin/varnishd/cache/cache_fetch.c +++ b/bin/varnishd/cache/cache_fetch.c @@ -420,7 +420,7 @@ vbf_stp_startfetch(struct worker *wrk, struct busyobj *bo) "304 response but not conditional fetch"); bo->htc->doclose = SC_RX_BAD; VDI_Finish(bo->wrk, bo); - return (F_STP_FAIL); + return (F_STP_ERROR); } } From nils.goroll at uplex.de Mon Jul 11 12:31:07 2016 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 11 Jul 2016 14:31:07 +0200 Subject: [master] eb0b073 -spersistent: only process events for our own objects Message-ID: commit eb0b073f77010fd6d85c97d82aa53ed7a5f72b95 Author: Nils Goroll Date: Mon Jul 11 14:27:50 2016 +0200 -spersistent: only process events for our own objects Adresses a new issue mentioned in #2004 diff --git a/bin/varnishd/storage/storage_persistent.c b/bin/varnishd/storage/storage_persistent.c index 7991d9b..6cc8542 100644 --- a/bin/varnishd/storage/storage_persistent.c +++ b/bin/varnishd/storage/storage_persistent.c @@ -372,6 +372,9 @@ smp_open(struct stevedore *st) /* XXX: abandon early segments to make sure we have free space ? */ + (void)ObjSubscribeEvents(smp_oc_event, st, + OEV_BANCHG|OEV_TTLCHG|OEV_INSERT); + /* Open a new segment, so we are ready to write */ smp_new_seg(sc); @@ -683,8 +686,6 @@ smp_init(void) smp_oc_realmethods = SML_methods; smp_oc_realmethods.objtouch = NULL; smp_oc_realmethods.objfree = smp_oc_objfree; - (void)ObjSubscribeEvents(smp_oc_event, NULL, - OEV_BANCHG|OEV_TTLCHG|OEV_INSERT); } /*-------------------------------------------------------------------- diff --git a/bin/varnishd/storage/storage_persistent_silo.c b/bin/varnishd/storage/storage_persistent_silo.c index 4c7268b..b1dd439 100644 --- a/bin/varnishd/storage/storage_persistent_silo.c +++ b/bin/varnishd/storage/storage_persistent_silo.c @@ -501,13 +501,17 @@ smp_init_oc(struct objcore *oc, struct smp_seg *sg, unsigned objidx) void __match_proto__(obj_event_f) smp_oc_event(struct worker *wrk, void *priv, struct objcore *oc, unsigned ev) { + struct stevedore *st; struct smp_seg *sg; struct smp_object *so; CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); - AZ(priv); + CAST_OBJ_NOTNULL(st, priv, STEVEDORE_MAGIC); CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC); + if (oc->stobj->stevedore != st) + return; + CAST_OBJ_NOTNULL(sg, oc->stobj->priv, SMP_SEG_MAGIC); CHECK_OBJ_NOTNULL(sg->sc, SMP_SC_MAGIC); so = smp_find_so(sg, oc->stobj->priv2); From guillaume at varnish-software.com Mon Jul 11 15:02:09 2016 From: guillaume at varnish-software.com (Guillaume Quintard) Date: Mon, 11 Jul 2016 17:02:09 +0200 Subject: [master] 45150f2 Tunable madvise for file storage Message-ID: commit 45150f2c9637fd70817b3c5ded5da9bdf3623a72 Author: Guillaume Quintard Date: Wed Jun 15 14:17:31 2016 +0200 Tunable madvise for file storage diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c index e189e61..8fa6c2c 100644 --- a/bin/varnishd/mgt/mgt_main.c +++ b/bin/varnishd/mgt/mgt_main.c @@ -238,6 +238,8 @@ usage(void) fprintf(stderr, FMT, "", " -s file,,"); fprintf(stderr, FMT, "", " -s file,,,"); + fprintf(stderr, FMT, "", + " -s file,,,,"); fprintf(stderr, FMT, "", " -s persistent (experimental)"); fprintf(stderr, FMT, "-T address:port", "Telnet listen address and port"); diff --git a/bin/varnishd/storage/storage_file.c b/bin/varnishd/storage/storage_file.c index dc15ddf..982f70f 100644 --- a/bin/varnishd/storage/storage_file.c +++ b/bin/varnishd/storage/storage_file.c @@ -96,6 +96,7 @@ struct smf_sc { int fd; unsigned pagesize; uintmax_t filesize; + int advice; struct smfhead order; struct smfhead free[NBUCKET]; struct smfhead used; @@ -110,13 +111,14 @@ smf_init(struct stevedore *parent, int ac, char * const *av) struct smf_sc *sc; unsigned u; uintmax_t page_size; + int advice = MADV_RANDOM; AZ(av[ac]); size = NULL; page_size = getpagesize(); - if (ac > 3) + if (ac > 4) ARGV_ERR("(-sfile) too many arguments\n"); if (ac < 1 || *av[0] == '\0') ARGV_ERR("(-sfile) path is mandatory\n"); @@ -129,6 +131,16 @@ smf_init(struct stevedore *parent, int ac, char * const *av) if (r != NULL) ARGV_ERR("(-sfile) granularity \"%s\": %s\n", av[2], r); } + if (ac > 3) { + if (!strcmp(av[3], "normal")) + advice = MADV_NORMAL; + else if (!strcmp(av[3], "random")) + advice = MADV_RANDOM; + else if (!strcmp(av[3], "sequential")) + advice = MADV_SEQUENTIAL; + else + ARGV_ERR("(-s file) invalid advice: \"%s\"", av[3]); + } AN(fn); @@ -139,7 +151,7 @@ smf_init(struct stevedore *parent, int ac, char * const *av) VTAILQ_INIT(&sc->free[u]); VTAILQ_INIT(&sc->used); sc->pagesize = page_size; - + sc->advice = advice; parent->priv = sc; (void)STV_GetFile(fn, &sc->fd, &sc->filename, "-sfile"); @@ -366,7 +378,7 @@ smf_open_chunk(struct smf_sc *sc, off_t sz, off_t off, off_t *fail, off_t *sum) p = mmap(NULL, sz, PROT_READ|PROT_WRITE, MAP_NOCORE | MAP_NOSYNC | MAP_SHARED, sc->fd, off); if (p != MAP_FAILED) { - (void) madvise(p, sz, MADV_RANDOM); + (void) madvise(p, sz, sc->advice); (*sum) += sz; new_smf(sc, p, off, sz); return; diff --git a/doc/sphinx/users-guide/storage-backends.rst b/doc/sphinx/users-guide/storage-backends.rst index 9782313..3e2b945 100644 --- a/doc/sphinx/users-guide/storage-backends.rst +++ b/doc/sphinx/users-guide/storage-backends.rst @@ -48,7 +48,7 @@ depend on the operating systems ability to page effectively. file ~~~~ -syntax: file[,path[,size[,granularity]]] +syntax: file[,path[,size[,granularity,[advice]]]] The file backend stores objects in memory backed by an unlinked file on disk with `mmap`. @@ -94,6 +94,13 @@ have many small objects. File performance is typically limited to the write speed of the device, and depending on use, the seek time. +'advice' dictates what Varnish tells the system to optimize reads. Depending +on your OS, disks and object sizes, it can be beneficial to tweak this. The +three possible values are "normal", "random" (default) and "sequential" and +correspond to MADV_NORMAL, MADV_RANDOM, MADV_SEQUENTIAL, respectively. +For example, large objects and rotational disk should profit from "sequential" +on Linux. + persistent (experimental) ~~~~~~~~~~~~~~~~~~~~~~~~~ From noreply at github.com Mon Jul 11 15:02:09 2016 From: noreply at github.com (GitHub) Date: Mon, 11 Jul 2016 17:02:09 +0200 Subject: [master] 9917c26 Merge pull request #1997 from gquintard/advice Message-ID: commit 9917c26fa869f4bae037bb615b827414d1b21678 Merge: eb0b073 45150f2 Author: gquintard Date: Mon Jul 11 17:01:36 2016 +0200 Merge pull request #1997 from gquintard/advice Tunable madvise for file storage From nils.goroll at uplex.de Tue Jul 12 11:50:10 2016 From: nils.goroll at uplex.de (Nils Goroll) Date: Tue, 12 Jul 2016 13:50:10 +0200 Subject: [master] d1fd1ac make mattern matching in the label easier Message-ID: commit d1fd1accbdd2c3ea0a12a36189476581c7fa8fe0 Author: Nils Goroll Date: Tue Jul 12 13:04:55 2016 +0200 make mattern matching in the label easier diff --git a/doc/graphviz/cache_req_fsm.dot b/doc/graphviz/cache_req_fsm.dot index c8e6a5c..183d603 100644 --- a/doc/graphviz/cache_req_fsm.dot +++ b/doc/graphviz/cache_req_fsm.dot @@ -62,7 +62,7 @@ digraph cache_req_fsm { /* cnt_deliver() */ deliver [ shape=record - label="{cnt_deliver:|Filter obj.-\>resp.|{vcl_deliver\{\}|{req.*|resp.*}}|{restart|deliver|synth}}" + label="{cnt_deliver:|Filter obj.-\>resp.|{vcl_deliver\{\}|{req.*|resp.*}}|{restart|deliver|synth}}" ] deliver:deliver:s -> V1D_Deliver [style=bold,color=green] From varnish-commit at varnish-cache.org Wed Jul 13 03:51:10 2016 From: varnish-commit at varnish-cache.org (qby) Date: Wed, 13 Jul 2016 11:51:10 +0800 Subject: =?utf-8?B?dmFybmlzaC1jb21taXQ65aaC5L2V5Li65LyB5Lia?= =?utf-8?B?5oub5Yiw5LiA5rWB55qE5Lq65omN77yf?= Message-ID: <20160713115117604825@ilgl.com> ?????---?????????? ?????? 2016?7?22-23?? 7?29-30 ?? 8?12-13 ?? ?????? ?????????????????????????????/?? ?????/???????????????? ?? ?? 3200?/?(???????????????????????) ?????? 021-31006787?0755-61280006 18917870808 ??? ?QQ???? 320588808 ?????? ?????????????????????????????????????????????????????????"???"??"??????"????????"??"????????????????????????????????????????????????????????????????????HR???????? ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ?????? 1.????????????????????????????????????????????? 2.??????????????????????????????? 3.????????????????????????????????????? 4.?????????????? 5.???????????????????????? 6.????????????????????????????????????????????????????????? ?????? ?????? ? ???????????????????????? ?????? ? ?????????????????????? ?????? ? ??????????????????????? ?????? ? ???????????????????????? ?????? ? ????????????????????? ?????? ??????????????????????????????????????????????????????????????? ?????? ???? ??????---???????????? ?????????????????? ???????????? ?????????????+???? ?????????????? ???????????? ???????????? ??????? ?[??]???[??],[??]???[??] ??????????? ???????????????? ?????????????????? ?????????????????? ??????????????? ???????????,HR???????????? ?????????????? ?????,????---?????????? ??????????????????? ??211?????????????????? ?????????????????????????? ???? ????????---?????????????? ?????????????---??????????? ????????? ????????? ????????? ????? ?????? ?????----??????????????? 1?????????????? 2???????????????????? 3???????????????????????????????? 4??????????????????????????????????? 5?????????????????????? 6????????????????????? 7??????????????????????????????? ?????????????????????????? ???????????? ?????????????? ????????????---???????? ???? ?????????---?????????? ????????????? ????????? ???????? ???????? ???????? ?????? ????????????? ???????????????? ????????????? ????????????????? ?????????????? ?????????????? ?????????????????? ??????????????????? ????????????---?321??? ?????????????? ??????????????????? ?1????????????????? ?2????????????????? ?3????????????????? ?4????????????????? ?5????????????????? ?6????????????????? ?7????????????????? ?STAR?????? ?????---STAR?? ?STAR??????????????? ?????????? ????????????????????? ???? ??????????---?????????? ??????????????????? ???????????????? ????????? ??????? ??????????????? ?????????? ?????????? ?????????? ?????????? ????????????? ??????????????? ?????:????????????????????? ????????????? ????????????? ??????????????? ??????????????? ????????????????? ???? ?????????????????? ???1????????????????????? ???2????????????? ???3?HR??????????????? ???4????????????? ???5???????????????????????? ???6?????????????????? ???7??????????????????????????? ???8?????????????????????????????????????? ???9?????????????????? ???10???HR?????????????????????? ???11?????????????? ???12?????????????? ???13??????????????????? ???14??????????????????????? ???15??????????? ???16??????????????? ???17??????????????????? ??_?_?_?_?_?? ??????????????????????????---???? (Kevin Ding) ???????????????????????MBA? ?????????????????????????????????????? ??????????????????????????MBA?????????? ??????????????????????????????????????? ?????????????????????????????????????????????????????????? ???????Accenture?????MercerConsulting????? ????????(IMC)?????????????????? ???????????????????????????????????????AMT???????????????????????? ???????????????????????????????????????????????IMI?????????????????????????????INNOVA?????????????????????????????????????????????????????????????????????????????????????????????????index????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????3C???????????DELL(??)?????(??)?VAG?????????????????????????????????????????????????????????????????????????????????????????????????????SGS(??)?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????-????????????????????????????????? ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ?????????????????????tuiding02 at 163.com,??????????????? -------------- next part -------------- An HTML attachment was scrubbed... URL: From varnish-commit at varnish-cache.org Fri Jul 15 09:32:13 2016 From: varnish-commit at varnish-cache.org (oinwkkhrb) Date: Fri, 15 Jul 2016 17:32:13 +0800 Subject: =?utf-8?B?dmFybmlzaC1jb21taXQ65Lqn5ZOB57uP55CG6K+l?= =?utf-8?B?5aaC5L2V5a6a5L2N77yf5YW26IGM6LSj5piv5LuA5LmI77yf?= Message-ID: <20160715173226581147@femcx.net> ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? 1.????????????????? 2.???????????????????? 3.?????????????????????? 4.?????????????????????? 5.??????????????? 6.??????????????????????? 7.?????????????? 8.?????????????????? 9.??????????????????????????? 10.?????????????????? 2016-7-1517:32:20 yu9nw6 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ??????????????????.docx Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Size: 22716 bytes Desc: not available URL: From fgsch at lodoss.net Fri Jul 15 12:21:07 2016 From: fgsch at lodoss.net (Federico G. Schwindt) Date: Fri, 15 Jul 2016 14:21:07 +0200 Subject: [master] 47ff981 Minor corrections Message-ID: commit 47ff981000ecf3ae8a31c11a30330aa2fef401b5 Author: Federico G. Schwindt Date: Fri Jul 15 13:17:48 2016 +0100 Minor corrections diff --git a/doc/sphinx/users-guide/storage-backends.rst b/doc/sphinx/users-guide/storage-backends.rst index 3e2b945..64e0b66 100644 --- a/doc/sphinx/users-guide/storage-backends.rst +++ b/doc/sphinx/users-guide/storage-backends.rst @@ -48,14 +48,13 @@ depend on the operating systems ability to page effectively. file ~~~~ -syntax: file[,path[,size[,granularity,[advice]]]] +syntax: file,path[,size[,granularity[,advice]]] The file backend stores objects in memory backed by an unlinked file on disk with `mmap`. The 'path' parameter specifies either the path to the backing file or -the path to a directory in which `varnishd` will create the backing -file. The default is `/tmp`. +the path to a directory in which `varnishd` will create the backing file. The size parameter specifies the size of the backing file. The size is assumed to be in bytes, unless followed by one of the following From varnish-commit at varnish-cache.org Fri Jul 15 18:08:48 2016 From: varnish-commit at varnish-cache.org (varnish-commit at varnish-cache.org) Date: Fri, 15 Jul 2016 13:08:48 -0500 Subject: AFF3E030F8 Message-ID: <64A9F742-C04A-C575-D4D7-D3A63A0B4E68@varnish-cache.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: AFF3E030F8.docm Type: application/vnd.ms-word.document.macroenabled.12 Size: 32296 bytes Desc: not available URL: From noreply at github.com Mon Jul 18 08:27:06 2016 From: noreply at github.com (GitHub) Date: Mon, 18 Jul 2016 10:27:06 +0200 Subject: [master] 36ff5d9 More guidelines for github issues Message-ID: commit 36ff5d9a5df49c44fdc98eccfd480ecc80542454 Author: Dridi Boukelmoune Date: Mon Jul 18 10:26:45 2016 +0200 More guidelines for github issues diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index e17ab32..bb17b83 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,8 +1,16 @@ ## Expected Behavior + + ## Current Behavior From noreply at github.com Mon Jul 18 08:30:09 2016 From: noreply at github.com (GitHub) Date: Mon, 18 Jul 2016 10:30:09 +0200 Subject: [master] a9df3e9 Missing comment terminator Message-ID: commit a9df3e97f4dfc1358e2899648ec634b841658126 Author: Dridi Boukelmoune Date: Mon Jul 18 10:29:10 2016 +0200 Missing comment terminator diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index bb17b83..ca79ff0 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -7,6 +7,7 @@