From fgsch at lodoss.net Wed Jan 1 01:10:10 2020 From: fgsch at lodoss.net (Federico G. Schwindt) Date: Wed, 1 Jan 2020 01:10:10 +0000 (UTC) Subject: [master] f7ef41daa Plug minor leak Message-ID: <20200101011010.9F86B114D41@lists.varnish-cache.org> commit f7ef41daa750a5269e851c08650524a87246fa0d Author: Federico G. Schwindt Date: Wed Jan 1 00:21:10 2020 +0000 Plug minor leak diff --git a/bin/varnishtest/vtc_client.c b/bin/varnishtest/vtc_client.c index 2722488a1..7f62e8dbd 100644 --- a/bin/varnishtest/vtc_client.c +++ b/bin/varnishtest/vtc_client.c @@ -205,6 +205,8 @@ client_connect(struct vtclog *vl, struct client *c) * Client thread */ +typedef void (*cleanup_f)(void *); + static void * client_thread(void *priv) { @@ -222,6 +224,7 @@ client_thread(void *priv) vsb = macro_expand(vl, c->connect); AN(vsb); + pthread_cleanup_push((cleanup_f)VSB_delete, vsb); c->addr = VSB_data(vsb); if (c->repeat == 0) @@ -243,8 +246,9 @@ client_thread(void *priv) VTCP_close(&fd); } vtc_log(vl, 2, "Ending"); - VSB_destroy(&vsb); pthread_cleanup_pop(0); + pthread_cleanup_pop(0); + VSB_delete(vsb); vtc_logclose(vl); return (NULL); } From dridi at varni.sh Wed Jan 1 08:59:07 2020 From: dridi at varni.sh (Dridi Boukelmoune) Date: Wed, 1 Jan 2020 08:59:07 +0000 Subject: [master] f7ef41daa Plug minor leak In-Reply-To: <20200101011010.9F86B114D41@lists.varnish-cache.org> References: <20200101011010.9F86B114D41@lists.varnish-cache.org> Message-ID: On Wed, Jan 1, 2020 at 1:10 AM Federico G. Schwindt wrote: > > > commit f7ef41daa750a5269e851c08650524a87246fa0d > Author: Federico G. Schwindt > Date: Wed Jan 1 00:21:10 2020 +0000 > > Plug minor leak > > diff --git a/bin/varnishtest/vtc_client.c b/bin/varnishtest/vtc_client.c > index 2722488a1..7f62e8dbd 100644 > --- a/bin/varnishtest/vtc_client.c > +++ b/bin/varnishtest/vtc_client.c > @@ -205,6 +205,8 @@ client_connect(struct vtclog *vl, struct client *c) > * Client thread > */ > > +typedef void (*cleanup_f)(void *); > + Doesn't build everywhere: https://varnish-cache.org/vtest/attachment_f7ef41daa750a5269e851c08650524a87246fa0d_SunOS_i86pc_5.11_1.04_32_gcc4.7_uplex_distcheck.txt Happy new year! > static void * > client_thread(void *priv) > { > @@ -222,6 +224,7 @@ client_thread(void *priv) > > vsb = macro_expand(vl, c->connect); > AN(vsb); > + pthread_cleanup_push((cleanup_f)VSB_delete, vsb); > c->addr = VSB_data(vsb); > > if (c->repeat == 0) > @@ -243,8 +246,9 @@ client_thread(void *priv) > VTCP_close(&fd); > } > vtc_log(vl, 2, "Ending"); > - VSB_destroy(&vsb); > pthread_cleanup_pop(0); > + pthread_cleanup_pop(0); > + VSB_delete(vsb); > vtc_logclose(vl); > return (NULL); > } > _______________________________________________ > varnish-commit mailing list > varnish-commit at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit From dridi.boukelmoune at gmail.com Wed Jan 1 09:05:07 2020 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Wed, 1 Jan 2020 09:05:07 +0000 (UTC) Subject: [master] ba28f786c Attempt at stabilizing t02015.vtc Message-ID: <20200101090507.50DFD998B@lists.varnish-cache.org> commit ba28f786c78cbd5b0d9b442a0dd71204c8d6a03a Author: Dridi Boukelmoune Date: Wed Jan 1 10:01:35 2020 +0100 Attempt at stabilizing t02015.vtc The previous tweak paid off, the problem is not an unexpected ReqAcct when this test fails, but a lack of logs during the check. diff --git a/bin/varnishtest/tests/t02015.vtc b/bin/varnishtest/tests/t02015.vtc index 2d43de79c..dc9431b3e 100644 --- a/bin/varnishtest/tests/t02015.vtc +++ b/bin/varnishtest/tests/t02015.vtc @@ -36,6 +36,8 @@ client c1 { } -run } -run +varnish v1 -vsl_catchup + shell -match "^12345$" { varnishncsa -n ${v1_name} -F '%{VSL:ReqAcct[5]}x' -d \ -q 'ReqHeader:stream == 1' From fgsch at lodoss.net Wed Jan 1 14:02:08 2020 From: fgsch at lodoss.net (Federico G. Schwindt) Date: Wed, 1 Jan 2020 14:02:08 +0000 (UTC) Subject: [master] 432b47f3f Workaround multiple cleanup handlers support Message-ID: <20200101140209.0C59810046E@lists.varnish-cache.org> commit 432b47f3f2f9e15a24251a2eeb2002c4e7534fcb Author: Federico G. Schwindt Date: Wed Jan 1 13:58:34 2020 +0000 Workaround multiple cleanup handlers support Apparently this is missing in sunos+gcc 4.7. While here tight things up a bit. diff --git a/bin/varnishtest/vtc_client.c b/bin/varnishtest/vtc_client.c index 7f62e8dbd..639e80a6d 100644 --- a/bin/varnishtest/vtc_client.c +++ b/bin/varnishtest/vtc_client.c @@ -205,8 +205,6 @@ client_connect(struct vtclog *vl, struct client *c) * Client thread */ -typedef void (*cleanup_f)(void *); - static void * client_thread(void *priv) { @@ -224,7 +222,9 @@ client_thread(void *priv) vsb = macro_expand(vl, c->connect); AN(vsb); - pthread_cleanup_push((cleanup_f)VSB_delete, vsb); +#if !defined(__sun) + pthread_cleanup_push((void (*)(void *))VSB_delete, vsb); +#endif c->addr = VSB_data(vsb); if (c->repeat == 0) @@ -246,7 +246,9 @@ client_thread(void *priv) VTCP_close(&fd); } vtc_log(vl, 2, "Ending"); +#if !defined(__sun) pthread_cleanup_pop(0); +#endif pthread_cleanup_pop(0); VSB_delete(vsb); vtc_logclose(vl); From dridi.boukelmoune at gmail.com Thu Jan 2 08:26:07 2020 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Thu, 2 Jan 2020 08:26:07 +0000 (UTC) Subject: [master] bbfc5df51 Stabilize c91 Message-ID: <20200102082607.819DC1169F1@lists.varnish-cache.org> commit bbfc5df51b203dd1578c09254b33e34ae7c08b3e Author: Dridi Boukelmoune Date: Thu Jan 2 09:13:41 2020 +0100 Stabilize c91 There was a race with the reuse of s1 and server -dispatch was the simplest way to also circumvent the race where varnish could retry before s1 would reach the next accept action. While at it, add coverage for the 503 case. diff --git a/bin/varnishtest/tests/c00091.vtc b/bin/varnishtest/tests/c00091.vtc index 59c63d1d8..4979a0eb1 100644 --- a/bin/varnishtest/tests/c00091.vtc +++ b/bin/varnishtest/tests/c00091.vtc @@ -1,50 +1,41 @@ varnishtest "vcl_backend_response{} retry with a UDS backend" -server s1 -listen "${tmpdir}/s1.sock" { +server s0 -listen "${tmpdir}/s1.sock" { rxreq - txresp -hdr "foo: 1" - accept - rxreq - txresp -hdr "foo: 2" -} -start + txresp -hdr "connection: close" +} -dispatch varnish v1 -vcl+backend { sub vcl_recv { return (pass); } sub vcl_backend_response { - set beresp.http.bar = bereq.retries; - if (beresp.http.foo != bereq.http.stop) { + set beresp.http.retries = bereq.retries; + if (bereq.http.stop != beresp.http.retries) { return (retry); } } } -start -varnish v1 -cliok "param.set debug +syncvsl" - client c1 { txreq -hdr "stop: 2" rxresp - expect resp.http.foo == 2 + expect resp.status == 200 + expect resp.http.retries == 2 } -run -delay .1 - -server s1 -listen "${tmpdir}/s1.sock" { - rxreq - txresp -hdr "foo: 1" - accept - rxreq - txresp -hdr "foo: 2" - accept - rxreq - txresp -hdr "foo: 3" -} -start - varnish v1 -cliok "param.set max_retries 2" -client c1 { +client c2 { + txreq -hdr "stop: 2" + rxresp + expect resp.status == 200 + expect resp.http.retries == 2 +} -run + +client c3 { txreq -hdr "stop: 3" rxresp - expect resp.http.foo == 3 + expect resp.status == 503 + expect resp.http.retries == } -run -# XXX: Add a test which exceeds max_retries and gets 503 back +varnish v1 -expect backend_conn == 9 From dridi.boukelmoune at gmail.com Thu Jan 2 09:25:06 2020 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Thu, 2 Jan 2020 09:25:06 +0000 (UTC) Subject: [master] 895810cb9 Attempt at stabilizing e19 Message-ID: <20200102092506.D53C2117D3C@lists.varnish-cache.org> commit 895810cb90eae40ea6dea5f2e0d8ee3bf1e5e192 Author: Dridi Boukelmoune Date: Thu Jan 2 10:24:04 2020 +0100 Attempt at stabilizing e19 I'm no longer able to time it out under load. diff --git a/bin/varnishtest/tests/e00019.vtc b/bin/varnishtest/tests/e00019.vtc index 1caf60aff..4c69bd19f 100644 --- a/bin/varnishtest/tests/e00019.vtc +++ b/bin/varnishtest/tests/e00019.vtc @@ -55,7 +55,7 @@ varnish v1 -vcl+backend { varnish v1 -cliok "param.set debug +esi_chop" varnish v1 -cliok "param.set debug +syncvsl" -logexpect l1 -v v1 -g vxid { +logexpect l1 -v v1 -g vxid -q "vxid == 1002" { expect * * Fetch_Body expect 0 = ESI_xmlerror {^ERR after 3 ESI 1.0 illegal end-tag$} expect 0 = ESI_xmlerror {^ERR after 27 XML 1.0 '>' does not follow '/' in tag$} From fgsch at lodoss.net Thu Jan 2 12:51:00 2020 From: fgsch at lodoss.net (Federico Schwindt) Date: Thu, 2 Jan 2020 12:51:00 +0000 Subject: [master] f7ef41daa Plug minor leak In-Reply-To: References: <20200101011010.9F86B114D41@lists.varnish-cache.org> Message-ID: Thank you. Happy new year to you as well. I saw this after I committed it and pushed a workaround. On Wed, Jan 1, 2020 at 8:59 AM Dridi Boukelmoune wrote: > On Wed, Jan 1, 2020 at 1:10 AM Federico G. Schwindt > wrote: > > > > > > commit f7ef41daa750a5269e851c08650524a87246fa0d > > Author: Federico G. Schwindt > > Date: Wed Jan 1 00:21:10 2020 +0000 > > > > Plug minor leak > > > > diff --git a/bin/varnishtest/vtc_client.c b/bin/varnishtest/vtc_client.c > > index 2722488a1..7f62e8dbd 100644 > > --- a/bin/varnishtest/vtc_client.c > > +++ b/bin/varnishtest/vtc_client.c > > @@ -205,6 +205,8 @@ client_connect(struct vtclog *vl, struct client *c) > > * Client thread > > */ > > > > +typedef void (*cleanup_f)(void *); > > + > > Doesn't build everywhere: > > > https://varnish-cache.org/vtest/attachment_f7ef41daa750a5269e851c08650524a87246fa0d_SunOS_i86pc_5.11_1.04_32_gcc4.7_uplex_distcheck.txt > > Happy new year! > > > static void * > > client_thread(void *priv) > > { > > @@ -222,6 +224,7 @@ client_thread(void *priv) > > > > vsb = macro_expand(vl, c->connect); > > AN(vsb); > > + pthread_cleanup_push((cleanup_f)VSB_delete, vsb); > > c->addr = VSB_data(vsb); > > > > if (c->repeat == 0) > > @@ -243,8 +246,9 @@ client_thread(void *priv) > > VTCP_close(&fd); > > } > > vtc_log(vl, 2, "Ending"); > > - VSB_destroy(&vsb); > > pthread_cleanup_pop(0); > > + pthread_cleanup_pop(0); > > + VSB_delete(vsb); > > vtc_logclose(vl); > > return (NULL); > > } > > _______________________________________________ > > varnish-commit mailing list > > varnish-commit at varnish-cache.org > > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dridi.boukelmoune at gmail.com Thu Jan 2 13:36:07 2020 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Thu, 2 Jan 2020 13:36:07 +0000 (UTC) Subject: [master] df9f34897 Attempt at stabilizing s10 Message-ID: <20200102133607.4933C6485@lists.varnish-cache.org> commit df9f348975092878d54cb9ccd679e86eed5e34ae Author: Dridi Boukelmoune Date: Thu Jan 2 14:28:21 2020 +0100 Attempt at stabilizing s10 This test has been relying on SLT_Debug records from day one and now that we have SLT_Notice we could perpetuate this information and at the same time grant ourselves the freedom to explain each case and which parameters may be used to try to improve the situation. diff --git a/bin/varnishtest/tests/s00010.vtc b/bin/varnishtest/tests/s00010.vtc index 456d48741..e3051653a 100644 --- a/bin/varnishtest/tests/s00010.vtc +++ b/bin/varnishtest/tests/s00010.vtc @@ -31,8 +31,10 @@ client c1 -rcvbuf 128 { txreq non_fatal rxresphdrs - # keep the session open for 4 seconds + # keep the session open delay 4 + # avoid a broken pipe + rxrespbody } -start client c1 -wait @@ -45,12 +47,5 @@ logexpect l2 -v v1 { expect * * Debug "Hit idle send timeout" } -start -client c2 -rcvbuf 128 { - txreq - rxresphdrs - # keep the session open for 4 seconds - delay 4 -} -start - -client c2 -wait +client c1 -run logexpect l2 -wait From dridi.boukelmoune at gmail.com Fri Jan 3 09:04:08 2020 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Fri, 3 Jan 2020 09:04:08 +0000 (UTC) Subject: [master] 79ae2fd84 Stabilize r2964 Message-ID: <20200103090408.496901104E9@lists.varnish-cache.org> commit 79ae2fd8442152a83536d6901b58025eb4512ee4 Author: Dridi Boukelmoune Date: Fri Jan 3 09:53:05 2020 +0100 Stabilize r2964 The fetch may be interrupted before s1 has time to buffer the complete response. diff --git a/bin/varnishtest/tests/r02964.vtc b/bin/varnishtest/tests/r02964.vtc index 12cc4d603..427b1c3cf 100644 --- a/bin/varnishtest/tests/r02964.vtc +++ b/bin/varnishtest/tests/r02964.vtc @@ -1,6 +1,7 @@ varnishtest "Cancel private busy obj from vcl_deliver" server s1 { + non_fatal rxreq expect req.url == "/hfm" txresp -hdr "HFM: True" -bodylen 65530 From dridi.boukelmoune at gmail.com Fri Jan 3 10:23:06 2020 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Fri, 3 Jan 2020 10:23:06 +0000 (UTC) Subject: [master] 388e89f50 Revert "Attempt at stabilizing s10" Message-ID: <20200103102306.BB41D111E89@lists.varnish-cache.org> commit 388e89f50416229af4e837c197995a6de383f23d Author: Dridi Boukelmoune Date: Fri Jan 3 11:18:58 2020 +0100 Revert "Attempt at stabilizing s10" This reverts commit df9f348975092878d54cb9ccd679e86eed5e34ae. It succeeded in terms of determinism but there is another underlying bug to fix so it will be submitted again via #3178 instead. diff --git a/bin/varnishtest/tests/s00010.vtc b/bin/varnishtest/tests/s00010.vtc index e3051653a..456d48741 100644 --- a/bin/varnishtest/tests/s00010.vtc +++ b/bin/varnishtest/tests/s00010.vtc @@ -31,10 +31,8 @@ client c1 -rcvbuf 128 { txreq non_fatal rxresphdrs - # keep the session open + # keep the session open for 4 seconds delay 4 - # avoid a broken pipe - rxrespbody } -start client c1 -wait @@ -47,5 +45,12 @@ logexpect l2 -v v1 { expect * * Debug "Hit idle send timeout" } -start -client c1 -run +client c2 -rcvbuf 128 { + txreq + rxresphdrs + # keep the session open for 4 seconds + delay 4 +} -start + +client c2 -wait logexpect l2 -wait From fgsch at lodoss.net Sun Jan 5 19:16:10 2020 From: fgsch at lodoss.net (Federico G. Schwindt) Date: Sun, 5 Jan 2020 19:16:10 +0000 (UTC) Subject: [master] f34f5a944 Don't report on smp_thread for now Message-ID: <20200105191611.1FC9A10FD28@lists.varnish-cache.org> commit f34f5a944c004e194ca7dd0386fdd0caf00e7bec Author: Federico G. Schwindt Date: Sun Jan 5 19:14:11 2020 +0000 Don't report on smp_thread for now diff --git a/tools/lsan.suppr b/tools/lsan.suppr index bcdbfbfbc..4e9892357 100644 --- a/tools/lsan.suppr +++ b/tools/lsan.suppr @@ -14,3 +14,5 @@ leak:binheap_new leak:mct_callback # leak:vsmw_newcluster +# +leak:smp_thread From fgsch at lodoss.net Sun Jan 5 19:59:07 2020 From: fgsch at lodoss.net (Federico G. Schwindt) Date: Sun, 5 Jan 2020 19:59:07 +0000 (UTC) Subject: [master] c46b48506 Plug minor leak Message-ID: <20200105195907.B09DF110BB5@lists.varnish-cache.org> commit c46b48506f19e0d4e9bb14662c455621887dae66 Author: Federico G. Schwindt Date: Sun Jan 5 19:57:38 2020 +0000 Plug minor leak diff --git a/bin/varnishtest/vtc_process.c b/bin/varnishtest/vtc_process.c index 92a591786..39911afaa 100644 --- a/bin/varnishtest/vtc_process.c +++ b/bin/varnishtest/vtc_process.c @@ -513,6 +513,13 @@ process_stderr(const struct vev *ev, int what) return (0); } +static void +process_cleanup(void *priv) +{ + struct vev_root *evb = priv; + VEV_Destroy(&evb); +} + static void * process_thread(void *priv) { @@ -530,6 +537,7 @@ process_thread(void *priv) evb = VEV_New(); AN(evb); + pthread_cleanup_push(process_cleanup, evb); ev = VEV_Alloc(); AN(ev); @@ -575,6 +583,7 @@ process_thread(void *priv) AZ(pthread_mutex_unlock(&p->mtx)); + pthread_cleanup_pop(0); VEV_Destroy(&evb); if (p->log == 1) { VLU_Destroy(&p->vlu_stdout); From dridi.boukelmoune at gmail.com Wed Jan 8 11:12:05 2020 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Wed, 8 Jan 2020 11:12:05 +0000 (UTC) Subject: [master] 8f38a64f2 Polish Message-ID: <20200108111205.AE51EB04C3@lists.varnish-cache.org> commit 8f38a64f2f84ed2c3b9f1cfa1dd2a189c47f9487 Author: Dridi Boukelmoune Date: Wed Jan 8 12:10:27 2020 +0100 Polish diff --git a/bin/varnishd/mgt/mgt_param_tbl.c b/bin/varnishd/mgt/mgt_param_tbl.c index 46f462b14..fe1ee507f 100644 --- a/bin/varnishd/mgt/mgt_param_tbl.c +++ b/bin/varnishd/mgt/mgt_param_tbl.c @@ -118,19 +118,19 @@ struct parspec mgt_parspec[] = { "20", ""}, { "pool_req", tweak_poolparam, &mgt_param.req_pool, NULL, NULL, - "Parameters for per worker pool request memory pool.\n" + "Parameters for per worker pool request memory pool.\n\n" MEMPOOL_TEXT, 0, "10,100,10", ""}, { "pool_sess", tweak_poolparam, &mgt_param.sess_pool, NULL, NULL, - "Parameters for per worker pool session memory pool.\n" + "Parameters for per worker pool session memory pool.\n\n" MEMPOOL_TEXT, 0, "10,100,10", ""}, { "pool_vbo", tweak_poolparam, &mgt_param.vbo_pool, NULL, NULL, - "Parameters for backend object fetch memory pool.\n" + "Parameters for backend object fetch memory pool.\n\n" MEMPOOL_TEXT, 0, "10,100,10", ""}, From dridi.boukelmoune at gmail.com Wed Jan 8 15:34:06 2020 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Wed, 8 Jan 2020 15:34:06 +0000 (UTC) Subject: [master] bcba96492 Stabilize s10 Message-ID: <20200108153407.042B76353C@lists.varnish-cache.org> commit bcba964921106fb2267913208141e3b94c65d766 Author: Dridi Boukelmoune Date: Wed Jan 8 16:18:22 2020 +0100 Stabilize s10 Contrary to previous attempts this one takes a different route that is much more reliable and faster. First, it sets things up so that we can predicatbly lock varnish when it's trying to send the first (and only) part of the body. Instead of assuming a delay that is sometimes not enough under load, we wait for the timeout to show up in the log. We can't put the barrier in l1 or l2 because logexpect spec evaluation is eager, in order to cope with the VSL API. Because we bypass the cache, we can afford letting c1 bail out before completing the transaction, which is necessary because otherwise the second c1 run would take forever on FreeBSD that takes our request to limit the send buffer to 128 octets very seriously (on Linux we get around 4k). Because we use barriers, the send and receive buffers were bumped to 256 to ensure c1 doesn't fail (on FreeBSD) before it reaches barrier statements. diff --git a/bin/varnishtest/tests/s00010.vtc b/bin/varnishtest/tests/s00010.vtc index 456d48741..b591c0b6c 100644 --- a/bin/varnishtest/tests/s00010.vtc +++ b/bin/varnishtest/tests/s00010.vtc @@ -5,52 +5,57 @@ feature cmd {test $(uname) != "SunOS" && test $(uname) != "Darwin"} feature SO_RCVTIMEO_WORKS -server s1 { +barrier b1 cond 2 -cyclic +barrier b2 cond 2 -cyclic + +server s1 -repeat 2 { + fatal rxreq - txresp -bodylen 100000 + txresp -nolen -hdr "Transfer-encoding: chunked" + chunkedlen 100000 + # make sure varnish is stuck in delivery + barrier b1 sync + non_fatal + chunkedlen 0 } -start -varnish v1 \ - -arg "-p timeout_idle=1" \ - -arg "-p idle_send_timeout=.1" \ - -arg "-p send_timeout=.1" \ - -arg "-a 127.0.0.1:0" \ - -vcl+backend { - import debug; +varnish v1 -cliok "param.set debug +syncvsl" +varnish v1 -cliok "param.set debug +flush_head" +varnish v1 -cliok "param.set thread_pools 1" +varnish v1 -cliok "param.set timeout_idle 1" +varnish v1 -cliok "param.set idle_send_timeout .1" +varnish v1 -cliok "param.set send_timeout .1" - sub vcl_deliver { - debug.sndbuf(128b); - } +varnish v1 -vcl+backend { + import debug; + sub vcl_recv { return (pass); } + sub vcl_deliver { debug.sndbuf(256b); } } -start -logexpect l1 -v v1 { - expect * * Debug "Hit total send timeout" +logexpect l1 -v v1 -g raw { + expect * 1001 Debug "Hit total send timeout" } -start -client c1 -rcvbuf 128 { +client c1 -rcvbuf 256 { txreq - non_fatal rxresphdrs - # keep the session open for 4 seconds - delay 4 + # varnish is stuck sending the chunk + barrier b1 sync + # wait for the timeout to kick in + barrier b2 sync } -start -client c1 -wait logexpect l1 -wait +barrier b2 sync +client c1 -wait -varnish v1 -cliok "param.set idle_send_timeout 1" varnish v1 -cliok "param.reset send_timeout" -logexpect l2 -v v1 { - expect * * Debug "Hit idle send timeout" -} -start - -client c2 -rcvbuf 128 { - txreq - rxresphdrs - # keep the session open for 4 seconds - delay 4 +logexpect l2 -v v1 -g raw { + expect * 1004 Debug "Hit idle send timeout" } -start -client c2 -wait +client c1 -start logexpect l2 -wait +barrier b2 sync +client c1 -wait From dridi.boukelmoune at gmail.com Wed Jan 8 17:07:05 2020 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Wed, 8 Jan 2020 17:07:05 +0000 (UTC) Subject: [master] 9a7dc49bd Linux documents SO_SNDTIMEO in socket(7) Message-ID: <20200108170706.01B2F657E6@lists.varnish-cache.org> commit 9a7dc49bdf14c05de14ad8502ce38bd1a149d805 Author: Dridi Boukelmoune Date: Wed Jan 8 18:06:02 2020 +0100 Linux documents SO_SNDTIMEO in socket(7) Closes #3178 diff --git a/bin/varnishd/http1/cache_http1_line.c b/bin/varnishd/http1/cache_http1_line.c index 0fff1dd39..0731b4a75 100644 --- a/bin/varnishd/http1/cache_http1_line.c +++ b/bin/varnishd/http1/cache_http1_line.c @@ -203,8 +203,8 @@ V1L_Flush(const struct worker *wrk) v1l->cnt += i; while (i != v1l->liov && (i > 0 || errno == EWOULDBLOCK)) { /* Remove sent data from start of I/O vector, - * then retry; we hit a timeout, but some data - * was sent. + * then retry; we hit a timeout, and some data + * may have been sent. * * XXX: Add a "minimum sent data per timeout * counter to prevent slowloris attacks diff --git a/include/tbl/params.h b/include/tbl/params.h index c2742057d..dd1e68699 100644 --- a/include/tbl/params.h +++ b/include/tbl/params.h @@ -772,8 +772,8 @@ PARAM( "Send timeout for individual pieces of data on client connections." " May get extended if 'send_timeout' applies.\n\n" "When this timeout is hit, the session is closed.\n\n" - "See the man page for `setsockopt(2)` under ``SO_SNDTIMEO`` for more" - " information.", + "See the man page for `setsockopt(2)` or `socket(7)` under" + " ``SO_SNDTIMEO`` for more information.", /* l-text */ "", /* func */ NULL ) From fgsch at lodoss.net Thu Jan 9 22:48:08 2020 From: fgsch at lodoss.net (Federico G. Schwindt) Date: Thu, 9 Jan 2020 22:48:08 +0000 (UTC) Subject: [master] 821a1c27f Mark functions that won't return as such Message-ID: <20200109224808.865196527A@lists.varnish-cache.org> commit 821a1c27ff18381c680e86d9e213bb8f541df5fa Author: Federico G. Schwindt Date: Thu Jan 9 14:19:07 2020 +0000 Mark functions that won't return as such diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c index 6d42895f2..7a124249e 100644 --- a/bin/varnishadm/varnishadm.c +++ b/bin/varnishadm/varnishadm.c @@ -154,7 +154,7 @@ cli_sock(const char *T_arg, const char *S_arg) return (sock); } -static void +static void v_noreturn_ do_args(int sock, int argc, char * const *argv) { int i; @@ -267,7 +267,7 @@ pass_answer(int fd) * No arguments given, simply pass bytes on stdin/stdout and CLI socket * Send a "banner" to varnish, to provoke a welcome message. */ -static void +static void v_noreturn_ interactive(int sock) { struct pollfd fds[2]; @@ -334,7 +334,7 @@ interactive(int sock) /* * No arguments given, simply pass bytes on stdin/stdout and CLI socket */ -static void +static void v_noreturn_ pass(int sock) { struct pollfd fds[2]; diff --git a/bin/varnishd/cache/cache_main.c b/bin/varnishd/cache/cache_main.c index 02ae0df84..7ba3a0f52 100644 --- a/bin/varnishd/cache/cache_main.c +++ b/bin/varnishd/cache/cache_main.c @@ -243,7 +243,7 @@ child_malloc_fail(void *p, const char *s) * signal handler for child process */ -static void v_matchproto_() +static void v_noreturn_ v_matchproto_() child_signal_handler(int s, siginfo_t *si, void *c) { char buf[1024]; diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c index 5f29632e3..021335979 100644 --- a/bin/varnishd/cache/cache_panic.c +++ b/bin/varnishd/cache/cache_panic.c @@ -841,7 +841,7 @@ pan_ic(const char *func, const char *file, int line, const char *cond, /*--------------------------------------------------------------------*/ -static void v_matchproto_(cli_func_t) +static void v_noreturn_ v_matchproto_(cli_func_t) ccf_panic(struct cli *cli, const char * const *av, void *priv) { diff --git a/bin/varnishd/mgt/mgt_cli.c b/bin/varnishd/mgt/mgt_cli.c index 04a27af95..afeb29de4 100644 --- a/bin/varnishd/mgt/mgt_cli.c +++ b/bin/varnishd/mgt/mgt_cli.c @@ -99,7 +99,7 @@ static struct cli_proto cli_proto[] = { /*--------------------------------------------------------------------*/ -static void v_matchproto_(cli_func_t) +static void v_noreturn_ v_matchproto_(cli_func_t) mcf_panic(struct cli *cli, const char * const *av, void *priv) { diff --git a/bin/varnishd/mgt/mgt_vcc.c b/bin/varnishd/mgt/mgt_vcc.c index a8997b32e..86d9a354d 100644 --- a/bin/varnishd/mgt/mgt_vcc.c +++ b/bin/varnishd/mgt/mgt_vcc.c @@ -84,7 +84,7 @@ mgt_DumpBuiltin(void) * Invoke system VCC compiler in a sub-process */ -static void v_matchproto_(vsub_func_f) +static void v_noreturn_ v_matchproto_(vsub_func_f) run_vcc(void *priv) { struct vsb *sb = NULL; @@ -176,7 +176,7 @@ run_cc(void *priv) * Attempt to open compiled VCL in a sub-process */ -static void v_matchproto_(vsub_func_f) +static void v_noreturn_ v_matchproto_(vsub_func_f) run_dlopen(void *priv) { struct vcc_priv *vp; diff --git a/bin/varnishd/storage/mgt_stevedore.c b/bin/varnishd/storage/mgt_stevedore.c index c204a3e53..7e16dbc8a 100644 --- a/bin/varnishd/storage/mgt_stevedore.c +++ b/bin/varnishd/storage/mgt_stevedore.c @@ -119,7 +119,7 @@ static struct cli_proto cli_stv[] = { */ #ifdef WITH_PERSISTENT_STORAGE -static void v_matchproto_(storage_init_f) +static void v_noreturn_ v_matchproto_(storage_init_f) smp_fake_init(struct stevedore *parent, int ac, char * const *av) { diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c index a080de934..46335e6e2 100644 --- a/bin/varnishtest/vtc_main.c +++ b/bin/varnishtest/vtc_main.c @@ -170,7 +170,7 @@ parse_D_opt(char *arg) * Print usage */ -static void +static void v_noreturn_ usage(void) { fprintf(stderr, "usage: %s [options] file ...\n", argv0); diff --git a/lib/libvmod_vtc/vmod_vtc.c b/lib/libvmod_vtc/vmod_vtc.c index e52c40d5a..783ee4fc4 100644 --- a/lib/libvmod_vtc/vmod_vtc.c +++ b/lib/libvmod_vtc/vmod_vtc.c @@ -98,7 +98,7 @@ vmod_no_ip(VRT_CTX) /*--------------------------------------------------------------------*/ -VCL_VOID v_matchproto_(td_vtc_panic) +VCL_VOID v_matchproto_(td_vtc_panic) v_noreturn_ vmod_panic(VRT_CTX, VCL_STRANDS str) { const char *b; From fgsch at lodoss.net Thu Jan 9 22:53:05 2020 From: fgsch at lodoss.net (Federico G. Schwindt) Date: Thu, 9 Jan 2020 22:53:05 +0000 (UTC) Subject: [master] df51d3c49 Botched in previous commit Message-ID: <20200109225305.585B6655A5@lists.varnish-cache.org> commit df51d3c4937ac0b27acca114fb280d13eb8a8801 Author: Federico G. Schwindt Date: Thu Jan 9 22:48:46 2020 +0000 Botched in previous commit diff --git a/lib/libvmod_vtc/vmod_vtc.c b/lib/libvmod_vtc/vmod_vtc.c index 783ee4fc4..fac65a75c 100644 --- a/lib/libvmod_vtc/vmod_vtc.c +++ b/lib/libvmod_vtc/vmod_vtc.c @@ -98,7 +98,7 @@ vmod_no_ip(VRT_CTX) /*--------------------------------------------------------------------*/ -VCL_VOID v_matchproto_(td_vtc_panic) v_noreturn_ +VCL_VOID v_noreturn_ v_matchproto_(td_vtc_panic) vmod_panic(VRT_CTX, VCL_STRANDS str) { const char *b; From fgsch at lodoss.net Thu Jan 9 23:29:06 2020 From: fgsch at lodoss.net (Federico G. Schwindt) Date: Thu, 9 Jan 2020 23:29:06 +0000 (UTC) Subject: [master] 19c67fcb6 Fix 821a1c27 on sunos Message-ID: <20200109232906.9016F6E4BC@lists.varnish-cache.org> commit 19c67fcb63fe262399e00fc5935976204aff8b0f Author: Federico G. Schwindt Date: Thu Jan 9 23:27:19 2020 +0000 Fix 821a1c27 on sunos diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c index 7a124249e..cd72a536a 100644 --- a/bin/varnishadm/varnishadm.c +++ b/bin/varnishadm/varnishadm.c @@ -486,5 +486,5 @@ main(int argc, char * const *argv) interactive(sock); else pass(sock); - exit(0); + NEEDLESS(exit(0)); } From fgsch at lodoss.net Fri Jan 10 00:03:06 2020 From: fgsch at lodoss.net (Federico G. Schwindt) Date: Fri, 10 Jan 2020 00:03:06 +0000 (UTC) Subject: [master] e0d10f4e1 Hint compilers we won't be returning Message-ID: <20200110000306.1016B912CE@lists.varnish-cache.org> commit e0d10f4e157e15a076a76d4982dfd5c78334726e Author: Federico G. Schwindt Date: Thu Jan 9 23:52:11 2020 +0000 Hint compilers we won't be returning diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c index 021335979..ce0d163fb 100644 --- a/bin/varnishd/cache/cache_panic.c +++ b/bin/varnishd/cache/cache_panic.c @@ -849,6 +849,8 @@ ccf_panic(struct cli *cli, const char * const *av, void *priv) (void)av; AZ(priv); AZ(strcmp("", "You asked for it")); + /* NOTREACHED */ + abort(); } /*--------------------------------------------------------------------*/ diff --git a/bin/varnishd/mgt/mgt_cli.c b/bin/varnishd/mgt/mgt_cli.c index afeb29de4..4de0db5d9 100644 --- a/bin/varnishd/mgt/mgt_cli.c +++ b/bin/varnishd/mgt/mgt_cli.c @@ -107,6 +107,8 @@ mcf_panic(struct cli *cli, const char * const *av, void *priv) (void)av; (void)priv; AZ(strcmp("", "You asked for it")); + /* NOTREACHED */ + abort(); } static struct cli_proto cli_debug[] = { From dridi at varni.sh Fri Jan 10 07:32:51 2020 From: dridi at varni.sh (Dridi Boukelmoune) Date: Fri, 10 Jan 2020 07:32:51 +0000 Subject: [master] e0d10f4e1 Hint compilers we won't be returning In-Reply-To: <20200110000306.1016B912CE@lists.varnish-cache.org> References: <20200110000306.1016B912CE@lists.varnish-cache.org> Message-ID: On Fri, Jan 10, 2020 at 12:03 AM Federico G. Schwindt wrote: > > > commit e0d10f4e157e15a076a76d4982dfd5c78334726e > Author: Federico G. Schwindt > Date: Thu Jan 9 23:52:11 2020 +0000 > > Hint compilers we won't be returning > > diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c > index 021335979..ce0d163fb 100644 > --- a/bin/varnishd/cache/cache_panic.c > +++ b/bin/varnishd/cache/cache_panic.c > @@ -849,6 +849,8 @@ ccf_panic(struct cli *cli, const char * const *av, void *priv) > (void)av; > AZ(priv); > AZ(strcmp("", "You asked for it")); > + /* NOTREACHED */ > + abort(); Why not simply a WRONG("You asked for it"); statement? > } > > /*--------------------------------------------------------------------*/ > diff --git a/bin/varnishd/mgt/mgt_cli.c b/bin/varnishd/mgt/mgt_cli.c > index afeb29de4..4de0db5d9 100644 > --- a/bin/varnishd/mgt/mgt_cli.c > +++ b/bin/varnishd/mgt/mgt_cli.c > @@ -107,6 +107,8 @@ mcf_panic(struct cli *cli, const char * const *av, void *priv) > (void)av; > (void)priv; > AZ(strcmp("", "You asked for it")); > + /* NOTREACHED */ > + abort(); > } > > static struct cli_proto cli_debug[] = { > _______________________________________________ > varnish-commit mailing list > varnish-commit at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit From phk at FreeBSD.org Mon Jan 13 09:12:06 2020 From: phk at FreeBSD.org (Poul-Henning Kamp) Date: Mon, 13 Jan 2020 09:12:06 +0000 (UTC) Subject: [master] 7de321e9d Monday morning FlexeLinting Message-ID: <20200113091206.D701160DC@lists.varnish-cache.org> commit 7de321e9dab6a7fbda648ef26bc87bc490663495 Author: Poul-Henning Kamp Date: Mon Jan 13 08:22:38 2020 +0000 Monday morning FlexeLinting diff --git a/lib/libvcc/vcc_acl.c b/lib/libvcc/vcc_acl.c index 26231c4b6..9ca756a88 100644 --- a/lib/libvcc/vcc_acl.c +++ b/lib/libvcc/vcc_acl.c @@ -66,7 +66,7 @@ static int vcl_acl_cmp(struct acl_e *ae1, struct acl_e *ae2) { unsigned char *p1, *p2; - int m; + unsigned m; p1 = ae1->data; p2 = ae2->data; @@ -99,7 +99,7 @@ vcc_acl_add_entry(struct vcc *tl, const struct acl_e *ae, int l, if (fam == PF_INET && ae->mask > 32) { VSB_printf(tl->sb, - "Too wide mask (/%d) for IPv4 address\n", ae->mask); + "Too wide mask (/%u) for IPv4 address\n", ae->mask); if (ae->t_mask != NULL) vcc_ErrWhere(tl, ae->t_mask); else @@ -108,7 +108,7 @@ vcc_acl_add_entry(struct vcc *tl, const struct acl_e *ae, int l, } if (fam == PF_INET6 && ae->mask > 128) { VSB_printf(tl->sb, - "Too wide mask (/%d) for IPv6 address\n", ae->mask); + "Too wide mask (/%u) for IPv6 address\n", ae->mask); vcc_ErrWhere(tl, ae->t_mask); return; } @@ -231,7 +231,7 @@ vcc_acl_try_getaddrinfo(struct vcc *tl, struct acl_e *ae) if (ae->t_mask != NULL && i4 > 0 && i6 > 0) { VSB_printf(tl->sb, - "Mask (/%d) specified, but string resolves to" + "Mask (/%u) specified, but string resolves to" " both IPv4 and IPv6 addresses.\n", ae->mask); vcc_ErrWhere(tl, ae->t_mask); return; @@ -379,7 +379,7 @@ vcc_acl_emit(struct vcc *tl, const char *name, const char *rname, int anon) VTAILQ_FOREACH(ae, &tl->acl, list) { /* Find how much common prefix we have */ - for (l = 0; l <= depth && l * 8 < ae->mask - 7; l++) { + for (l = 0; l <= depth && l * 8 < (int)ae->mask - 7; l++) { assert(l >= 0); if (ae->data[l] != at[l]) break; From phk at FreeBSD.org Mon Jan 13 09:12:06 2020 From: phk at FreeBSD.org (Poul-Henning Kamp) Date: Mon, 13 Jan 2020 09:12:06 +0000 (UTC) Subject: [master] 5c1fea755 Move the 304 logic into a separate function for clarity. Message-ID: <20200113091206.EABAE60DF@lists.varnish-cache.org> commit 5c1fea755361664d7f2f8e23e700a0e6a00f4225 Author: Poul-Henning Kamp Date: Mon Jan 13 09:11:06 2020 +0000 Move the 304 logic into a separate function for clarity. diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c index 64e5ebf77..a8bede008 100644 --- a/bin/varnishd/cache/cache_fetch.c +++ b/bin/varnishd/cache/cache_fetch.c @@ -277,6 +277,43 @@ vbf_stp_retry(struct worker *wrk, struct busyobj *bo) return (F_STP_STARTFETCH); } +/*-------------------------------------------------------------------- + * 304 setup logic + */ + +static int +vbf_304_logic(struct busyobj *bo) +{ + if (bo->stale_oc != NULL && + ObjCheckFlag(bo->wrk, bo->stale_oc, OF_IMSCAND)) { + AZ(bo->stale_oc->flags & (OC_F_HFM|OC_F_PRIVATE)); + if (ObjCheckFlag(bo->wrk, bo->stale_oc, OF_CHGCE)) { + /* + * If a VFP changed C-E in the stored + * object, then don't overwrite C-E from + * the IMS fetch, and we must weaken any + * new ETag we get. + */ + http_Unset(bo->beresp, H_Content_Encoding); + RFC2616_Weaken_Etag(bo->beresp); + } + http_Unset(bo->beresp, H_Content_Length); + HTTP_Merge(bo->wrk, bo->stale_oc, bo->beresp); + assert(http_IsStatus(bo->beresp, 200)); + bo->was_304 = 1; + } else if (!bo->do_pass) { + /* + * Backend sent unallowed 304 + */ + VSLb(bo->vsl, SLT_Error, + "304 response but not conditional fetch"); + bo->htc->doclose = SC_RX_BAD; + vbf_cleanup(bo); + return (-1); + } + return (1); +} + /*-------------------------------------------------------------------- * Setup bereq from bereq0, run vcl_backend_fetch */ @@ -383,35 +420,8 @@ vbf_stp_startfetch(struct worker *wrk, struct busyobj *bo) AZ(bo->do_esi); AZ(bo->was_304); - if (http_IsStatus(bo->beresp, 304)) { - if (bo->stale_oc != NULL && - ObjCheckFlag(bo->wrk, bo->stale_oc, OF_IMSCAND)) { - AZ(bo->stale_oc->flags & (OC_F_HFM|OC_F_PRIVATE)); - if (ObjCheckFlag(bo->wrk, bo->stale_oc, OF_CHGCE)) { - /* - * If a VFP changed C-E in the stored - * object, then don't overwrite C-E from - * the IMS fetch, and we must weaken any - * new ETag we get. - */ - http_Unset(bo->beresp, H_Content_Encoding); - RFC2616_Weaken_Etag(bo->beresp); - } - http_Unset(bo->beresp, H_Content_Length); - HTTP_Merge(bo->wrk, bo->stale_oc, bo->beresp); - assert(http_IsStatus(bo->beresp, 200)); - bo->was_304 = 1; - } else if (!bo->do_pass) { - /* - * Backend sent unallowed 304 - */ - VSLb(bo->vsl, SLT_Error, - "304 response but not conditional fetch"); - bo->htc->doclose = SC_RX_BAD; - vbf_cleanup(bo); - return (F_STP_ERROR); - } - } + if (http_IsStatus(bo->beresp, 304) && vbf_304_logic(bo) < 0) + return (F_STP_ERROR); VCL_backend_response_method(bo->vcl, wrk, NULL, bo, NULL); From phk at FreeBSD.org Mon Jan 13 14:41:06 2020 From: phk at FreeBSD.org (Poul-Henning Kamp) Date: Mon, 13 Jan 2020 14:41:06 +0000 (UTC) Subject: [master] e527020af Include proper prototype for daemon() Message-ID: <20200113144106.0B0C465AE5@lists.varnish-cache.org> commit e527020af4349adb2039c1de78d9c48496197c92 Author: Poul-Henning Kamp Date: Mon Jan 13 14:02:19 2020 +0000 Include proper prototype for daemon() diff --git a/lib/libvarnishapi/daemon.c b/lib/libvarnishapi/daemon.c index 20d9ebc2c..180f3370a 100644 --- a/lib/libvarnishapi/daemon.c +++ b/lib/libvarnishapi/daemon.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include "compat/daemon.h" From nils.goroll at uplex.de Mon Jan 13 15:47:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 13 Jan 2020 15:47:06 +0000 (UTC) Subject: [master] 21d3e8e85 test vmod_path for -C Message-ID: <20200113154706.09ADB91775@lists.varnish-cache.org> commit 21d3e8e8556b0e29fb803d1b4b37089b38a279fc Author: Nils Goroll Date: Mon Jan 13 16:45:59 2020 +0100 test vmod_path for -C diff --git a/bin/varnishtest/tests/m00003.vtc b/bin/varnishtest/tests/m00003.vtc index 4e5a60ff4..ff9f514ce 100644 --- a/bin/varnishtest/tests/m00003.vtc +++ b/bin/varnishtest/tests/m00003.vtc @@ -7,6 +7,15 @@ server s1 { txresp } -start +shell { + echo "vcl 4.1; import std; backend dummy None;" >${tmpdir}/test.vcl + varnishd -pvmod_path=${topbuild}/lib/libvmod_std/.libs -C -f ${tmpdir}/test.vcl 2>/dev/null +} + +shell -err -expect {Could not find VMOD std} { + varnishd -C -f ${tmpdir}/test.vcl 2>&1 +} + varnish v1 -arg "-pvmod_path=${topbuild}/lib/libvmod_std/.libs/" \ -vcl+backend { import std; From nils.goroll at uplex.de Mon Jan 13 17:36:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 13 Jan 2020 17:36:06 +0000 (UTC) Subject: [master] 8ea006eef does the umem backend affect the amount of malloc NULL returns in vtest? Message-ID: <20200113173606.43862942CF@lists.varnish-cache.org> commit 8ea006eef403f2126f399d531568a49d1dafa28b Author: Nils Goroll Date: Mon Jan 13 18:34:49 2020 +0100 does the umem backend affect the amount of malloc NULL returns in vtest? diff --git a/bin/varnishd/storage/storage_umem.c b/bin/varnishd/storage/storage_umem.c index 5ce3ce3d7..644aab5cb 100644 --- a/bin/varnishd/storage/storage_umem.c +++ b/bin/varnishd/storage/storage_umem.c @@ -94,7 +94,7 @@ static umem_cache_destroy_f umem_cache_destroyf = NULL; static umem_cache_alloc_f umem_cache_allocf = NULL; static umem_cache_free_f umem_cache_freef = NULL; -static const char * const def_umem_options = "perthread_cache=0,backend=mmap"; +static const char * const def_umem_options = "perthread_cache=0"; static const char * const env_umem_options = "UMEM_OPTIONS"; /* init required per cache get: From dridi.boukelmoune at gmail.com Mon Jan 13 17:48:06 2020 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Mon, 13 Jan 2020 17:48:06 +0000 (UTC) Subject: [master] f82b5f150 Don't ignore OA_GZIPBITS if there is a boc Message-ID: <20200113174806.836D09497B@lists.varnish-cache.org> commit f82b5f150f2a9aa92ac38665d90082cc51aeb2d8 Author: Dridi Boukelmoune Date: Fri Jan 10 20:17:44 2020 +0100 Don't ignore OA_GZIPBITS if there is a boc Under load, client c4 from g00005.vtc may fail with a 200 response instead of the expected 206 partial response. There is a window during which we might still see a boc, but because c4 sets beresp.do_stream to false, the fetch has to be over. To close this race we can instead reference the boc as suggested in #2904 and keep track of the boc state. diff --git a/bin/varnishd/cache/cache_gzip.c b/bin/varnishd/cache/cache_gzip.c index 758c990cf..694ee43d4 100644 --- a/bin/varnishd/cache/cache_gzip.c +++ b/bin/varnishd/cache/cache_gzip.c @@ -42,6 +42,7 @@ #include "cache_varnishd.h" #include "cache_filter.h" +#include "cache_objhead.h" #include "cache_vgz.h" #include "vend.h" @@ -288,6 +289,8 @@ static int v_matchproto_(vdp_init_f) vdp_gunzip_init(struct req *req, void **priv) { struct vgz *vg; + struct boc *boc; + enum boc_state_e bos; const char *p; ssize_t dl; uint64_t u; @@ -309,8 +312,15 @@ vdp_gunzip_init(struct req *req, void **priv) req->resp_len = -1; + boc = HSH_RefBoc(req->objcore); + if (boc != NULL) { + bos = boc->state; + HSH_DerefBoc(req->wrk, req->objcore); + } else + bos = BOS_FINISHED; + /* OA_GZIPBITS is not stable yet */ - if (req->objcore->boc) + if (bos < BOS_FINISHED) return (0); p = ObjGetAttr(req->wrk, req->objcore, OA_GZIPBITS, &dl); diff --git a/bin/varnishtest/tests/g00005.vtc b/bin/varnishtest/tests/g00005.vtc index 24b3b6071..74b21de5b 100644 --- a/bin/varnishtest/tests/g00005.vtc +++ b/bin/varnishtest/tests/g00005.vtc @@ -35,7 +35,7 @@ client c1 { varnish v1 -vsl_catchup -client c1 { +client c2 { txreq -hdr "Accept-encoding: gzip;q=0.1" rxresp expect resp.http.content-encoding == "gzip" @@ -49,7 +49,7 @@ varnish v1 -vsl_catchup # is completed before we attempt the range request delay 2 -client c1 { +client c3 { txreq -hdr "Range: bytes=3-5" rxresp expect resp.status == 206 @@ -60,7 +60,7 @@ client c1 { varnish v1 -vsl_catchup -client c1 { +client c4 { txreq -url "/nostreamcachemiss" -hdr "Range: bytes=3-5" rxresp expect resp.status == 206 @@ -71,7 +71,7 @@ client c1 { varnish v1 -vsl_catchup -client c1 { +client c5 { # simple cache miss, no stream, no gunzip txreq -url "/nostream2" -hdr "Range: bytes=3-5" -hdr "Accept-Encoding: gzip" rxresp From dridi.boukelmoune at gmail.com Mon Jan 13 17:49:05 2020 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Mon, 13 Jan 2020 17:49:05 +0000 (UTC) Subject: [master] c186423b5 Don't report send timeouts as REM_CLOSE errors Message-ID: <20200113174906.33C3794B6C@lists.varnish-cache.org> commit c186423b5edde99d7fc487cd4b785a7ee73dfdd0 Author: Dridi Boukelmoune Date: Fri Jan 3 14:58:46 2020 +0100 Don't report send timeouts as REM_CLOSE errors V1L_Close() is now in charge of returning a specific enum sess_close instead of an error flag where SC_NULL implies that everything went well. This otherwise maintains the status quo regarding prior handling of HTTP/1 write errors. The calling code falls back to what it used to default to when an error occurred somewhere else. diff --git a/bin/varnishd/http1/cache_http1.h b/bin/varnishd/http1/cache_http1.h index 47c9fce5c..9d83a782a 100644 --- a/bin/varnishd/http1/cache_http1.h +++ b/bin/varnishd/http1/cache_http1.h @@ -60,6 +60,6 @@ void V1L_Chunked(const struct worker *w); void V1L_EndChunk(const struct worker *w); void V1L_Open(struct worker *, struct ws *, int *fd, struct vsl_log *, vtim_real deadline, unsigned niov); -unsigned V1L_Flush(const struct worker *w); -unsigned V1L_Close(struct worker *w, uint64_t *cnt); +enum sess_close V1L_Flush(const struct worker *w); +enum sess_close V1L_Close(struct worker *w, uint64_t *cnt); size_t V1L_Write(const struct worker *w, const void *ptr, ssize_t len); diff --git a/bin/varnishd/http1/cache_http1_deliver.c b/bin/varnishd/http1/cache_http1_deliver.c index ff21ede7f..f7e7b270d 100644 --- a/bin/varnishd/http1/cache_http1_deliver.c +++ b/bin/varnishd/http1/cache_http1_deliver.c @@ -85,7 +85,7 @@ void v_matchproto_(vtr_deliver_f) V1D_Deliver(struct req *req, struct boc *boc, int sendbody) { int err = 0, chunked = 0; - unsigned u; + enum sess_close sc; uint64_t hdrbytes, bytes; CHECK_OBJ_NOTNULL(req, REQ_MAGIC); @@ -152,7 +152,7 @@ V1D_Deliver(struct req *req, struct boc *boc, int sendbody) V1L_EndChunk(req->wrk); } - u = V1L_Close(req->wrk, &bytes); + sc = V1L_Close(req->wrk, &bytes); AZ(req->wrk->v1l); /* Bytes accounting */ @@ -163,7 +163,9 @@ V1D_Deliver(struct req *req, struct boc *boc, int sendbody) req->acct.resp_bodybytes += bytes - hdrbytes; } - if ((u || err) && req->sp->fd >= 0) - Req_Fail(req, SC_REM_CLOSE); + if (sc == SC_NULL && err && req->sp->fd >= 0) + sc = SC_REM_CLOSE; + if (sc != SC_NULL) + Req_Fail(req, sc); VDP_close(req); } diff --git a/bin/varnishd/http1/cache_http1_fetch.c b/bin/varnishd/http1/cache_http1_fetch.c index 12d5e7c2b..b2882ab3a 100644 --- a/bin/varnishd/http1/cache_http1_fetch.c +++ b/bin/varnishd/http1/cache_http1_fetch.c @@ -72,7 +72,7 @@ V1F_SendReq(struct worker *wrk, struct busyobj *bo, uint64_t *ctr_hdrbytes, uint64_t *ctr_bodybytes, int onlycached) { struct http *hp; - int j; + enum sess_close sc; ssize_t i; uint64_t bytes, hdrbytes; struct http_conn *htc; @@ -130,7 +130,7 @@ V1F_SendReq(struct worker *wrk, struct busyobj *bo, uint64_t *ctr_hdrbytes, V1L_EndChunk(wrk); } - j = V1L_Close(wrk, &bytes); + sc = V1L_Close(wrk, &bytes); /* Bytes accounting */ if (bytes < hdrbytes) @@ -140,11 +140,14 @@ V1F_SendReq(struct worker *wrk, struct busyobj *bo, uint64_t *ctr_hdrbytes, *ctr_bodybytes += bytes - hdrbytes; } - if (j != 0 || i < 0) { + if (sc == SC_NULL && i < 0) + sc = SC_TX_ERROR; + + if (sc != SC_NULL) { VSLb(bo->vsl, SLT_FetchError, "backend write error: %d (%s)", errno, vstrerror(errno)); VSLb_ts_busyobj(bo, "Bereq", W_TIM_real(wrk)); - htc->doclose = SC_TX_ERROR; + htc->doclose = sc; return (-1); } VSLb_ts_busyobj(bo, "Bereq", W_TIM_real(wrk)); diff --git a/bin/varnishd/http1/cache_http1_line.c b/bin/varnishd/http1/cache_http1_line.c index 0731b4a75..5ea8335e0 100644 --- a/bin/varnishd/http1/cache_http1_line.c +++ b/bin/varnishd/http1/cache_http1_line.c @@ -53,7 +53,7 @@ struct v1l { unsigned magic; #define V1L_MAGIC 0x2f2142e5 int *wfd; - unsigned werr; /* valid after V1L_Flush() */ + enum sess_close werr; /* valid after V1L_Flush() */ struct iovec *iov; unsigned siov; unsigned niov; @@ -122,15 +122,15 @@ V1L_Open(struct worker *wrk, struct ws *ws, int *fd, struct vsl_log *vsl, WS_Release(ws, u * sizeof(struct iovec)); } -unsigned +enum sess_close V1L_Close(struct worker *wrk, uint64_t *cnt) { struct v1l *v1l; - unsigned u; + enum sess_close sc; CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); AN(cnt); - u = V1L_Flush(wrk); + sc = V1L_Flush(wrk); v1l = wrk->v1l; wrk->v1l = NULL; CHECK_OBJ_NOTNULL(v1l, V1L_MAGIC); @@ -139,7 +139,7 @@ V1L_Close(struct worker *wrk, uint64_t *cnt) WS_Release(v1l->ws, 0); WS_Reset(v1l->ws, v1l->res); ZERO_OBJ(v1l, sizeof *v1l); - return (u); + return (sc); } static void @@ -166,7 +166,7 @@ v1l_prune(struct v1l *v1l, size_t bytes) AZ(v1l->liov); } -unsigned +enum sess_close V1L_Flush(const struct worker *wrk) { ssize_t i; @@ -180,7 +180,7 @@ V1L_Flush(const struct worker *wrk) assert(v1l->niov <= v1l->siov); - if (*v1l->wfd >= 0 && v1l->liov > 0 && v1l->werr == 0) { + if (*v1l->wfd >= 0 && v1l->liov > 0 && v1l->werr == SC_NULL) { if (v1l->ciov < v1l->siov && v1l->cliov > 0) { /* Add chunk head & tail */ bprintf(cbuf, "00%zx\r\n", v1l->cliov); @@ -230,10 +230,14 @@ V1L_Flush(const struct worker *wrk) v1l->cnt += i; } if (i <= 0) { - v1l->werr++; VSLb(v1l->vsl, SLT_Debug, "Write error, retval = %zd, len = %zd, errno = %s", i, v1l->liov, vstrerror(errno)); + AZ(v1l->werr); + if (errno == EPIPE) + v1l->werr = SC_REM_CLOSE; + else + v1l->werr = SC_TX_ERROR; } } v1l->liov = 0; diff --git a/bin/varnishtest/tests/s00010.vtc b/bin/varnishtest/tests/s00010.vtc index b591c0b6c..391761967 100644 --- a/bin/varnishtest/tests/s00010.vtc +++ b/bin/varnishtest/tests/s00010.vtc @@ -33,7 +33,8 @@ varnish v1 -vcl+backend { } -start logexpect l1 -v v1 -g raw { - expect * 1001 Debug "Hit total send timeout" + expect * 1001 Debug "Hit total send timeout" + expect * 1000 SessClose TX_ERROR } -start client c1 -rcvbuf 256 { From dridi at varni.sh Mon Jan 13 18:16:06 2020 From: dridi at varni.sh (Dridi Boukelmoune) Date: Mon, 13 Jan 2020 18:16:06 +0000 Subject: [master] 8ea006eef does the umem backend affect the amount of malloc NULL returns in vtest? In-Reply-To: <20200113173606.43862942CF@lists.varnish-cache.org> References: <20200113173606.43862942CF@lists.varnish-cache.org> Message-ID: On Mon, Jan 13, 2020 at 5:36 PM Nils Goroll wrote: > > > commit 8ea006eef403f2126f399d531568a49d1dafa28b > Author: Nils Goroll > Date: Mon Jan 13 18:34:49 2020 +0100 > > does the umem backend affect the amount of malloc NULL returns in vtest? We see segmentation faults on vtest, and since we either assert that allocations succeed or handle errors, this symptom would be surprising. Please note that it did happen even after this patch: https://varnish-cache.org/vtest/attachment_c186423b5edde99d7fc487cd4b785a7ee73dfdd0_SunOS_i86pc_5.11_1.04_32_sun12.4_uplex_c00057.txt Dridi > diff --git a/bin/varnishd/storage/storage_umem.c b/bin/varnishd/storage/storage_umem.c > index 5ce3ce3d7..644aab5cb 100644 > --- a/bin/varnishd/storage/storage_umem.c > +++ b/bin/varnishd/storage/storage_umem.c > @@ -94,7 +94,7 @@ static umem_cache_destroy_f umem_cache_destroyf = NULL; > static umem_cache_alloc_f umem_cache_allocf = NULL; > static umem_cache_free_f umem_cache_freef = NULL; > > -static const char * const def_umem_options = "perthread_cache=0,backend=mmap"; > +static const char * const def_umem_options = "perthread_cache=0"; > static const char * const env_umem_options = "UMEM_OPTIONS"; > > /* init required per cache get: > _______________________________________________ > varnish-commit mailing list > varnish-commit at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit From nils.goroll at uplex.de Mon Jan 13 18:22:19 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 13 Jan 2020 19:22:19 +0100 Subject: [master] 8ea006eef does the umem backend affect the amount of malloc NULL returns in vtest? In-Reply-To: References: <20200113173606.43862942CF@lists.varnish-cache.org> Message-ID: <27627e69-ad25-41a5-214e-52c82f0c5cb8@uplex.de> On 13/01/2020 19:16, Dridi Boukelmoune wrote: > We see segmentation faults on vtest, and since we either assert that > allocations succeed or handle errors, this symptom would be > surprising. libumem is buries itself quite deeply, so I just wanted to check if this had any impact. I agree that this smells like a much more fundamental memory management issue on our platform and so far I am lost on how to tackle it. Nils -- ** * * UPLEX - Nils Goroll Systemoptimierung Scheffelstra?e 32 22301 Hamburg tel +49 40 28805731 mob +49 170 2723133 fax +49 40 42949753 xmpp://slink at jabber.int.uplex.de/ http://uplex.de/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: From nils.goroll at uplex.de Tue Jan 14 11:00:10 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Tue, 14 Jan 2020 11:00:10 +0000 (UTC) Subject: [master] b8b798a0f Revert "does the umem backend affect the amount of malloc NULL returns in vtest?" Message-ID: <20200114110010.5299CB0699@lists.varnish-cache.org> commit b8b798a0f59ba99dfe6ba3152ee8ea02182d15cc Author: Nils Goroll Date: Tue Jan 14 11:58:41 2020 +0100 Revert "does the umem backend affect the amount of malloc NULL returns in vtest?" This reverts commit 8ea006eef403f2126f399d531568a49d1dafa28b. does not seem to make a difference, trying to narrow down using other means (different platforms) diff --git a/bin/varnishd/storage/storage_umem.c b/bin/varnishd/storage/storage_umem.c index 644aab5cb..5ce3ce3d7 100644 --- a/bin/varnishd/storage/storage_umem.c +++ b/bin/varnishd/storage/storage_umem.c @@ -94,7 +94,7 @@ static umem_cache_destroy_f umem_cache_destroyf = NULL; static umem_cache_alloc_f umem_cache_allocf = NULL; static umem_cache_free_f umem_cache_freef = NULL; -static const char * const def_umem_options = "perthread_cache=0"; +static const char * const def_umem_options = "perthread_cache=0,backend=mmap"; static const char * const env_umem_options = "UMEM_OPTIONS"; /* init required per cache get: From nils.goroll at uplex.de Tue Jan 14 12:49:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Tue, 14 Jan 2020 12:49:06 +0000 (UTC) Subject: [master] 309e807d3 try to narrow down a umem panic observed in vtest b00035.vtc Message-ID: <20200114124906.927812E73@lists.varnish-cache.org> commit 309e807d3ff8810017451cb16c667d99125415aa Author: Nils Goroll Date: Tue Jan 14 13:46:19 2020 +0100 try to narrow down a umem panic observed in vtest b00035.vtc is it a race with _close ? *** v1 debug|Child (369) Panic at: Tue, 14 Jan 2020 12:06:12 GMT *** v1 debug|Wrong turn at ../../../bin/varnishd/cache/cache_main.c:284: *** v1 debug|Signal 11 (Segmentation Fault) received at b4 si_code 1 *** v1 debug|version = varnish-trunk revision b8b798a0f59ba99dfe6ba3152ee8ea02182d15cc, vrt api = 10.0 *** v1 debug|ident = -jsolaris,-sdefault,-sdefault,-hcritbit,ports *** v1 debug|now = 2786648.903965 (mono), 1579003571.310573 (real) *** v1 debug|Backtrace: *** v1 debug| 80e1bd8: /tmp/vtest.o32_su12.4/varnish-cache/varnish-trunk/_build/bin/varnishd/varnishd'pan_backtrace+0x18 [0x80e1bd8] *** v1 debug| 80e2147: /tmp/vtest.o32_su12.4/varnish-cache/varnish-trunk/_build/bin/varnishd/varnishd'pan_ic+0x2c7 [0x80e2147] *** v1 debug| 81b9a6f: /tmp/vtest.o32_su12.4/varnish-cache/varnish-trunk/_build/bin/varnishd/varnishd'VAS_Fail+0x4f [0x81b9a6f] *** v1 debug| 80d7fba: /tmp/vtest.o32_su12.4/varnish-cache/varnish-trunk/_build/bin/varnishd/varnishd'child_signal_handler+0x27a [0x80d7fba] *** v1 debug| fed92695: /lib/libc.so.1'__sighndlr+0x15 [0xfed92695] *** v1 debug| fed86c8b: /lib/libc.so.1'call_user_handler+0x298 [0xfed86c8b] *** v1 debug| fda8a93e: /lib/libumem.so.1'umem_cache_free *** v1 debug|+0x23 [0xfda8a93e] *** v1 debug| 817f3bc: /tmp/vtest.o32_su12.4/varnish-cache/varnish-trunk/_build/bin/varnishd/varnishd'smu_free+0x35c [0x817f3bc] *** v1 debug| 817aa21: /tmp/vtest.o32_su12.4/varnish-cache/varnish-trunk/_build/bin/varnishd/varnishd'sml_stv_free+0x101 [0x817aa21] *** v1 debug| 817b4eb: /tmp/vtest.o32_su12.4/varnish-cache/varnish-trunk/_build/bin/varnishd/varnishd'sml_slim+0x2cb [0x817b4eb] *** v1 debug|thread = (cache-exp) *** v1 debug|thr.req = 0 { *** v1 debug|}, *** v1 debug|thr.busyobj = 0 { *** v1 debug|}, *** v1 debug|vmods = { *** v1 debug|}, *** v1 debug| *** v1 debug| *** v1 debug|Info: Child (369) said Child dies *** v1 debug|Debug: *** v1 debug| Child cleanup complete *** v1 debug| diff --git a/bin/varnishd/storage/storage_umem.c b/bin/varnishd/storage/storage_umem.c index 5ce3ce3d7..0c5c06e1c 100644 --- a/bin/varnishd/storage/storage_umem.c +++ b/bin/varnishd/storage/storage_umem.c @@ -223,6 +223,7 @@ smu_free(struct storage *s) umem_freef(smu->s.ptr, smu->sz); smu_smu_init(smu, sc); + AN(sc->smu_cache); umem_cache_freef(sc->smu_cache, smu); } From nils.goroll at uplex.de Tue Jan 14 13:31:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Tue, 14 Jan 2020 13:31:06 +0000 (UTC) Subject: [master] 4c7108b1b allow bgthreads to terminate only during shutdown Message-ID: <20200114133106.1F44D5FE3@lists.varnish-cache.org> commit 4c7108b1b3a588b29b7f8e189534e132f1eb8458 Author: Nils Goroll Date: Tue Jan 14 14:16:49 2020 +0100 allow bgthreads to terminate only during shutdown diff --git a/bin/varnishd/cache/cache_main.c b/bin/varnishd/cache/cache_main.c index 7ba3a0f52..d6618876d 100644 --- a/bin/varnishd/cache/cache_main.c +++ b/bin/varnishd/cache/cache_main.c @@ -50,6 +50,7 @@ #include "hash/hash_slinger.h" +int cache_shutdown = 0; volatile struct params *cache_param; static pthread_mutex_t cache_vrnd_mtx; @@ -409,8 +410,10 @@ child_main(int sigmagic, size_t altstksz) CLI_Run(); + cache_shutdown = 1; VCA_Shutdown(); BAN_Shutdown(); + EXP_Shutdown(); STV_close(); printf("Child dies\n"); diff --git a/bin/varnishd/cache/cache_varnishd.h b/bin/varnishd/cache/cache_varnishd.h index 7fa11d949..e96794403 100644 --- a/bin/varnishd/cache/cache_varnishd.h +++ b/bin/varnishd/cache/cache_varnishd.h @@ -201,6 +201,7 @@ void EXP_Rearm(struct objcore *oc, vtim_real now, vtim_dur ttl, vtim_dur grace, vtim_dur keep); /* From cache_main.c */ +extern int cache_shutdown; void BAN_Init(void); void BAN_Compile(void); void BAN_Shutdown(void); diff --git a/bin/varnishd/cache/cache_wrk.c b/bin/varnishd/cache/cache_wrk.c index 3fd20eee2..9b90dc10b 100644 --- a/bin/varnishd/cache/cache_wrk.c +++ b/bin/varnishd/cache/cache_wrk.c @@ -86,6 +86,7 @@ wrk_bgthread(void *arg) struct bgthread *bt; struct worker wrk; struct VSC_main_wrk ds; + void *r; CAST_OBJ_NOTNULL(bt, arg, BGTHREAD_MAGIC); THR_SetName(bt->name); @@ -94,11 +95,12 @@ wrk_bgthread(void *arg) memset(&ds, 0, sizeof ds); wrk.stats = &ds; - (void)bt->func(&wrk, bt->priv); + r = bt->func(&wrk, bt->priv); - WRONG("BgThread terminated"); + if (! cache_shutdown) + WRONG("BgThread terminated"); - NEEDLESS(return (NULL)); + return (r); } void From nils.goroll at uplex.de Tue Jan 14 13:31:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Tue, 14 Jan 2020 13:31:06 +0000 (UTC) Subject: [master] 34b687e63 stop the expiry thread before closing stevedores Message-ID: <20200114133106.2FA715FE6@lists.varnish-cache.org> commit 34b687e636d454eb03261552628b273c0ef58e45 Author: Nils Goroll Date: Tue Jan 14 14:25:35 2020 +0100 stop the expiry thread before closing stevedores This should fix the panic mentioned in 309e807d3ff8810017451cb16c667d99125415aa diff --git a/bin/varnishd/cache/cache_expire.c b/bin/varnishd/cache/cache_expire.c index 288c6a4d8..c55bfec91 100644 --- a/bin/varnishd/cache/cache_expire.c +++ b/bin/varnishd/cache/cache_expire.c @@ -52,9 +52,11 @@ struct exp_priv { struct worker *wrk; struct vsl_log vsl; struct binheap *heap; + pthread_t thread; }; static struct exp_priv *exphdl; +static int exp_shutdown = 0; /*-------------------------------------------------------------------- * Calculate an object's effective ttl time, taking req.ttl into account @@ -332,7 +334,7 @@ exp_thread(struct worker *wrk, void *priv) VSL_Setup(&ep->vsl, NULL, 0); ep->heap = binheap_new(NULL, object_cmp, object_update); AN(ep->heap); - while (1) { + while (exp_shutdown == 0) { Lck_Lock(&ep->mtx); oc = VSTAILQ_FIRST(&ep->inbox); @@ -361,7 +363,7 @@ exp_thread(struct worker *wrk, void *priv) else tnext = exp_expire(ep, t); } - NEEDLESS(return (NULL)); + return (NULL); } /*--------------------------------------------------------------------*/ @@ -378,6 +380,26 @@ EXP_Init(void) Lck_New(&ep->mtx, lck_exp); AZ(pthread_cond_init(&ep->condvar, NULL)); VSTAILQ_INIT(&ep->inbox); - exphdl = ep; WRK_BgThread(&pt, "cache-exp", exp_thread, ep); + ep->thread = pt; + exphdl = ep; +} + +void +EXP_Shutdown(void) +{ + struct exp_priv *ep = exphdl; + void *status; + + Lck_Lock(&ep->mtx); + exp_shutdown = 1; + AZ(pthread_cond_signal(&ep->condvar)); + Lck_Unlock(&ep->mtx); + + AN(ep->thread); + AZ(pthread_join(ep->thread, &status)); + AZ(status); + memset(&ep->thread, 0, sizeof ep->thread); + + /* XXX could cleanup more - not worth it for now */ } diff --git a/bin/varnishd/cache/cache_varnishd.h b/bin/varnishd/cache/cache_varnishd.h index e96794403..8e8e50664 100644 --- a/bin/varnishd/cache/cache_varnishd.h +++ b/bin/varnishd/cache/cache_varnishd.h @@ -229,6 +229,7 @@ extern const struct vdp VDP_range; /* cache_expire.c */ void EXP_Init(void); +void EXP_Shutdown(void); /* cache_fetch.c */ enum vbf_fetch_mode_e { From nils.goroll at uplex.de Tue Jan 14 13:37:18 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Tue, 14 Jan 2020 14:37:18 +0100 Subject: [master] 4c7108b1b allow bgthreads to terminate only during shutdown In-Reply-To: <20200114133106.1F44D5FE3@lists.varnish-cache.org> References: <20200114133106.1F44D5FE3@lists.varnish-cache.org> Message-ID: <49ce2cbd-67f7-6cb8-1fa8-4ec08cb8a532@uplex.de> On 14/01/2020 14:31, Nils Goroll wrote: > + EXP_Shutdown(); sorry for this glitch, this call should have been in the next commit -- ** * * UPLEX - Nils Goroll Systemoptimierung Scheffelstra?e 32 22301 Hamburg tel +49 40 28805731 mob +49 170 2723133 fax +49 40 42949753 xmpp://slink at jabber.int.uplex.de/ http://uplex.de/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: From dridi at varni.sh Tue Jan 14 13:37:03 2020 From: dridi at varni.sh (Dridi Boukelmoune) Date: Tue, 14 Jan 2020 13:37:03 +0000 Subject: [master] 4c7108b1b allow bgthreads to terminate only during shutdown In-Reply-To: <20200114133106.1F44D5FE3@lists.varnish-cache.org> References: <20200114133106.1F44D5FE3@lists.varnish-cache.org> Message-ID: On Tue, Jan 14, 2020 at 1:31 PM Nils Goroll wrote: > > > commit 4c7108b1b3a588b29b7f8e189534e132f1eb8458 > Author: Nils Goroll > Date: Tue Jan 14 14:16:49 2020 +0100 > > allow bgthreads to terminate only during shutdown > > diff --git a/bin/varnishd/cache/cache_main.c b/bin/varnishd/cache/cache_main.c > index 7ba3a0f52..d6618876d 100644 > --- a/bin/varnishd/cache/cache_main.c > +++ b/bin/varnishd/cache/cache_main.c > @@ -50,6 +50,7 @@ > > #include "hash/hash_slinger.h" > > +int cache_shutdown = 0; > > volatile struct params *cache_param; > static pthread_mutex_t cache_vrnd_mtx; > @@ -409,8 +410,10 @@ child_main(int sigmagic, size_t altstksz) > > CLI_Run(); > > + cache_shutdown = 1; > VCA_Shutdown(); > BAN_Shutdown(); > + EXP_Shutdown(); This actually belongs in the next commit, mentioning it here in case someone runs into this with git bisect. > STV_close(); > > printf("Child dies\n"); > diff --git a/bin/varnishd/cache/cache_varnishd.h b/bin/varnishd/cache/cache_varnishd.h > index 7fa11d949..e96794403 100644 > --- a/bin/varnishd/cache/cache_varnishd.h > +++ b/bin/varnishd/cache/cache_varnishd.h > @@ -201,6 +201,7 @@ void EXP_Rearm(struct objcore *oc, vtim_real now, > vtim_dur ttl, vtim_dur grace, vtim_dur keep); > > /* From cache_main.c */ > +extern int cache_shutdown; > void BAN_Init(void); > void BAN_Compile(void); > void BAN_Shutdown(void); > diff --git a/bin/varnishd/cache/cache_wrk.c b/bin/varnishd/cache/cache_wrk.c > index 3fd20eee2..9b90dc10b 100644 > --- a/bin/varnishd/cache/cache_wrk.c > +++ b/bin/varnishd/cache/cache_wrk.c > @@ -86,6 +86,7 @@ wrk_bgthread(void *arg) > struct bgthread *bt; > struct worker wrk; > struct VSC_main_wrk ds; > + void *r; > > CAST_OBJ_NOTNULL(bt, arg, BGTHREAD_MAGIC); > THR_SetName(bt->name); > @@ -94,11 +95,12 @@ wrk_bgthread(void *arg) > memset(&ds, 0, sizeof ds); > wrk.stats = &ds; > > - (void)bt->func(&wrk, bt->priv); > + r = bt->func(&wrk, bt->priv); > > - WRONG("BgThread terminated"); > + if (! cache_shutdown) > + WRONG("BgThread terminated"); > > - NEEDLESS(return (NULL)); > + return (r); > } > > void > _______________________________________________ > varnish-commit mailing list > varnish-commit at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit From nils.goroll at uplex.de Tue Jan 14 14:46:05 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Tue, 14 Jan 2020 14:46:05 +0000 (UTC) Subject: [master] 4df4d2a49 avoid the STV_close() race for now Message-ID: <20200114144605.7982C9023@lists.varnish-cache.org> commit 4df4d2a497727a671d2f2b64d3ccd03fc4cbc3d6 Author: Nils Goroll Date: Tue Jan 14 15:44:24 2020 +0100 avoid the STV_close() race for now See #3190 diff --git a/bin/varnishd/storage/storage_umem.c b/bin/varnishd/storage/storage_umem.c index 0c5c06e1c..dc53a1d60 100644 --- a/bin/varnishd/storage/storage_umem.c +++ b/bin/varnishd/storage/storage_umem.c @@ -431,8 +431,12 @@ smu_close(const struct stevedore *st, int warn) CAST_OBJ_NOTNULL(smu_sc, st->priv, SMU_SC_MAGIC); if (warn) return; + +#ifdef WORKAROUND_3190 + /* see ticket 3190 for explanation */ umem_cache_destroyf(smu_sc->smu_cache); smu_sc->smu_cache = NULL; +#endif /* XXX TODO? From dridi.boukelmoune at gmail.com Wed Jan 15 14:42:06 2020 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Wed, 15 Jan 2020 14:42:06 +0000 (UTC) Subject: [master] eb14a0b68 Assert Message-ID: <20200115144206.E8A51ADB77@lists.varnish-cache.org> commit eb14a0b68ded6a332c2e4f528c300678abb39fd7 Author: Dridi Boukelmoune Date: Wed Jan 15 15:39:04 2020 +0100 Assert diff --git a/bin/varnishd/cache/cache_gzip.c b/bin/varnishd/cache/cache_gzip.c index 694ee43d4..33d7e7ae1 100644 --- a/bin/varnishd/cache/cache_gzip.c +++ b/bin/varnishd/cache/cache_gzip.c @@ -314,6 +314,7 @@ vdp_gunzip_init(struct req *req, void **priv) boc = HSH_RefBoc(req->objcore); if (boc != NULL) { + CHECK_OBJ(boc, BOC_MAGIC); bos = boc->state; HSH_DerefBoc(req->wrk, req->objcore); } else From dridi.boukelmoune at gmail.com Wed Jan 15 15:02:06 2020 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Wed, 15 Jan 2020 15:02:06 +0000 (UTC) Subject: [master] d4b6228e1 Fetch thread reference count and keep cached request bodies Message-ID: <20200115150206.13FE9AE3B1@lists.varnish-cache.org> commit d4b6228e1e32cda3014eeff0a5cb60cd7a0b5474 Author: Martin Blix Grydeland Date: Mon Nov 4 11:32:59 2019 +0100 Fetch thread reference count and keep cached request bodies With this patch fetch threads will for completely cached request bodies keep a reference to it for the entire duration of the fetch. This extends the retry window of backend requests with request body beyond the BOS_REQ_DONE point. Patch by: Poul-Henning Kamp diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h index f45e9f1d2..836be9c4e 100644 --- a/bin/varnishd/cache/cache.h +++ b/bin/varnishd/cache/cache.h @@ -401,6 +401,7 @@ struct busyobj { struct http *bereq0; struct http *bereq; struct http *beresp; + struct objcore *bereq_body; struct objcore *stale_oc; struct objcore *fetch_objcore; diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c index a8bede008..808655f0b 100644 --- a/bin/varnishd/cache/cache_fetch.c +++ b/bin/varnishd/cache/cache_fetch.c @@ -241,6 +241,12 @@ vbf_stp_mkbereq(struct worker *wrk, struct busyobj *bo) if (bo->req->req_body_status == REQ_BODY_NONE) { bo->req = NULL; ObjSetState(bo->wrk, bo->fetch_objcore, BOS_REQ_DONE); + } else if (bo->req->req_body_status == REQ_BODY_CACHED) { + AN(bo->req->body_oc); + bo->bereq_body = bo->req->body_oc; + HSH_Ref(bo->bereq_body); + bo->req = NULL; + ObjSetState(bo->wrk, bo->fetch_objcore, BOS_REQ_DONE); } return (F_STP_STARTFETCH); } @@ -969,6 +975,8 @@ vbf_fetch_thread(struct worker *wrk, void *priv) VCL_TaskLeave(bo->privs); http_Teardown(bo->bereq); http_Teardown(bo->beresp); + if (bo->bereq_body != NULL) + HSH_DerefObjCore(bo->wrk, &bo->bereq_body, 0); if (bo->fetch_objcore->boc->state == BOS_FINISHED) { AZ(bo->fetch_objcore->flags & OC_F_FAILED); diff --git a/bin/varnishd/http1/cache_http1_fetch.c b/bin/varnishd/http1/cache_http1_fetch.c index b2882ab3a..30d03d469 100644 --- a/bin/varnishd/http1/cache_http1_fetch.c +++ b/bin/varnishd/http1/cache_http1_fetch.c @@ -104,7 +104,14 @@ V1F_SendReq(struct worker *wrk, struct busyobj *bo, uint64_t *ctr_hdrbytes, /* Deal with any message-body the request might (still) have */ i = 0; - if (bo->req != NULL && + if (bo->bereq_body != NULL) { + if (do_chunked) + V1L_Chunked(wrk); + (void)ObjIterate(bo->wrk, bo->bereq_body, + bo, vbf_iter_req_body, 0); + if (do_chunked) + V1L_EndChunk(wrk); + } else if (bo->req != NULL && (bo->req->req_body_status == REQ_BODY_CACHED || !onlycached)) { if (do_chunked) V1L_Chunked(wrk); From dridi.boukelmoune at gmail.com Wed Jan 15 15:02:06 2020 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Wed, 15 Jan 2020 15:02:06 +0000 (UTC) Subject: [master] f88b47951 Fail fetch retries when uncached request body has been released Message-ID: <20200115150206.2ADDEAE3B4@lists.varnish-cache.org> commit f88b47951415fc212c8b4bb929b5a0db2c0835c0 Author: Martin Blix Grydeland Date: Thu Oct 10 14:30:18 2019 +0200 Fail fetch retries when uncached request body has been released Currently we allow fetch retries with body even after we have released the request that initiated the fetch, and the request body with it. The attached test case demonstrates this, where s2 on the retry attempt gets stuck waiting for 3 bytes of body data that is never sent. Fix this by keeping track of what the initial request body status was, and failing the retry attempt if the request was already released (BOS_REQ_DONE) and the request body was not cached. diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h index 836be9c4e..a8f021645 100644 --- a/bin/varnishd/cache/cache.h +++ b/bin/varnishd/cache/cache.h @@ -389,6 +389,7 @@ struct busyobj { * is recycled. */ unsigned retries; + enum req_body_state_e initial_req_body_status; struct req *req; struct sess *sp; struct worker *wrk; diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c index 808655f0b..7a2e57b37 100644 --- a/bin/varnishd/cache/cache_fetch.c +++ b/bin/varnishd/cache/cache_fetch.c @@ -238,6 +238,7 @@ vbf_stp_mkbereq(struct worker *wrk, struct busyobj *bo) bo->ws_bo = WS_Snapshot(bo->ws); HTTP_Clone(bo->bereq, bo->bereq0); + bo->initial_req_body_status = bo->req->req_body_status; if (bo->req->req_body_status == REQ_BODY_NONE) { bo->req = NULL; ObjSetState(bo->wrk, bo->fetch_objcore, BOS_REQ_DONE); @@ -264,6 +265,15 @@ vbf_stp_retry(struct worker *wrk, struct busyobj *bo) assert(bo->fetch_objcore->boc->state <= BOS_REQ_DONE); + if (bo->fetch_objcore->boc->state == BOS_REQ_DONE && + bo->initial_req_body_status != REQ_BODY_NONE && + bo->bereq_body == NULL) { + /* We have already released the req and there was a + * request body that was not cached. Too late to retry. */ + VSLb(bo->vsl, SLT_Error, "req.body already consumed"); + return (F_STP_FAIL); + } + VSLb_ts_busyobj(bo, "Retry", W_TIM_real(wrk)); /* VDI_Finish (via vbf_cleanup) must have been called before */ diff --git a/bin/varnishtest/tests/r03093.vtc b/bin/varnishtest/tests/r03093.vtc new file mode 100644 index 000000000..f9aaa2a7c --- /dev/null +++ b/bin/varnishtest/tests/r03093.vtc @@ -0,0 +1,45 @@ +varnishtest "r03093 - fail retry on missing req body" + +barrier b1 sock 2 + +server s1 { + rxreq + expect req.method == POST + expect req.body == foo + txresp -nolen -hdr "Content-Length: 3" + barrier b1 sync +} -start + +# In this test s2 should not be called. The attempt to retry should fail because +# the request was already released from the fetch thread in the first attempt. +server s2 { + rxreq + expect req.method == POST + expect req.body == foo + txresp -body bar +} -start + +varnish v1 -arg "-p debug=+syncvsl" -vcl+backend { + import vtc; + sub vcl_backend_fetch { + set bereq.http.retries = bereq.retries; + if (bereq.retries == 1) { + set bereq.backend = s2; + } + } + sub vcl_backend_response { + if (bereq.http.retries == "0") { + vtc.barrier_sync("${b1_sock}"); + } + set beresp.do_stream = false; + } + sub vcl_backend_error { + return (retry); + } +} -start + +client c1 { + txreq -req POST -body foo + rxresp + expect resp.status == 503 +} -run From dridi at varni.sh Wed Jan 15 15:53:37 2020 From: dridi at varni.sh (Dridi Boukelmoune) Date: Wed, 15 Jan 2020 15:53:37 +0000 Subject: [master] 21d3e8e85 test vmod_path for -C In-Reply-To: <20200113154706.09ADB91775@lists.varnish-cache.org> References: <20200113154706.09ADB91775@lists.varnish-cache.org> Message-ID: On Mon, Jan 13, 2020 at 3:47 PM Nils Goroll wrote: > > > commit 21d3e8e8556b0e29fb803d1b4b37089b38a279fc > Author: Nils Goroll > Date: Mon Jan 13 16:45:59 2020 +0100 > > test vmod_path for -C > > diff --git a/bin/varnishtest/tests/m00003.vtc b/bin/varnishtest/tests/m00003.vtc > index 4e5a60ff4..ff9f514ce 100644 > --- a/bin/varnishtest/tests/m00003.vtc > +++ b/bin/varnishtest/tests/m00003.vtc > @@ -7,6 +7,15 @@ server s1 { > txresp > } -start > > +shell { > + echo "vcl 4.1; import std; backend dummy None;" >${tmpdir}/test.vcl > + varnishd -pvmod_path=${topbuild}/lib/libvmod_std/.libs -C -f ${tmpdir}/test.vcl 2>/dev/null > +} > + > +shell -err -expect {Could not find VMOD std} { > + varnishd -C -f ${tmpdir}/test.vcl 2>&1 > +} > + I'm going to remove the second shell introduced by this patch, because in the absence of a vmod_path change it might find one and on my system it does, failing with an ABI mismatch instead. > varnish v1 -arg "-pvmod_path=${topbuild}/lib/libvmod_std/.libs/" \ > -vcl+backend { > import std; > _______________________________________________ > varnish-commit mailing list > varnish-commit at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit From dridi.boukelmoune at gmail.com Wed Jan 15 15:57:07 2020 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Wed, 15 Jan 2020 15:57:07 +0000 (UTC) Subject: [master] 1833d7ddf Whitespace OCD Message-ID: <20200115155707.37831AFAB6@lists.varnish-cache.org> commit 1833d7ddf58ebb2a6c881a9e8a2573fced309020 Author: Dridi Boukelmoune Date: Wed Jan 15 16:46:14 2020 +0100 Whitespace OCD diff --git a/bin/varnishtest/tests/m00003.vtc b/bin/varnishtest/tests/m00003.vtc index ff9f514ce..e42af7590 100644 --- a/bin/varnishtest/tests/m00003.vtc +++ b/bin/varnishtest/tests/m00003.vtc @@ -9,15 +9,15 @@ server s1 { shell { echo "vcl 4.1; import std; backend dummy None;" >${tmpdir}/test.vcl - varnishd -pvmod_path=${topbuild}/lib/libvmod_std/.libs -C -f ${tmpdir}/test.vcl 2>/dev/null + varnishd -pvmod_path=${topbuild}/lib/libvmod_std/.libs \ + -C -f ${tmpdir}/test.vcl 2>/dev/null } shell -err -expect {Could not find VMOD std} { varnishd -C -f ${tmpdir}/test.vcl 2>&1 } -varnish v1 -arg "-pvmod_path=${topbuild}/lib/libvmod_std/.libs/" \ - -vcl+backend { +varnish v1 -arg "-pvmod_path=${topbuild}/lib/libvmod_std/.libs/" -vcl+backend { import std; } -start @@ -41,7 +41,10 @@ varnish v1 -errvcl {Could not open VMOD wrong} { import wrong; } -shell "cp ${topbuild}/lib/libvmod_debug/.libs/libvmod_debug.so ${tmpdir}/libvmod_wrong.so" +shell { + cp ${topbuild}/lib/libvmod_debug/.libs/libvmod_debug.so \ + ${tmpdir}/libvmod_wrong.so +} varnish v1 -errvcl {Malformed VMOD wrong} { import wrong; From dridi.boukelmoune at gmail.com Wed Jan 15 15:57:07 2020 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Wed, 15 Jan 2020 15:57:07 +0000 (UTC) Subject: [master] 75cca3cdf Remove varnishd -C coverage Message-ID: <20200115155707.49F5BAFABA@lists.varnish-cache.org> commit 75cca3cdf39abc15819b0b1eb33fb533d5cc0b20 Author: Dridi Boukelmoune Date: Wed Jan 15 16:54:18 2020 +0100 Remove varnishd -C coverage This check is not deterministic because vmod_std may indeed be found in the default vmod_path defined at configure time. diff --git a/bin/varnishtest/tests/m00003.vtc b/bin/varnishtest/tests/m00003.vtc index e42af7590..3dd8a12d6 100644 --- a/bin/varnishtest/tests/m00003.vtc +++ b/bin/varnishtest/tests/m00003.vtc @@ -13,10 +13,6 @@ shell { -C -f ${tmpdir}/test.vcl 2>/dev/null } -shell -err -expect {Could not find VMOD std} { - varnishd -C -f ${tmpdir}/test.vcl 2>&1 -} - varnish v1 -arg "-pvmod_path=${topbuild}/lib/libvmod_std/.libs/" -vcl+backend { import std; } -start From nils.goroll at uplex.de Wed Jan 15 16:10:11 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Wed, 15 Jan 2020 16:10:11 +0000 (UTC) Subject: [master] 3bb8b84cd generalize the worker pool reserve to avoid deadlocks Message-ID: <20200115161011.685C7B028E@lists.varnish-cache.org> commit 3bb8b84cd86a4d2b95c7e2508ace6d868ced412c Author: Nils Goroll Date: Tue Oct 9 13:16:10 2018 +0200 generalize the worker pool reserve to avoid deadlocks Previously, we used a minimum number of idle threads (the reserve) to ensure that we do not assign all threads with client requests and no threads left over for backend requests. This was actually only a special case of the more general issue exposed by h2: Lower priority tasks depend on higher priority tasks (for h2, sessions need streams, which need requests, which may need backend requests). To solve this problem, we divide the reserve by the number of priority classes and schedule lower priority tasks only if there are enough idle threads to run higher priority tasks eventually. This change does not guarantee any upper limit on the amount of time it can take for a task to be scheduled (e.g. backend requests could be blocking on arbitrarily long timeouts), so the thread pool watchdog is still warranted. But this change should guarantee that we do make progress eventually. With the reserves, thread_pool_min needs to be no smaller than the number of priority classes (TASK_QUEUE__END). Ideally, we should have an even higher minimum (@Dridi rightly suggested to make it 2 * TASK_QUEUE__END), but that would prevent the very useful test t02011.vtc. For now, the value of TASK_QUEUE__END (5) is hardcoded as such for the parameter configuration and documentation because auto-generating it would require include/macro dances which I consider over the top for now. Instead, the respective places are marked and an assert is in place to ensure we do not start a worker with too small a number of workers. I dicided against checks in the manager to avoid include pollution from the worker (cache.h) into the manager. Fixes #2418 for real diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h index a8f021645..0cf024c9c 100644 --- a/bin/varnishd/cache/cache.h +++ b/bin/varnishd/cache/cache.h @@ -214,22 +214,20 @@ struct pool_task { /* * tasks are taken off the queues in this order * - * prios up to TASK_QUEUE_RESERVE are run from the reserve - * * TASK_QUEUE_{REQ|STR} are new req's (H1/H2), and subject to queue limit. * - * TASK_QUEUE_RUSH is req's returning from waiting list, they are - * not subject to TASK_QUEUE_CLIENT because we cannot safely clean - * them up if scheduling them fails. + * TASK_QUEUE_RUSH is req's returning from waiting list + * + * NOTE: When changing the number of classes, update places marked with + * TASK_QUEUE__END in mgt_pool.c */ enum task_prio { TASK_QUEUE_BO, -#define TASK_QUEUE_RESERVE TASK_QUEUE_BO TASK_QUEUE_RUSH, TASK_QUEUE_REQ, TASK_QUEUE_STR, TASK_QUEUE_VCA, - TASK_QUEUE_END + TASK_QUEUE__END }; #define TASK_QUEUE_CLIENT(prio) \ diff --git a/bin/varnishd/cache/cache_pool.c b/bin/varnishd/cache/cache_pool.c index 22b2a7036..58846b4e9 100644 --- a/bin/varnishd/cache/cache_pool.c +++ b/bin/varnishd/cache/cache_pool.c @@ -148,7 +148,7 @@ pool_mkpool(unsigned pool_no) VTAILQ_INIT(&pp->idle_queue); VTAILQ_INIT(&pp->poolsocks); - for (i = 0; i < TASK_QUEUE_END; i++) + for (i = 0; i < TASK_QUEUE__END; i++) VTAILQ_INIT(&pp->queues[i]); AZ(pthread_cond_init(&pp->herder_cond, NULL)); AZ(pthread_create(&pp->herder_thr, NULL, pool_herder, pp)); diff --git a/bin/varnishd/cache/cache_pool.h b/bin/varnishd/cache/cache_pool.h index 4e668fa0b..b4b5890c5 100644 --- a/bin/varnishd/cache/cache_pool.h +++ b/bin/varnishd/cache/cache_pool.h @@ -46,7 +46,7 @@ struct pool { struct lock mtx; unsigned nidle; struct taskhead idle_queue; - struct taskhead queues[TASK_QUEUE_END]; + struct taskhead queues[TASK_QUEUE__END]; unsigned nthr; unsigned lqueue; uintmax_t sdropped; diff --git a/bin/varnishd/cache/cache_wrk.c b/bin/varnishd/cache/cache_wrk.c index 9b90dc10b..d66bfa809 100644 --- a/bin/varnishd/cache/cache_wrk.c +++ b/bin/varnishd/cache/cache_wrk.c @@ -172,12 +172,16 @@ pool_reserve(void) { unsigned lim; - if (cache_param->wthread_reserve == 0) - return (cache_param->wthread_min / 20 + 1); - lim = cache_param->wthread_min * 950 / 1000; - if (cache_param->wthread_reserve > lim) - return (lim); - return (cache_param->wthread_reserve); + if (cache_param->wthread_reserve == 0) { + lim = cache_param->wthread_min / 20 + 1; + } else { + lim = cache_param->wthread_min * 950 / 1000; + if (cache_param->wthread_reserve < lim) + lim = cache_param->wthread_reserve; + } + if (lim < TASK_QUEUE__END) + return (TASK_QUEUE__END); + return (lim); } /*--------------------------------------------------------------------*/ @@ -190,7 +194,7 @@ pool_getidleworker(struct pool *pp, enum task_prio prio) CHECK_OBJ_NOTNULL(pp, POOL_MAGIC); Lck_AssertHeld(&pp->mtx); - if (prio <= TASK_QUEUE_RESERVE || pp->nidle > pool_reserve()) { + if (pp->nidle > (pool_reserve() * prio / TASK_QUEUE__END)) { pt = VTAILQ_FIRST(&pp->idle_queue); if (pt == NULL) AZ(pp->nidle); @@ -262,7 +266,7 @@ Pool_Task(struct pool *pp, struct pool_task *task, enum task_prio prio) CHECK_OBJ_NOTNULL(pp, POOL_MAGIC); AN(task); AN(task->func); - assert(prio < TASK_QUEUE_END); + assert(prio < TASK_QUEUE__END); if (prio == TASK_QUEUE_REQ && reqpoolfail) { retval = reqpoolfail & 1; @@ -334,7 +338,7 @@ Pool_Work_Thread(struct pool *pp, struct worker *wrk) struct pool_task *tp = NULL; struct pool_task tpx, tps; vtim_real tmo; - int i, prio_lim; + int i, reserve; CHECK_OBJ_NOTNULL(pp, POOL_MAGIC); wrk->pool = pp; @@ -345,12 +349,11 @@ Pool_Work_Thread(struct pool *pp, struct worker *wrk) AZ(wrk->vsl); Lck_Lock(&pp->mtx); - if (pp->nidle < pool_reserve()) - prio_lim = TASK_QUEUE_RESERVE + 1; - else - prio_lim = TASK_QUEUE_END; + reserve = pool_reserve(); - for (i = 0; i < prio_lim; i++) { + for (i = 0; i < TASK_QUEUE__END; i++) { + if (pp->nidle < (reserve * i / TASK_QUEUE__END)) + break; tp = VTAILQ_FIRST(&pp->queues[i]); if (tp != NULL) { pp->lqueue--; @@ -656,7 +659,6 @@ static struct cli_proto debug_cmds[] = { void WRK_Init(void) { - + assert(cache_param->wthread_min >= TASK_QUEUE__END); CLI_AddFuncs(debug_cmds); } - diff --git a/bin/varnishd/mgt/mgt_pool.c b/bin/varnishd/mgt/mgt_pool.c index b32224d72..3d7201380 100644 --- a/bin/varnishd/mgt/mgt_pool.c +++ b/bin/varnishd/mgt/mgt_pool.c @@ -57,7 +57,6 @@ static int tweak_thread_pool_min(struct vsb *vsb, const struct parspec *par, const char *arg) { - if (tweak_uint(vsb, par, arg)) return (-1); @@ -115,13 +114,16 @@ struct parspec WRK_parspec[] = { "5000", "threads", "thread_pool_min" }, { "thread_pool_min", tweak_thread_pool_min, &mgt_param.wthread_min, - NULL, NULL, + "5", // TASK_QUEUE__END + NULL, "The minimum number of worker threads in each pool.\n" "\n" "Increasing this may help ramp up faster from low load " "situations or when threads have expired.\n" "\n" - "Minimum is 10 threads.", + "Technical minimum is 5 threads, " // TASK_QUEUE__END + "but this parameter is strongly recommended to be " + "at least 10", // 2 * TASK_QUEUE__END DELAYED_EFFECT, "100", "threads", NULL, "thread_pool_max" }, @@ -132,17 +134,16 @@ struct parspec WRK_parspec[] = { "in each pool.\n" "\n" "Tasks may require other tasks to complete (for example, " - "client requests may require backend requests). This reserve " - "is to ensure that such tasks still get to run even under high " - "load.\n" - "\n" - "Increasing the reserve may help setups with a high number of " - "backend requests at the expense of client performance. " - "Setting it too high will waste resources by keeping threads " - "unused.\n" + "client requests may require backend requests, http2 sessions " + "require streams, which require requests). This reserve is to " + "ensure that lower priority tasks do not prevent higher " + "priority tasks from running even under high load.\n" "\n" - "Default is 0 to auto-tune (currently 5% of thread_pool_min).\n" - "Minimum is 1 otherwise.", + "The effective value is at least 5 (the number of internal " + // ^ TASK_QUEUE__END + "priority classes), irrespective of this parameter.\n" + "Default is 0 to auto-tune (5% of thread_pool_min).\n" + "Minimum is 1 otherwise, maximum is 95% of thread_pool_min.", DELAYED_EFFECT, "0", "threads", NULL, "95% of thread_pool_min" }, diff --git a/bin/varnishtest/tests/r01490.vtc b/bin/varnishtest/tests/r01490.vtc index fa7c8af67..5a91b94d7 100644 --- a/bin/varnishtest/tests/r01490.vtc +++ b/bin/varnishtest/tests/r01490.vtc @@ -6,8 +6,8 @@ server s1 { varnish v1 \ -arg "-p debug=+syncvsl" \ -arg "-p vsl_mask=+WorkThread" \ - -arg "-p thread_pool_min=2" \ - -arg "-p thread_pool_max=3" \ + -arg "-p thread_pool_min=5" \ + -arg "-p thread_pool_max=6" \ -arg "-p thread_pools=1" \ -arg "-p thread_pool_timeout=10" \ -vcl+backend {} @@ -16,27 +16,27 @@ varnish v1 -start # we might have over-bred delay 11 -varnish v1 -expect threads == 2 +varnish v1 -expect threads == 5 logexpect l1 -v v1 -g raw { expect * 0 WorkThread {^\S+ start$} expect * 0 WorkThread {^\S+ end$} } -start -varnish v1 -cliok "param.set thread_pool_min 3" +varnish v1 -cliok "param.set thread_pool_min 6" # Have to wait longer than thread_pool_timeout delay 11 -varnish v1 -expect threads == 3 +varnish v1 -expect threads == 6 -varnish v1 -cliok "param.set thread_pool_min 2" -varnish v1 -cliok "param.set thread_pool_max 2" +varnish v1 -cliok "param.set thread_pool_min 5" +varnish v1 -cliok "param.set thread_pool_max 5" # Have to wait longer than thread_pool_timeout delay 11 -varnish v1 -expect threads == 2 +varnish v1 -expect threads == 5 # Use logexpect to see that the thread actually exited logexpect l1 -wait diff --git a/bin/varnishtest/tests/t02011.vtc b/bin/varnishtest/tests/t02011.vtc index 45ec730c6..10ed15286 100644 --- a/bin/varnishtest/tests/t02011.vtc +++ b/bin/varnishtest/tests/t02011.vtc @@ -16,15 +16,12 @@ server s1 { # - one for stream 1 # - one for the backend request # -# To work around the reserve's default logic, an additional thread can be -# created, but won't be consumed for stream 3 because the pool will reserve -# it for a backend transaction. Otherwise it could starve the pool and dead -# lock v1. +# thread priorities ensure that there is exactly one thread per class +# at this point, so when we try to get a second stream, we fail. varnish v1 -cliok "param.set thread_pools 1" -varnish v1 -cliok "param.set thread_pool_min 4" -varnish v1 -cliok "param.set thread_pool_max 4" -varnish v1 -cliok "param.set thread_pool_reserve 1" +varnish v1 -cliok "param.set thread_pool_min 5" +varnish v1 -cliok "param.set thread_pool_max 5" varnish v1 -cliok "param.set thread_queue_limit 0" varnish v1 -cliok "param.set thread_stats_rate 1" varnish v1 -cliok "param.set feature +http2" @@ -69,7 +66,10 @@ client c1 { } -run # trigger an update of the stats -varnish v1 -cliok "param.set thread_pool_min 3" +varnish v1 -cliok "param.set thread_pool_max 6" +varnish v1 -cliok "param.set thread_pool_min 6" +delay 1 +varnish v1 -cliok "param.set thread_pool_min 5" delay 1 varnish v1 -vsl_catchup varnish v1 -expect sess_dropped == 0 From nils.goroll at uplex.de Wed Jan 15 16:10:11 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Wed, 15 Jan 2020 16:10:11 +0000 (UTC) Subject: [master] 5fe2a46da remove a now pointless vtc Message-ID: <20200115161011.88A8CB0290@lists.varnish-cache.org> commit 5fe2a46da85c2917cd192d0de42508da0fd1b6a3 Author: Nils Goroll Date: Mon Oct 28 18:34:53 2019 +0100 remove a now pointless vtc This test is to detect a deadlock which does not exist any more. IMHO, the only sensible way to test for the lack of it now is to do a load test, which is not what we want in vtc. diff --git a/bin/varnishtest/tests/r02418.vtc b/bin/varnishtest/tests/r02418.vtc deleted file mode 100644 index 01e8feee0..000000000 --- a/bin/varnishtest/tests/r02418.vtc +++ /dev/null @@ -1,72 +0,0 @@ -varnishtest "h2 queuing deadlock" - -barrier b1 cond 2 - -# A reserve of 1 thread in a pool of 3 leaves a maximum -# of 2 running sessions, the streams will be queued (except -# stream 0 that is part of the h2 session). - -varnish v1 -cliok "param.set thread_pools 1" -varnish v1 -cliok "param.set thread_pool_min 3" -varnish v1 -cliok "param.set thread_pool_max 3" -varnish v1 -cliok "param.set thread_pool_reserve 1" -varnish v1 -cliok "param.set thread_pool_watchdog 5" -varnish v1 -cliok "param.set feature +http2" -varnish v1 -cliok "param.set feature +no_coredump" - -varnish v1 -vcl { - backend b1 None; - sub vcl_recv { - return (synth(200)); - } -} -start - -logexpect l1 -v v1 -g raw { - expect * * Error "Pool Herder: Queue does not move*" -} -start - -# Starve the pool with h2 sessions - -client c1 { - txpri - stream 0 rxsettings -run - - barrier b1 sync - - stream 1 { - txreq - # can't be scheduled, don't rx - } -run -} -start - -client c2 { - txpri - stream 0 rxsettings -run - - barrier b1 sync - - stream 1 { - txreq - # can't be scheduled, don't rx - } -run -} -start - -client c1 -wait -client c2 -wait - -varnish v1 -vsl_catchup - -# At this point c1 and c2 closed their connections - -client c3 { - txreq - delay 10 -} -run - -logexpect l1 -wait - -varnish v1 -cliok panic.show -varnish v1 -cliok panic.clear - -varnish v1 -expectexit 0x20 - From nils.goroll at uplex.de Wed Jan 15 16:12:07 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Wed, 15 Jan 2020 16:12:07 +0000 (UTC) Subject: [master] 6a08beba4 split out proxyv1 formatting Message-ID: <20200115161207.98C91B071D@lists.varnish-cache.org> commit 6a08beba48a92f1a73c0565de5edc9a0c27d37d5 Author: Nils Goroll Date: Fri Nov 23 15:26:19 2018 +0100 split out proxyv1 formatting Note: this partially reverts cf14a0fd774fcbcd4bfd2d50bcbe029f63ff7e0e to prepare for bytes accounting in a later patch diff --git a/bin/varnishd/proxy/cache_proxy_proto.c b/bin/varnishd/proxy/cache_proxy_proto.c index 80d93349e..69722805f 100644 --- a/bin/varnishd/proxy/cache_proxy_proto.c +++ b/bin/varnishd/proxy/cache_proxy_proto.c @@ -606,11 +606,36 @@ vpx_enc_port(struct vsb *vsb, const struct suckaddr *s) VSB_bcat(vsb, b, sizeof(b)); } +/* short path for stringified addresses from session attributes */ +static void +vpx_format_proxy_v1(struct vsb *vsb, int proto, + const char *cip, const char *cport, + const char *sip, const char *sport) +{ + AN(vsb); + AN(cip); + AN(cport); + AN(sip); + AN(sport); + + VSB_bcat(vsb, vpx1_sig, sizeof(vpx1_sig)); + + if (proto == PF_INET6) + VSB_cat(vsb, " TCP6 "); + else if (proto == PF_INET) + VSB_cat(vsb, " TCP4 "); + else + WRONG("Wrong proxy v1 proto"); + + VSB_printf(vsb, "%s %s %s %s\r\n", cip, sip, cport, sport); + + AZ(VSB_finish(vsb)); +} + void VPX_Send_Proxy(int fd, int version, const struct sess *sp) { struct vsb *vsb, *vsb2; - const char *p1, *p2; struct suckaddr *sac, *sas; char ha[VTCP_ADDRBUFSIZE]; char pa[VTCP_PORTBUFSIZE]; @@ -627,17 +652,11 @@ VPX_Send_Proxy(int fd, int version, const struct sess *sp) assert(proto == PF_INET6 || proto == PF_INET); if (version == 1) { - VSB_bcat(vsb, vpx1_sig, sizeof(vpx1_sig)); - p1 = SES_Get_String_Attr(sp, SA_CLIENT_IP); - AN(p1); - p2 = SES_Get_String_Attr(sp, SA_CLIENT_PORT); - AN(p2); VTCP_name(sas, ha, sizeof ha, pa, sizeof pa); - if (proto == PF_INET6) - VSB_cat(vsb, " TCP6 "); - else if (proto == PF_INET) - VSB_cat(vsb, " TCP4 "); - VSB_printf(vsb, "%s %s %s %s\r\n", p1, ha, p2, pa); + vpx_format_proxy_v1(vsb, proto, + SES_Get_String_Attr(sp, SA_CLIENT_IP), + SES_Get_String_Attr(sp, SA_CLIENT_PORT), + ha, pa); } else if (version == 2) { AZ(SES_Get_client_addr(sp, &sac)); AN(sac); @@ -657,11 +676,12 @@ VPX_Send_Proxy(int fd, int version, const struct sess *sp) vpx_enc_addr(vsb, proto, sas); vpx_enc_port(vsb, sac); vpx_enc_port(vsb, sas); + AZ(VSB_finish(vsb)); } else WRONG("Wrong proxy version"); - AZ(VSB_finish(vsb)); - (void)VSB_tofile(fd, vsb); // XXX: Error handling ? + (void)write(fd, VSB_data(vsb), VSB_len(vsb)); + if (!DO_DEBUG(DBG_PROTOCOL)) { VSB_delete(vsb); return; From nils.goroll at uplex.de Wed Jan 15 16:12:07 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Wed, 15 Jan 2020 16:12:07 +0000 (UTC) Subject: [master] 519737ac4 split out proxyv2 formatting Message-ID: <20200115161207.B3B7EB0720@lists.varnish-cache.org> commit 519737ac4c4e5b4f878b7d4a30f95ddd5008029a Author: Nils Goroll Date: Fri Nov 23 15:31:37 2018 +0100 split out proxyv2 formatting diff --git a/bin/varnishd/proxy/cache_proxy_proto.c b/bin/varnishd/proxy/cache_proxy_proto.c index 69722805f..0f86d944e 100644 --- a/bin/varnishd/proxy/cache_proxy_proto.c +++ b/bin/varnishd/proxy/cache_proxy_proto.c @@ -632,6 +632,34 @@ vpx_format_proxy_v1(struct vsb *vsb, int proto, AZ(VSB_finish(vsb)); } +static void +vpx_format_proxy_v2(struct vsb *vsb, int proto, + const struct suckaddr *sac, const struct suckaddr *sas) +{ + AN(vsb); + AN(sac); + AN(sas); + + VSB_bcat(vsb, vpx2_sig, sizeof(vpx2_sig)); + VSB_putc(vsb, 0x21); + if (proto == PF_INET6) { + VSB_putc(vsb, 0x21); + VSB_putc(vsb, 0x00); + VSB_putc(vsb, 0x24); + } else if (proto == PF_INET) { + VSB_putc(vsb, 0x11); + VSB_putc(vsb, 0x00); + VSB_putc(vsb, 0x0c); + } else { + WRONG("Wrong proxy v2 proto"); + } + vpx_enc_addr(vsb, proto, sac); + vpx_enc_addr(vsb, proto, sas); + vpx_enc_port(vsb, sac); + vpx_enc_port(vsb, sas); + AZ(VSB_finish(vsb)); +} + void VPX_Send_Proxy(int fd, int version, const struct sess *sp) { @@ -649,7 +677,6 @@ VPX_Send_Proxy(int fd, int version, const struct sess *sp) AZ(SES_Get_server_addr(sp, &sas)); AN(sas); proto = VSA_Get_Proto(sas); - assert(proto == PF_INET6 || proto == PF_INET); if (version == 1) { VTCP_name(sas, ha, sizeof ha, pa, sizeof pa); @@ -660,23 +687,7 @@ VPX_Send_Proxy(int fd, int version, const struct sess *sp) } else if (version == 2) { AZ(SES_Get_client_addr(sp, &sac)); AN(sac); - - VSB_bcat(vsb, vpx2_sig, sizeof(vpx2_sig)); - VSB_putc(vsb, 0x21); - if (proto == PF_INET6) { - VSB_putc(vsb, 0x21); - VSB_putc(vsb, 0x00); - VSB_putc(vsb, 0x24); - } else if (proto == PF_INET) { - VSB_putc(vsb, 0x11); - VSB_putc(vsb, 0x00); - VSB_putc(vsb, 0x0c); - } - vpx_enc_addr(vsb, proto, sac); - vpx_enc_addr(vsb, proto, sas); - vpx_enc_port(vsb, sac); - vpx_enc_port(vsb, sas); - AZ(VSB_finish(vsb)); + vpx_format_proxy_v2(vsb, proto, sac, sas); } else WRONG("Wrong proxy version"); From nils.goroll at uplex.de Wed Jan 15 16:12:07 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Wed, 15 Jan 2020 16:12:07 +0000 (UTC) Subject: [master] 461a22a46 Add VPX_Format_Proxy Message-ID: <20200115161207.D2079B0725@lists.varnish-cache.org> commit 461a22a464da9b1ecde7b83efbf1cbc4da5a9914 Author: Nils Goroll Date: Fri Nov 23 15:47:58 2018 +0100 Add VPX_Format_Proxy diff --git a/bin/varnishd/proxy/cache_proxy.h b/bin/varnishd/proxy/cache_proxy.h index 1e4dd2540..c8d07ddb5 100644 --- a/bin/varnishd/proxy/cache_proxy.h +++ b/bin/varnishd/proxy/cache_proxy.h @@ -39,3 +39,5 @@ #define PP2_SUBTYPE_SSL_MAX 0x25 int VPX_tlv(const struct req *req, int tlv, void **dst, int *len); +void VPX_Format_Proxy(struct vsb *, int, const struct suckaddr *, + const struct suckaddr *); diff --git a/bin/varnishd/proxy/cache_proxy_proto.c b/bin/varnishd/proxy/cache_proxy_proto.c index 0f86d944e..dcb4a3de9 100644 --- a/bin/varnishd/proxy/cache_proxy_proto.c +++ b/bin/varnishd/proxy/cache_proxy_proto.c @@ -660,6 +660,35 @@ vpx_format_proxy_v2(struct vsb *vsb, int proto, AZ(VSB_finish(vsb)); } +void +VPX_Format_Proxy(struct vsb *vsb, int version, + const struct suckaddr *sac, const struct suckaddr *sas) +{ + int proto; + char hac[VTCP_ADDRBUFSIZE]; + char pac[VTCP_PORTBUFSIZE]; + char has[VTCP_ADDRBUFSIZE]; + char pas[VTCP_PORTBUFSIZE]; + + AN(vsb); + AN(sac); + AN(sas); + + assert(version == 1 || version == 2); + + proto = VSA_Get_Proto(sas); + assert(proto == VSA_Get_Proto(sac)); + + if (version == 1) { + VTCP_name(sac, hac, sizeof hac, pac, sizeof pac); + VTCP_name(sas, has, sizeof has, pas, sizeof pas); + vpx_format_proxy_v1(vsb, proto, hac, pac, has, pas); + } else if (version == 2) { + vpx_format_proxy_v2(vsb, proto, sac, sas); + } else + WRONG("Wrong proxy version"); +} + void VPX_Send_Proxy(int fd, int version, const struct sess *sp) { From nils.goroll at uplex.de Wed Jan 15 16:12:07 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Wed, 15 Jan 2020 16:12:07 +0000 (UTC) Subject: [master] de50fefc7 wrap VPX_Format_Proxy for VRT Message-ID: <20200115161208.03F4EB072D@lists.varnish-cache.org> commit de50fefc7b1a675d6c6c0c45f5337b8fb7078b61 Author: Nils Goroll Date: Fri Nov 23 15:56:16 2018 +0100 wrap VPX_Format_Proxy for VRT diff --git a/bin/varnishd/cache/cache_vrt.c b/bin/varnishd/cache/cache_vrt.c index 959b4be16..d1ad0f6d6 100644 --- a/bin/varnishd/cache/cache_vrt.c +++ b/bin/varnishd/cache/cache_vrt.c @@ -47,6 +47,7 @@ #include "common/heritage.h" #include "common/vsmw.h" +#include "proxy/cache_proxy.h" const void * const vrt_magic_string_end = &vrt_magic_string_end; const void * const vrt_magic_string_unset = &vrt_magic_string_unset; @@ -986,3 +987,9 @@ VRT_VSA_GetPtr(VRT_CTX, const struct suckaddr *sua, const unsigned char ** dst) } return (VSA_GetPtr(sua, dst)); } + +void +VRT_Format_Proxy(struct vsb *vsb, VCL_INT version, VCL_IP sac, VCL_IP sas) +{ + VPX_Format_Proxy(vsb, (int)version, sac, sas); +} diff --git a/include/vrt.h b/include/vrt.h index 5e2543e1c..b8ee0fc61 100644 --- a/include/vrt.h +++ b/include/vrt.h @@ -76,6 +76,7 @@ * VRT_Stv_*() functions renamed to VRT_stevedore_*() * [cache.h] WS_ReserveAll() added * [cache.h] WS_Reserve(ws, 0) deprecated + * VRT_Fortmat_Proxy() added * 9.0 (2019-03-15) * Make 'len' in vmod_priv 'long' * HTTP_Copy() removed @@ -549,6 +550,7 @@ void VRT_DelDirector(VCL_BACKEND *); /* Suckaddr related */ int VRT_VSA_GetPtr(VRT_CTX, VCL_IP sua, const unsigned char ** dst); +void VRT_Format_Proxy(struct vsb *, VCL_INT, VCL_IP, VCL_IP); typedef int vmod_event_f(VRT_CTX, struct vmod_priv *, enum vcl_event_e); From nils.goroll at uplex.de Wed Jan 15 16:12:08 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Wed, 15 Jan 2020 16:12:08 +0000 (UTC) Subject: [master] d4a28b987 add error checking and accounting for sending proxy headers Message-ID: <20200115161208.29A2EB0731@lists.varnish-cache.org> commit d4a28b98783786cc25012035b700c9c14c4bcf7f Author: Nils Goroll Date: Fri Nov 30 21:08:54 2018 +0100 add error checking and accounting for sending proxy headers diff --git a/bin/varnishd/cache/cache_backend.c b/bin/varnishd/cache/cache_backend.c index d1c4b90b7..31767b4a1 100644 --- a/bin/varnishd/cache/cache_backend.c +++ b/bin/varnishd/cache/cache_backend.c @@ -172,8 +172,27 @@ vbe_dir_getfd(struct worker *wrk, struct backend *bp, struct busyobj *bo, bp->vsc->req++; Lck_Unlock(&bp->mtx); + err = 0; if (bp->proxy_header != 0) - VPX_Send_Proxy(*fdp, bp->proxy_header, bo->sp); + err += VPX_Send_Proxy(*fdp, bp->proxy_header, bo->sp); + if (err < 0) { + VSLb(bo->vsl, SLT_FetchError, + "backend %s: proxy write errno %d (%s)", + VRT_BACKEND_string(bp->director), + errno, vstrerror(errno)); + // account as if connect failed - good idea? + VSC_C_main->backend_fail++; + bo->htc = NULL; + VTP_Close(&pfd); + AZ(pfd); + Lck_Lock(&bp->mtx); + bp->n_conn--; + bp->vsc->conn--; + bp->vsc->req--; + Lck_Unlock(&bp->mtx); + return (NULL); + } + bo->acct.bereq_hdrbytes += err; PFD_LocalName(pfd, abuf1, sizeof abuf1, pbuf1, sizeof pbuf1); PFD_RemoteName(pfd, abuf2, sizeof abuf2, pbuf2, sizeof pbuf2); diff --git a/bin/varnishd/cache/cache_transport.h b/bin/varnishd/cache/cache_transport.h index 5da5e3501..2551665b5 100644 --- a/bin/varnishd/cache/cache_transport.h +++ b/bin/varnishd/cache/cache_transport.h @@ -75,7 +75,7 @@ void H2_PU_Sess(struct worker *, struct sess *, struct req *); void H2_OU_Sess(struct worker *, struct sess *, struct req *); const struct transport *XPORT_ByNumber(uint16_t no); -void VPX_Send_Proxy(int fd, int version, const struct sess *); +int VPX_Send_Proxy(int fd, int version, const struct sess *); /* cache_session.c */ struct sess *SES_New(struct pool *); diff --git a/bin/varnishd/proxy/cache_proxy_proto.c b/bin/varnishd/proxy/cache_proxy_proto.c index dcb4a3de9..0c829dc11 100644 --- a/bin/varnishd/proxy/cache_proxy_proto.c +++ b/bin/varnishd/proxy/cache_proxy_proto.c @@ -689,14 +689,14 @@ VPX_Format_Proxy(struct vsb *vsb, int version, WRONG("Wrong proxy version"); } -void +int VPX_Send_Proxy(int fd, int version, const struct sess *sp) { struct vsb *vsb, *vsb2; struct suckaddr *sac, *sas; char ha[VTCP_ADDRBUFSIZE]; char pa[VTCP_PORTBUFSIZE]; - int proto; + int proto, r; CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); assert(version == 1 || version == 2); @@ -720,11 +720,11 @@ VPX_Send_Proxy(int fd, int version, const struct sess *sp) } else WRONG("Wrong proxy version"); - (void)write(fd, VSB_data(vsb), VSB_len(vsb)); + r = write(fd, VSB_data(vsb), VSB_len(vsb)); if (!DO_DEBUG(DBG_PROTOCOL)) { VSB_delete(vsb); - return; + return (r); } vsb2 = VSB_new_auto(); @@ -735,4 +735,5 @@ VPX_Send_Proxy(int fd, int version, const struct sess *sp) VSL(SLT_Debug, 999, "PROXY_HDR %s", VSB_data(vsb2)); VSB_delete(vsb); VSB_delete(vsb2); + return (r); } From nils.goroll at uplex.de Wed Jan 15 16:12:08 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Wed, 15 Jan 2020 16:12:08 +0000 (UTC) Subject: [master] a74315bce format proxy header on the stack Message-ID: <20200115161208.45D23B073D@lists.varnish-cache.org> commit a74315bcebce9aae690e53847581e7f94033eff1 Author: Nils Goroll Date: Tue Apr 16 18:13:56 2019 +0200 format proxy header on the stack diff --git a/bin/varnishd/proxy/cache_proxy_proto.c b/bin/varnishd/proxy/cache_proxy_proto.c index 0c829dc11..2ee6f82d2 100644 --- a/bin/varnishd/proxy/cache_proxy_proto.c +++ b/bin/varnishd/proxy/cache_proxy_proto.c @@ -689,19 +689,24 @@ VPX_Format_Proxy(struct vsb *vsb, int version, WRONG("Wrong proxy version"); } +#define PXY_BUFSZ \ + sizeof(vpx1_sig) + 4 /* TCPx */ + \ + 2 * VTCP_ADDRBUFSIZE + 2 * VTCP_PORTBUFSIZE + \ + 6 /* spaces, CRLF */ + 16 /* safety */ + int VPX_Send_Proxy(int fd, int version, const struct sess *sp) { - struct vsb *vsb, *vsb2; + struct vsb vsb[1], *vsb2; struct suckaddr *sac, *sas; char ha[VTCP_ADDRBUFSIZE]; char pa[VTCP_PORTBUFSIZE]; + char buf[PXY_BUFSZ]; int proto, r; CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); assert(version == 1 || version == 2); - vsb = VSB_new_auto(); - AN(vsb); + AN(VSB_new(vsb, buf, sizeof buf, VSB_FIXEDLEN)); AZ(SES_Get_server_addr(sp, &sas)); AN(sas); @@ -737,3 +742,5 @@ VPX_Send_Proxy(int fd, int version, const struct sess *sp) VSB_delete(vsb2); return (r); } + +#undef PXY_BUFSZ From nils.goroll at uplex.de Wed Jan 15 16:12:08 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Wed, 15 Jan 2020 16:12:08 +0000 (UTC) Subject: [master] 99ec7796d Add capability to send the authority TLV in the PROXY header Message-ID: <20200115161208.789A9B0742@lists.varnish-cache.org> commit 99ec7796d8f475db038a44054c72b34d1ef889f9 Author: Geoff Simmons Date: Wed Aug 21 14:33:45 2019 +0200 Add capability to send the authority TLV in the PROXY header This gives the receiver of the PROXY header (usually the ssl-onloader) the opportunity to set the SNI (HostName field) from the TLV value, for the TLS handshake with the remote backend. From https://github.com/nigoroll/varnish-cache/commit/e0eb7d0a9c65cdc3c58978656b4c71f4ab8aabca edited by @nigoroll to split out the proxy header functionality. Add vmod_debug access to the proxy header formatting and test it diff --git a/bin/varnishd/cache/cache_vrt.c b/bin/varnishd/cache/cache_vrt.c index d1ad0f6d6..d6d32ca0a 100644 --- a/bin/varnishd/cache/cache_vrt.c +++ b/bin/varnishd/cache/cache_vrt.c @@ -989,7 +989,8 @@ VRT_VSA_GetPtr(VRT_CTX, const struct suckaddr *sua, const unsigned char ** dst) } void -VRT_Format_Proxy(struct vsb *vsb, VCL_INT version, VCL_IP sac, VCL_IP sas) +VRT_Format_Proxy(struct vsb *vsb, VCL_INT version, VCL_IP sac, VCL_IP sas, + VCL_STRING auth) { - VPX_Format_Proxy(vsb, (int)version, sac, sas); + VPX_Format_Proxy(vsb, (int)version, sac, sas, auth); } diff --git a/bin/varnishd/proxy/cache_proxy.h b/bin/varnishd/proxy/cache_proxy.h index c8d07ddb5..97c11deaf 100644 --- a/bin/varnishd/proxy/cache_proxy.h +++ b/bin/varnishd/proxy/cache_proxy.h @@ -40,4 +40,4 @@ int VPX_tlv(const struct req *req, int tlv, void **dst, int *len); void VPX_Format_Proxy(struct vsb *, int, const struct suckaddr *, - const struct suckaddr *); + const struct suckaddr *, const char *); diff --git a/bin/varnishd/proxy/cache_proxy_proto.c b/bin/varnishd/proxy/cache_proxy_proto.c index 2ee6f82d2..4a9d0e681 100644 --- a/bin/varnishd/proxy/cache_proxy_proto.c +++ b/bin/varnishd/proxy/cache_proxy_proto.c @@ -606,6 +606,24 @@ vpx_enc_port(struct vsb *vsb, const struct suckaddr *s) VSB_bcat(vsb, b, sizeof(b)); } +static void +vpx_enc_authority(struct vsb *vsb, const char *authority, size_t l_authority) +{ + uint16_t l; + + AN(vsb); + + if (l_authority == 0) + return; + AN(authority); + AN(*authority); + + VSB_putc(vsb, PP2_TYPE_AUTHORITY); + vbe16enc(&l, l_authority); + VSB_bcat(vsb, &l, sizeof(l)); + VSB_cat(vsb, authority); +} + /* short path for stringified addresses from session attributes */ static void vpx_format_proxy_v1(struct vsb *vsb, int proto, @@ -634,22 +652,33 @@ vpx_format_proxy_v1(struct vsb *vsb, int proto, static void vpx_format_proxy_v2(struct vsb *vsb, int proto, - const struct suckaddr *sac, const struct suckaddr *sas) + const struct suckaddr *sac, const struct suckaddr *sas, + const char *authority) { + size_t l_authority = 0; + uint16_t l_tlv = 0, l; + AN(vsb); AN(sac); AN(sas); + if (authority != NULL && *authority != '\0') { + l_authority = strlen(authority); + /* 3 bytes in the TLV before the authority string */ + assert(3 + l_authority <= UINT16_MAX); + l_tlv = 3 + l_authority; + } + VSB_bcat(vsb, vpx2_sig, sizeof(vpx2_sig)); VSB_putc(vsb, 0x21); if (proto == PF_INET6) { VSB_putc(vsb, 0x21); - VSB_putc(vsb, 0x00); - VSB_putc(vsb, 0x24); + vbe16enc(&l, 0x24 + l_tlv); + VSB_bcat(vsb, &l, sizeof(l)); } else if (proto == PF_INET) { VSB_putc(vsb, 0x11); - VSB_putc(vsb, 0x00); - VSB_putc(vsb, 0x0c); + vbe16enc(&l, 0x0c + l_tlv); + VSB_bcat(vsb, &l, sizeof(l)); } else { WRONG("Wrong proxy v2 proto"); } @@ -657,12 +686,14 @@ vpx_format_proxy_v2(struct vsb *vsb, int proto, vpx_enc_addr(vsb, proto, sas); vpx_enc_port(vsb, sac); vpx_enc_port(vsb, sas); + vpx_enc_authority(vsb, authority, l_authority); AZ(VSB_finish(vsb)); } void VPX_Format_Proxy(struct vsb *vsb, int version, - const struct suckaddr *sac, const struct suckaddr *sas) + const struct suckaddr *sac, const struct suckaddr *sas, + const char *authority) { int proto; char hac[VTCP_ADDRBUFSIZE]; @@ -684,7 +715,7 @@ VPX_Format_Proxy(struct vsb *vsb, int version, VTCP_name(sas, has, sizeof has, pas, sizeof pas); vpx_format_proxy_v1(vsb, proto, hac, pac, has, pas); } else if (version == 2) { - vpx_format_proxy_v2(vsb, proto, sac, sas); + vpx_format_proxy_v2(vsb, proto, sac, sas, authority); } else WRONG("Wrong proxy version"); } @@ -721,7 +752,7 @@ VPX_Send_Proxy(int fd, int version, const struct sess *sp) } else if (version == 2) { AZ(SES_Get_client_addr(sp, &sac)); AN(sac); - vpx_format_proxy_v2(vsb, proto, sac, sas); + vpx_format_proxy_v2(vsb, proto, sac, sas, NULL); } else WRONG("Wrong proxy version"); diff --git a/bin/varnishtest/tests/o00003.vtc b/bin/varnishtest/tests/o00003.vtc index c883131d4..34d96e0bb 100644 --- a/bin/varnishtest/tests/o00003.vtc +++ b/bin/varnishtest/tests/o00003.vtc @@ -1,4 +1,4 @@ -varnishtest "VCL backend side access to IP#s" +varnishtest "VCL backend side access to IP#s and debug.proxy_header" server s1 { rxreq @@ -6,11 +6,20 @@ server s1 { } -start varnish v1 -proto PROXY -vcl+backend { + import vtc; + import blob; + sub vcl_backend_response { set beresp.http.li = local.ip; set beresp.http.ri = remote.ip; set beresp.http.ci = client.ip; set beresp.http.si = server.ip; + + set beresp.http.proxy1 = blob.encode(blob=blob.sub( + vtc.proxy_header(v1, client.ip, server.ip), 36B)); + set beresp.http.proxy2 = blob.encode(encoding=HEX, + blob=vtc.proxy_header(v2, client.ip, server.ip, + "vtc.varnish-cache.org")); } } -start @@ -20,4 +29,6 @@ client c1 -proxy1 "1.2.3.4:1111 5.6.7.8:5678" { expect resp.http.li == ${v1_addr} expect resp.http.ci == 1.2.3.4 expect resp.http.si == 5.6.7.8 + expect resp.http.proxy1 == "PROXY TCP4 1.2.3.4 5.6.7.8 1111 5678" + expect resp.http.proxy2 == "0d0a0d0a000d0a515549540a2111002401020304050607080457162e0200157674632e7661726e6973682d63616368652e6f7267" } -run diff --git a/include/vrt.h b/include/vrt.h index b8ee0fc61..168a4251e 100644 --- a/include/vrt.h +++ b/include/vrt.h @@ -57,6 +57,7 @@ * VRT_HashStrands32() added * VRT_l_resp_body() changed * VRT_l_beresp_body() changed + * VRT_Format_Proxy() added // transitional interface * 10.0 (2019-09-15) * VRT_UpperLowerStrands added. * VRT_synth_page now takes STRANDS argument @@ -76,7 +77,6 @@ * VRT_Stv_*() functions renamed to VRT_stevedore_*() * [cache.h] WS_ReserveAll() added * [cache.h] WS_Reserve(ws, 0) deprecated - * VRT_Fortmat_Proxy() added * 9.0 (2019-03-15) * Make 'len' in vmod_priv 'long' * HTTP_Copy() removed @@ -550,7 +550,8 @@ void VRT_DelDirector(VCL_BACKEND *); /* Suckaddr related */ int VRT_VSA_GetPtr(VRT_CTX, VCL_IP sua, const unsigned char ** dst); -void VRT_Format_Proxy(struct vsb *, VCL_INT, VCL_IP, VCL_IP); +/* transitional interface */ +void VRT_Format_Proxy(struct vsb *, VCL_INT, VCL_IP, VCL_IP, VCL_STRING); typedef int vmod_event_f(VRT_CTX, struct vmod_priv *, enum vcl_event_e); diff --git a/lib/libvmod_vtc/vmod.vcc b/lib/libvmod_vtc/vmod.vcc index d111f9eb6..22d3dded1 100644 --- a/lib/libvmod_vtc/vmod.vcc +++ b/lib/libvmod_vtc/vmod.vcc @@ -155,6 +155,18 @@ Returns the size in bytes of a collection of C-datatypes: This can be useful for VMOD authors in conjunction with workspace operations. +$Function BLOB proxy_header(ENUM {v1,v2} version, + IP client, IP server, STRING authority=0) + +Format a proxy header of the given version ``v1`` or ``v2`` and +addresses (The VCL IP type also conatins the port number). + +Optionally also send an authority TLV with version ``v2`` (ignored for +version ``v1``). + +Candidate for moving into vmod_proxy, but there were concerns about +the interface design + SEE ALSO ======== diff --git a/lib/libvmod_vtc/vmod_vtc.c b/lib/libvmod_vtc/vmod_vtc.c index fac65a75c..cb3e3a19e 100644 --- a/lib/libvmod_vtc/vmod_vtc.c +++ b/lib/libvmod_vtc/vmod_vtc.c @@ -35,6 +35,7 @@ #include "cache/cache.h" +#include "vsb.h" #include "vtcp.h" #include "vtim.h" @@ -331,3 +332,41 @@ vmod_typesize(VRT_CTX, VCL_STRING s) i += (p - a); /* pad */ return ((VCL_INT)i); } + +/*--------------------------------------------------------------------*/ + +#define BLOB_VMOD_PROXY_HEADER_TYPE 0xc8f34f78 + +VCL_BLOB v_matchproto_(td_vtc_proxy_header) +vmod_proxy_header(VRT_CTX, VCL_ENUM venum, VCL_IP client, VCL_IP server, + VCL_STRING authority) +{ + struct vsb *vsb; + const void *h; + int version; + size_t l; + + CHECK_OBJ_ORNULL(ctx, VRT_CTX_MAGIC); + + if (venum == VENUM(v1)) + version = 1; + else if (venum == VENUM(v2)) + version = 2; + else + WRONG(venum); + + vsb = VSB_new_auto(); + AN(vsb); + VRT_Format_Proxy(vsb, version, client, server, authority); + l = VSB_len(vsb); + h = WS_Copy(ctx->ws, VSB_data(vsb), l); + VSB_delete(vsb); + + if (h == NULL) { + VRT_fail(ctx, "proxy_header: out of workspace"); + return (NULL); + } + + return (VRT_blob(ctx, "proxy_header", h, l, + BLOB_VMOD_PROXY_HEADER_TYPE)); +} From nils.goroll at uplex.de Wed Jan 15 16:15:07 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Wed, 15 Jan 2020 16:15:07 +0000 (UTC) Subject: [master] 5df27a080 Add information about vcl object instances to the panic output Message-ID: <20200115161507.8BD8F245C@lists.varnish-cache.org> commit 5df27a080f2965f6cac9c9768027d57ab5b7567e Author: Nils Goroll Date: Sat Apr 6 14:33:07 2019 +0200 Add information about vcl object instances to the panic output In the absence of a core dump, we do not have any information yet in the panic output about vcl object instances, for example to find out which object a priv belongs to when the instance address is used for per-instance priv state. To make this information available at the time of a panic, we add the following: * A struct vrt_ii (for instance info), of which a static gets filled in by VCC to contain the pointers to the C global variable instance pointers at VCC time * A pointer to this struct from the VCL_conf to make it available to the varnishd worker * dumps of the instance info for panics diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c index d74f964b4..5eed51733 100644 --- a/bin/varnishd/cache/cache_vcl.c +++ b/bin/varnishd/cache/cache_vcl.c @@ -44,6 +44,7 @@ #include "cache_vcl.h" #include "vcli_serve.h" #include "vtim.h" +#include "vcc_interface.h" const struct vcltemp VCL_TEMP_INIT[1] = {{ .name = "init", .is_cold = 1 }}; const struct vcltemp VCL_TEMP_COLD[1] = {{ .name = "cold", .is_cold = 1 }}; @@ -208,6 +209,7 @@ vcl_find(const char *name) void VCL_Panic(struct vsb *vsb, const char *nm, const struct vcl *vcl) { + const struct vpi_ii *ii; int i; AN(vsb); @@ -233,6 +235,15 @@ VCL_Panic(struct vsb *vsb, const char *nm, const struct vcl *vcl) for (i = 0; i < vcl->conf->nsrc; ++i) VSB_printf(vsb, "\"%s\",\n", vcl->conf->srcname[i]); VSB_indent(vsb, -2); + VSB_cat(vsb, "instances = {\n"); + VSB_indent(vsb, 2); + ii = vcl->conf->instance_info; + while (ii != NULL && ii->p != NULL) { + VSB_printf(vsb, "\"%s\" = %p,\n", ii->name, + (const void *)*(const uintptr_t *)ii->p); + ii++; + } + VSB_indent(vsb, -2); VSB_cat(vsb, "},\n"); } VSB_indent(vsb, -2); diff --git a/bin/varnishtest/tests/v00010.vtc b/bin/varnishtest/tests/v00010.vtc index c488f377f..89d3c298e 100644 --- a/bin/varnishtest/tests/v00010.vtc +++ b/bin/varnishtest/tests/v00010.vtc @@ -26,6 +26,12 @@ server s1 { varnish v1 -arg "-sdefault,1m" -vcl+backend { import vtc; + import debug; + + sub vcl_init { + new foo = debug.obj("foo"); + new bar = debug.concat("bar"); + } sub vcl_backend_response { if (beresp.http.panic == "fetch") { diff --git a/include/vcc_interface.h b/include/vcc_interface.h index 0d46f7c0f..37cc04aac 100644 --- a/include/vcc_interface.h +++ b/include/vcc_interface.h @@ -64,5 +64,11 @@ struct vrt_acl { const char *name; }; +/* vmod object instance info */ +struct vpi_ii { + const void * p; + const char * const name; +}; + VCL_STRANDS VPI_BundleStrands(int, struct strands *, char const **, const char *f, ...); diff --git a/lib/libvcc/generate.py b/lib/libvcc/generate.py index b526bfcdf..f962a8810 100755 --- a/lib/libvcc/generate.py +++ b/lib/libvcc/generate.py @@ -656,6 +656,7 @@ struct VCL_conf { const char **srcbody; int nvmod; + const struct vpi_ii *instance_info; vcl_event_f *event_vcl; """) diff --git a/lib/libvcc/vcc_compile.c b/lib/libvcc/vcc_compile.c index 4d83b490a..31d27f970 100644 --- a/lib/libvcc/vcc_compile.c +++ b/lib/libvcc/vcc_compile.c @@ -488,6 +488,7 @@ EmitStruct(const struct vcc *tl) #define VCL_MET_MAC(l,u,t,b) \ Fc(tl, 0, "\t." #l "_func = VGC_function_vcl_" #l ",\n"); #include "tbl/vcl_returns.h" + Fc(tl, 0, "\t.instance_info = VGC_instance_info\n"); Fc(tl, 0, "};\n"); } @@ -711,6 +712,8 @@ vcc_CompileSource(struct vcc *tl, struct source *sp, const char *jfile) EmitInitFini(tl); + VCC_InstanceInfo(tl); + EmitStruct(tl); VCC_XrefTable(tl); diff --git a/lib/libvcc/vcc_compile.h b/lib/libvcc/vcc_compile.h index c356e0788..32de12063 100644 --- a/lib/libvcc/vcc_compile.h +++ b/lib/libvcc/vcc_compile.h @@ -398,6 +398,7 @@ sym_act_f vcc_Act_New; /* vcc_xref.c */ int vcc_CheckReferences(struct vcc *tl); +void VCC_InstanceInfo(struct vcc *tl); void VCC_XrefTable(struct vcc *); void vcc_AddCall(struct vcc *, struct token *, struct symbol *); diff --git a/lib/libvcc/vcc_xref.c b/lib/libvcc/vcc_xref.c index f814e12d8..6e43c3ccc 100644 --- a/lib/libvcc/vcc_xref.c +++ b/lib/libvcc/vcc_xref.c @@ -317,6 +317,29 @@ vcc_xreftable_len(struct vcc *tl, const struct symbol *sym) sym_type_len = len; } +static void v_matchproto_(symwalk_f) +vcc_instance_info(struct vcc *tl, const struct symbol *sym) +{ + + CHECK_OBJ_NOTNULL(sym, SYMBOL_MAGIC); + CHECK_OBJ_NOTNULL(sym->kind, KIND_MAGIC); + if (sym->kind != SYM_INSTANCE) + return; + AN(sym->rname); + Fc(tl, 0, "\t{ .p = &%s, .name = \"", sym->rname); + VCC_SymName(tl->fc, sym); + Fc(tl, 0, "\" },\n"); +} + +void +VCC_InstanceInfo(struct vcc *tl) +{ + Fc(tl, 0, "\nconst struct vpi_ii VGC_instance_info[] = {\n"); + VCC_WalkSymbols(tl, vcc_instance_info, SYM_NONE); + Fc(tl, 0, "\t{ .p = NULL, .name = \"\" }\n"); + Fc(tl, 0, "};\n"); +} + static void v_matchproto_(symwalk_f) vcc_xreftable(struct vcc *tl, const struct symbol *sym) { From nils.goroll at uplex.de Wed Jan 15 16:15:07 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Wed, 15 Jan 2020 16:15:07 +0000 (UTC) Subject: [master] 8dd0a73fb simplify as suggested by @Dridi Message-ID: <20200115161507.A5873245F@lists.varnish-cache.org> commit 8dd0a73fb6190ef849259767f17602a7edd23bb8 Author: Nils Goroll Date: Tue Dec 17 08:01:23 2019 +0100 simplify as suggested by @Dridi thank you! diff --git a/lib/libvcc/vcc_xref.c b/lib/libvcc/vcc_xref.c index 6e43c3ccc..1d902795f 100644 --- a/lib/libvcc/vcc_xref.c +++ b/lib/libvcc/vcc_xref.c @@ -322,9 +322,6 @@ vcc_instance_info(struct vcc *tl, const struct symbol *sym) { CHECK_OBJ_NOTNULL(sym, SYMBOL_MAGIC); - CHECK_OBJ_NOTNULL(sym->kind, KIND_MAGIC); - if (sym->kind != SYM_INSTANCE) - return; AN(sym->rname); Fc(tl, 0, "\t{ .p = &%s, .name = \"", sym->rname); VCC_SymName(tl->fc, sym); @@ -335,7 +332,7 @@ void VCC_InstanceInfo(struct vcc *tl) { Fc(tl, 0, "\nconst struct vpi_ii VGC_instance_info[] = {\n"); - VCC_WalkSymbols(tl, vcc_instance_info, SYM_NONE); + VCC_WalkSymbols(tl, vcc_instance_info, SYM_INSTANCE); Fc(tl, 0, "\t{ .p = NULL, .name = \"\" }\n"); Fc(tl, 0, "};\n"); } From nils.goroll at uplex.de Wed Jan 15 17:06:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Wed, 15 Jan 2020 17:06:06 +0000 (UTC) Subject: [master] 7a1f7b2ab stabilize test: the panic might take some time Message-ID: <20200115170606.9E99059A4@lists.varnish-cache.org> commit 7a1f7b2abf4656ebb7fe6f61b2f40a9cc64d09d4 Author: Nils Goroll Date: Wed Jan 15 18:05:42 2020 +0100 stabilize test: the panic might take some time diff --git a/bin/varnishtest/tests/c00057.vtc b/bin/varnishtest/tests/c00057.vtc index be6569d24..65951be6b 100644 --- a/bin/varnishtest/tests/c00057.vtc +++ b/bin/varnishtest/tests/c00057.vtc @@ -44,6 +44,8 @@ client c1 { expect_close } -run +delay 3 + varnish v1 -cliexpect "STACK OVERFLOW" "panic.show" varnish v1 -clijson "panic.show -j" @@ -82,6 +84,8 @@ client c2 -connect ${v2_sock} { expect_close } -run +delay 3 + varnish v2 -cliexpect "[bB]us error|Segmentation [fF]ault" "panic.show" varnish v2 -clijson "panic.show -j" From nils.goroll at uplex.de Wed Jan 15 17:16:07 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Wed, 15 Jan 2020 17:16:07 +0000 (UTC) Subject: [master] 4e6e4eedc A request body now might have up to two references Message-ID: <20200115171607.23E805ED6@lists.varnish-cache.org> commit 4e6e4eedcf078795d3197792d17b1294d79ff616 Author: Nils Goroll Date: Wed Jan 15 18:13:45 2020 +0100 A request body now might have up to two references since d4b6228e1e32cda3014eeff0a5cb60cd7a0b5474 the busyobj might also gain one, so depending on who deref's first, there may be one or zero references left. diff --git a/bin/varnishd/cache/cache_req_body.c b/bin/varnishd/cache/cache_req_body.c index ddb2fdc6e..011b5c511 100644 --- a/bin/varnishd/cache/cache_req_body.c +++ b/bin/varnishd/cache/cache_req_body.c @@ -264,11 +264,17 @@ VRB_Ignore(struct req *req) void VRB_Free(struct req *req) { + int r; CHECK_OBJ_NOTNULL(req, REQ_MAGIC); - if (req->body_oc != NULL) - AZ(HSH_DerefObjCore(req->wrk, &req->body_oc, 0)); + if (req->body_oc == NULL) + return; + + r = HSH_DerefObjCore(req->wrk, &req->body_oc, 0); + + // a busyobj may have gained a reference + assert (r == 0 || r == 1); } /*---------------------------------------------------------------------- From nils.goroll at uplex.de Wed Jan 15 18:08:07 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Wed, 15 Jan 2020 18:08:07 +0000 (UTC) Subject: [master] 02bc0a683 Add vcl control over timeout_linger, send_timeout, idle_send_timeout Message-ID: <20200115180807.0E2187287@lists.varnish-cache.org> commit 02bc0a68379cfb6e856b8b37f074bef0313c3dd4 Author: Nils Goroll Date: Wed Apr 24 18:22:48 2019 +0200 Add vcl control over timeout_linger, send_timeout, idle_send_timeout and test that they work for H1 To @Dridi, I would appreciate if you could have another look at s10.vtc. I *tried* to keep your good ideas intact, and hope you can live with these changes. diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h index 0cf024c9c..14f5338c4 100644 --- a/bin/varnishd/cache/cache.h +++ b/bin/varnishd/cache/cache.h @@ -575,6 +575,9 @@ struct sess { vtim_real t_open; /* fd accepted */ vtim_real t_idle; /* fd accepted or resp sent */ vtim_dur timeout_idle; + vtim_dur timeout_linger; + vtim_dur send_timeout; + vtim_dur idle_send_timeout; }; #define SESS_TMO(sp, tmo) \ diff --git a/bin/varnishd/cache/cache_session.c b/bin/varnishd/cache/cache_session.c index 3e131943b..1be9f1fff 100644 --- a/bin/varnishd/cache/cache_session.c +++ b/bin/varnishd/cache/cache_session.c @@ -389,6 +389,9 @@ SES_New(struct pool *pp) sp->t_open = NAN; sp->t_idle = NAN; sp->timeout_idle = NAN; + sp->timeout_linger = NAN; + sp->send_timeout = NAN; + sp->idle_send_timeout = NAN; Lck_New(&sp->mtx, lck_sess); CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); return (sp); diff --git a/bin/varnishd/cache/cache_vrt_var.c b/bin/varnishd/cache/cache_vrt_var.c index 3a06d16a4..ab650b6ad 100644 --- a/bin/varnishd/cache/cache_vrt_var.c +++ b/bin/varnishd/cache/cache_vrt_var.c @@ -36,6 +36,8 @@ #include "common/heritage.h" #include "vcl.h" +#include "vtim.h" +#include "vtcp.h" #include "vrt_obj.h" @@ -946,18 +948,41 @@ HTTP_VAR(beresp) /*--------------------------------------------------------------------*/ -VCL_VOID -VRT_l_sess_timeout_idle(VRT_CTX, VCL_DURATION d) -{ - CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC); - CHECK_OBJ_NOTNULL(ctx->sp, SESS_MAGIC); - ctx->sp->timeout_idle = d > 0.0 ? d : 0.0; -} - -VCL_DURATION -VRT_r_sess_timeout_idle(VRT_CTX) -{ - CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC); - CHECK_OBJ_NOTNULL(ctx->sp, SESS_MAGIC); - return (SESS_TMO(ctx->sp, timeout_idle)); -} +#define set_noop(sp, d) (void)0 + +#ifdef SO_SNDTIMEO_WORKS +static inline void +set_idle_send_timeout(struct sess *sp, VCL_DURATION d) +{ + struct timeval tv = VTIM_timeval(d); + VTCP_Assert(setsockopt(sp->fd, SOL_SOCKET, SO_SNDTIMEO, + &tv, sizeof tv)); +} +#else +#define set_idle_send_timeout(sp, d) set_noop(sp, d) +#endif + +#define SESS_VAR_DUR(x, setter) \ +VCL_VOID \ +VRT_l_sess_##x(VRT_CTX, VCL_DURATION d) \ +{ \ + CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC); \ + CHECK_OBJ_NOTNULL(ctx->sp, SESS_MAGIC); \ + if (d < 0.0) \ + d = 0.0; \ + setter(ctx->sp, d); \ + ctx->sp->x = d; \ +} \ + \ +VCL_DURATION \ +VRT_r_sess_##x(VRT_CTX) \ +{ \ + CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC); \ + CHECK_OBJ_NOTNULL(ctx->sp, SESS_MAGIC); \ + return (SESS_TMO(ctx->sp, x)); \ +} + +SESS_VAR_DUR(timeout_idle, set_noop) +SESS_VAR_DUR(timeout_linger, set_noop) +SESS_VAR_DUR(send_timeout, set_noop) +SESS_VAR_DUR(idle_send_timeout, set_idle_send_timeout) diff --git a/bin/varnishd/http1/cache_http1_deliver.c b/bin/varnishd/http1/cache_http1_deliver.c index f7e7b270d..2714a0410 100644 --- a/bin/varnishd/http1/cache_http1_deliver.c +++ b/bin/varnishd/http1/cache_http1_deliver.c @@ -130,8 +130,8 @@ V1D_Deliver(struct req *req, struct boc *boc, int sendbody) } AZ(req->wrk->v1l); - V1L_Open(req->wrk, req->wrk->aws, - &req->sp->fd, req->vsl, req->t_prev + cache_param->send_timeout, + V1L_Open(req->wrk, req->wrk->aws, &req->sp->fd, req->vsl, + req->t_prev + SESS_TMO(req->sp, send_timeout), cache_param->http1_iovs); if (WS_Overflowed(req->wrk->aws)) { diff --git a/bin/varnishd/http1/cache_http1_fsm.c b/bin/varnishd/http1/cache_http1_fsm.c index ebe9133db..63c7833c9 100644 --- a/bin/varnishd/http1/cache_http1_fsm.c +++ b/bin/varnishd/http1/cache_http1_fsm.c @@ -329,7 +329,7 @@ HTTP1_Session(struct worker *wrk, struct req *req) hs = HTC_RxStuff(req->htc, HTTP1_Complete, &req->t_first, &req->t_req, - sp->t_idle + cache_param->timeout_linger, + sp->t_idle + SESS_TMO(sp, timeout_linger), sp->t_idle + SESS_TMO(sp, timeout_idle), NAN, cache_param->http_req_size); diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c index 4930a5e0a..9290cc0f8 100644 --- a/bin/varnishd/http2/cache_http2_proto.c +++ b/bin/varnishd/http2/cache_http2_proto.c @@ -985,7 +985,7 @@ h2_stream_tmo(struct h2_sess *h2, const struct h2_req *r2, vtim_real now) return (0); if (isnan(now) || (r2->t_winupd != 0 && - now - r2->t_winupd > cache_param->idle_send_timeout)) { + now - r2->t_winupd > SESS_TMO(h2->sess, idle_send_timeout))) { VSLb(h2->vsl, SLT_Debug, "H2: stream %u: Hit idle_send_timeout waiting for" " WINDOW_UPDATE", r2->stream); @@ -993,7 +993,7 @@ h2_stream_tmo(struct h2_sess *h2, const struct h2_req *r2, vtim_real now) } if (r == 0 && r2->t_send != 0 && - now - r2->t_send > cache_param->send_timeout) { + now - r2->t_send > SESS_TMO(h2->sess, send_timeout)) { VSLb(h2->vsl, SLT_Debug, "H2: stream %u: Hit send_timeout", r2->stream); r = 1; diff --git a/bin/varnishtest/tests/b00068.vtc b/bin/varnishtest/tests/b00068.vtc index d5f6910b1..2251b5290 100644 --- a/bin/varnishtest/tests/b00068.vtc +++ b/bin/varnishtest/tests/b00068.vtc @@ -20,6 +20,9 @@ varnish v1 -arg "-p timeout_linger=1" \ sub vcl_recv { std.log(blob.encode(encoding=HEX, blob=vtc.workspace_dump(session, f))); + if (req.url == "/longer") { + set sess.timeout_linger = 2s; + } } sub vcl_backend_error { set beresp.status = 200; @@ -27,7 +30,7 @@ varnish v1 -arg "-p timeout_linger=1" \ } } -start -logexpect l1 -v v1 -g session -q "SessOpen ~ a0" { +logexpect l1 -v v1 -g session -q "SessOpen ~ a0 and ReqURL ~ \"^/$\"" { expect * * VCL_call {^RECV} expect 0 = VCL_Log "^0{128}$" expect * * VCL_call {^RECV} @@ -36,7 +39,25 @@ logexpect l1 -v v1 -g session -q "SessOpen ~ a0" { expect 0 = VCL_Log "[1-9a-f]" } -start -logexpect l2 -v v1 -g session -q "SessOpen ~ a1" { +logexpect l2 -v v1 -g session -q "SessOpen ~ a1 and ReqURL ~ \"^/$\"" { + expect * * VCL_call {^RECV} + expect 0 = VCL_Log "^0{128}$" + expect * * VCL_call {^RECV} + expect 0 = VCL_Log "^0{128}$" + expect * * VCL_call {^RECV} + expect 0 = VCL_Log "[1-9a-f]" +} -start + +logexpect l3 -v v1 -g session -q "SessOpen ~ a0 and ReqURL ~ \"^/longer\"" { + expect * * VCL_call {^RECV} + expect 0 = VCL_Log "^0{128}$" + expect * * VCL_call {^RECV} + expect 0 = VCL_Log "^0{128}$" + expect * * VCL_call {^RECV} + expect 0 = VCL_Log "[1-9a-f]" +} -start + +logexpect l4 -v v1 -g session -q "SessOpen ~ a1 and ReqURL ~ \"^/longer\"" { expect * * VCL_call {^RECV} expect 0 = VCL_Log "^0{128}$" expect * * VCL_call {^RECV} @@ -67,8 +88,34 @@ client c1u -connect "${tmpdir}/v1.sock" { rxresp } -start +client c2 { + txreq -url /longer + rxresp + delay 1.2 + txreq -url /longer + rxresp + delay 2.2 + txreq -url /longer + rxresp +} -start + +client c2u -connect "${tmpdir}/v1.sock" { + txreq -url /longer + rxresp + delay 1.2 + txreq -url /longer + rxresp + delay 2.2 + txreq -url /longer + rxresp +} -start + client c1 -wait client c1u -wait +client c2 -wait +client c2u -wait logexpect l1 -wait logexpect l2 -wait +logexpect l3 -wait +logexpect l4 -wait diff --git a/bin/varnishtest/tests/c00070.vtc b/bin/varnishtest/tests/c00070.vtc index 9042fc554..7b1ec34fb 100644 --- a/bin/varnishtest/tests/c00070.vtc +++ b/bin/varnishtest/tests/c00070.vtc @@ -44,7 +44,7 @@ client c1 { expect resp.http.overflowed == "false" expect resp.http.free_backend > 9000 - expect resp.http.free_session >= 232 + expect resp.http.free_session >= 200 expect resp.http.free_thread > 2000 } -run diff --git a/bin/varnishtest/tests/s00010.vtc b/bin/varnishtest/tests/s00010.vtc index 391761967..116b6b440 100644 --- a/bin/varnishtest/tests/s00010.vtc +++ b/bin/varnishtest/tests/s00010.vtc @@ -28,13 +28,38 @@ varnish v1 -cliok "param.set send_timeout .1" varnish v1 -vcl+backend { import debug; - sub vcl_recv { return (pass); } - sub vcl_deliver { debug.sndbuf(256b); } + sub vcl_recv { + if (req.url == "/longsend") { + # client -rcvbuf 256 is super inefficient, so + # we need a very long timeout + set sess.send_timeout = 20s; + } else + if (req.url == "/longidlesend") { + set sess.idle_send_timeout = 20s; + } + } + + sub vcl_hash { + hash_data("/"); + return (lookup); + } + + sub vcl_deliver { + debug.sndbuf(256b); + } +} -start + +# l0 signals when to raise the barrier +# l1 checks for the TX_ERROR in the same session + +logexpect l0 -v v1 -g raw { + expect * * ReqURL "^/$" + expect * = Debug "^Hit total send timeout" } -start -logexpect l1 -v v1 -g raw { - expect * 1001 Debug "Hit total send timeout" - expect * 1000 SessClose TX_ERROR +logexpect l1 -v v1 -g session -q "ReqURL ~ \"^/$\"" { + expect * * SessClose "^TX_ERROR" + expect * * Debug "^Hit total send timeout" } -start client c1 -rcvbuf 256 { @@ -46,17 +71,60 @@ client c1 -rcvbuf 256 { barrier b2 sync } -start -logexpect l1 -wait +client c2 -rcvbuf 256 { + txreq -url /longsend + rxresphdrs + delay 0.8 + rxrespbody + expect resp.bodylen == 100000 +} -start + +logexpect l0 -wait barrier b2 sync +logexpect l1 -wait client c1 -wait +client c2 -wait varnish v1 -cliok "param.reset send_timeout" +varnish v1 -cliok "ban obj.status != 0" + +# l2 signals when to raise the barrier +# l3 checks the idle send timeout in the right transaction +# l4 checks for no idle send timeout with the prolonged timeout + logexpect l2 -v v1 -g raw { - expect * 1004 Debug "Hit idle send timeout" + expect * * ReqURL "^/$" + expect * = Debug "^Hit idle send timeout" +} -start + + +logexpect l3 -v v1 -q "ReqURL ~ \"^/$\"" { + expect * * ReqURL "^/$" + expect * = RespHeader "^Transfer-Encoding" + expect 0 = Debug "^Hit idle send timeout" +} -start + +logexpect l4 -v v1 -q "ReqURL ~ \"^/longidlesend$\"" { + expect * * ReqURL "^/longidlesend$" + expect * = RespHeader "^Transfer-Encoding" + # no Hit idle send ... + expect 0 = Timestamp "^Resp" } -start client c1 -start + +client c3 -rcvbuf 256 { + txreq -url /longidlesend + rxresphdrs + delay 1.8 + rxrespbody + expect resp.bodylen == 100000 +} -start + logexpect l2 -wait barrier b2 sync client c1 -wait +client c3 -wait +logexpect l3 -wait +logexpect l4 -wait diff --git a/bin/varnishtest/tests/s00012.vtc b/bin/varnishtest/tests/s00012.vtc index 2ea5bdf16..9726f050f 100644 --- a/bin/varnishtest/tests/s00012.vtc +++ b/bin/varnishtest/tests/s00012.vtc @@ -17,12 +17,28 @@ varnish v1 \ -vcl+backend { import debug; + sub vcl_recv { + if (req.url == "/longsend") { + # client -rcvbuf 128 is super inefficient, so + # we need a very long timeout + set sess.send_timeout = 20s; + } else + if (req.url == "/longidlesend") { + set sess.idle_send_timeout = 2s; + } + } + + sub vcl_hash { + hash_data("/"); + return (lookup); + } + sub vcl_deliver { debug.sndbuf(128b); } } -start -logexpect l1 -v v1 { +logexpect l1 -v v1 -q "ReqURL ~ \"^/$\"" { expect * * Debug "Hit total send timeout" } -start @@ -34,22 +50,41 @@ client c1 -connect "${tmpdir}/v1.sock" -rcvbuf 128 { delay 2 } -start +client c2 -connect "${tmpdir}/v1.sock" -rcvbuf 128 { + txreq -url /longsend + rxresphdrs + delay 0.8 + rxrespbody + expect resp.bodylen == 100000 +} -start + + client c1 -wait -logexpect l1 -wait +client c2 -wait varnish v1 -cliok "param.set idle_send_timeout 1" varnish v1 -cliok "param.reset send_timeout" -logexpect l2 -v v1 { +logexpect l2 -v v1 -q "ReqURL ~ \"^/$\"" { expect * * Debug "Hit idle send timeout" } -start -client c2 -connect "${tmpdir}/v1.sock" -rcvbuf 128 { +client c3 -connect "${tmpdir}/v1.sock" -rcvbuf 128 { txreq rxresphdrs # keep the session open for 2 seconds delay 2 } -start -client c2 -wait +client c4 -connect "${tmpdir}/v1.sock" -rcvbuf 128 { + txreq -url /longidlesend + rxresphdrs + delay 1.8 + rxrespbody + expect resp.bodylen == 100000 +} -start + +client c3 -wait +client c4 -wait +logexpect l1 -wait logexpect l2 -wait diff --git a/doc/sphinx/reference/vcl_var.rst b/doc/sphinx/reference/vcl_var.rst index a4c2469bd..dd9f34975 100644 --- a/doc/sphinx/reference/vcl_var.rst +++ b/doc/sphinx/reference/vcl_var.rst @@ -1272,6 +1272,40 @@ sess.timeout_idle Idle timeout for this session, defaults to the ``timeout_idle`` parameter, see :ref:`varnishd(1)` +sess.timeout_linger + + Type: DURATION + + Readable from: client + + Writable from: client + + Linger timeout for this session, defaults to the + ``timeout_linger`` parameter, see :ref:`varnishd(1)` + +sess.send_timeout + + Type: DURATION + + Readable from: client + + Writable from: client + + Total timeout for ordinary HTTP1 responses, defaults to the + ``send_timeout`` parameter, see :ref:`varnishd(1)` + +sess.idle_send_timeout + + Type: DURATION + + Readable from: client + + Writable from: client + + Send timeout for individual pieces of data on client + connections, defaults to the ``idle_send_timeout`` parameter, + see :ref:`varnishd(1)` + storage ~~~~~~~ From nils.goroll at uplex.de Thu Jan 16 10:04:07 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Thu, 16 Jan 2020 10:04:07 +0000 (UTC) Subject: [master] 0f3bb3548 bump default workspace_session Message-ID: <20200116100407.7FE3CA057C@lists.varnish-cache.org> commit 0f3bb35480acadbb910c6f7277d815f40ce5a7f7 Author: Nils Goroll Date: Thu Jan 16 10:47:09 2020 +0100 bump default workspace_session 02bc0a68379cfb6e856b8b37f074bef0313c3dd4 requires 24 bytes more on 64bit, which brought o00005.vtc just over the top on smartos 64bit machines (the vtc tests PROXY TLVs, which get stored on the session workspace). Increase the default workspace_session by 256bytes (50%) to accomodate sane proxy TLV lengths by default. This is about 10x more than the minimum increase sufficient to accomodate the increased workspace usage. I went for 768 bytes because - this gives us the next least common multiple (12k) with the common 4K page size unless we went up to 1k - we were already quite tight with the default and could not accomodate common proxy TLV use (see for example #3131) As a ballpart reality check, I do not think that spending an additional 256MB should be an issue for users supporting 1M sessions. diff --git a/include/tbl/params.h b/include/tbl/params.h index dd1e68699..ccb416eb0 100644 --- a/include/tbl/params.h +++ b/include/tbl/params.h @@ -1731,7 +1731,7 @@ PARAM( /* typ */ bytes_u, /* min */ "0.25k", /* max */ NULL, - /* default */ "0.50k", + /* default */ "0.75k", /* units */ "bytes", /* flags */ DELAYED_EFFECT, /* s-text */ From nils.goroll at uplex.de Thu Jan 16 10:09:37 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Thu, 16 Jan 2020 11:09:37 +0100 Subject: [master] 02bc0a683 Add vcl control over timeout_linger, send_timeout, idle_send_timeout In-Reply-To: <20200115180807.0E2187287@lists.varnish-cache.org> References: <20200115180807.0E2187287@lists.varnish-cache.org> Message-ID: <2c085ef4-4592-14d4-0324-6c1548bd5836@uplex.de> On 15/01/2020 19:08, Nils Goroll wrote: > To @Dridi, I would appreciate if you could have another look at s10.vtc. > I *tried* to keep your good ideas intact, and hope you can live with > these changes. I did notice the vtest failures on some boxes and will look after them -- ** * * UPLEX - Nils Goroll Systemoptimierung Scheffelstra?e 32 22301 Hamburg tel +49 40 28805731 mob +49 170 2723133 fax +49 40 42949753 xmpp://slink at jabber.int.uplex.de/ http://uplex.de/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: From nils.goroll at uplex.de Thu Jan 16 10:13:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Thu, 16 Jan 2020 10:13:06 +0000 (UTC) Subject: [master] e733fce8e panic handling can take a couple seconds Message-ID: <20200116101306.8808BA0DAB@lists.varnish-cache.org> commit e733fce8ebad06d83b14ef759304ee39516152fe Author: Nils Goroll Date: Thu Jan 16 11:12:50 2020 +0100 panic handling can take a couple seconds diff --git a/bin/varnishtest/tests/v00063.vtc b/bin/varnishtest/tests/v00063.vtc index 974794eac..c36ff1aa4 100644 --- a/bin/varnishtest/tests/v00063.vtc +++ b/bin/varnishtest/tests/v00063.vtc @@ -16,6 +16,7 @@ varnish v1 -vcl+backend {} # expect a panic during the COLD event, COLD state varnish v1 -clierr 400 "vcl.state vcl1 cold" +delay 3 varnish v1 -cliexpect "Dynamic Backends can only be added to warm VCLs" panic.show varnish v1 -cliok panic.clear From nils.goroll at uplex.de Thu Jan 16 10:28:05 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Thu, 16 Jan 2020 10:28:05 +0000 (UTC) Subject: [master] 83b238ed4 fiddling to bring back an overflow where we test for it Message-ID: <20200116102805.F34FCA1491@lists.varnish-cache.org> commit 83b238ed429c60e3b7b5631bb46808093a0b37ed Author: Nils Goroll Date: Thu Jan 16 11:18:33 2020 +0100 fiddling to bring back an overflow where we test for it diff --git a/bin/varnishtest/tests/o00005.vtc b/bin/varnishtest/tests/o00005.vtc index b09a8fcaf..90056f0c3 100644 --- a/bin/varnishtest/tests/o00005.vtc +++ b/bin/varnishtest/tests/o00005.vtc @@ -204,51 +204,6 @@ varnish v1 -vsl_catchup logexpect l1 -wait -client c1 { - # PROXY2 sp->ws overflow - sendhex { - 0d 0a 0d 0a 00 0d 0a 51 55 49 54 0a - 21 11 01 23 - d9 46 b5 21 - 5f 8e a8 22 - ed 96 - 01 bb - 03 00 04 c5 1b 5b 2b - 01 00 02 68 32 - 02 00 c8 61 61 61 61 61 61 61 61 61 61 61 - 61 61 61 61 61 61 61 61 61 61 61 - 61 61 61 61 61 61 61 61 61 61 61 - 61 61 61 61 61 61 61 61 61 61 61 - 61 61 61 61 61 61 61 61 61 61 61 - 61 61 61 61 61 61 61 61 61 61 61 - 61 61 61 61 61 61 61 61 61 61 61 - 61 61 61 61 61 61 61 61 61 61 61 - 61 61 61 61 61 61 61 61 61 61 61 - 61 61 61 61 61 61 61 61 61 61 61 - 61 61 61 61 61 61 61 61 61 61 61 - 61 61 61 61 61 61 61 61 61 61 61 - 61 61 61 61 61 61 61 61 61 61 61 - 61 61 61 61 61 61 61 61 61 61 61 - 61 61 61 61 61 61 61 61 61 61 61 - 61 61 61 61 61 61 61 61 61 61 61 - 61 61 61 61 61 61 61 61 61 61 61 - 61 61 61 61 61 61 61 61 61 61 61 - 61 61 - 20 00 3d - 01 00 00 00 00 - 21 00 07 54 4c 53 76 31 2e 33 - 25 00 05 45 43 32 35 36 - 24 00 0a 52 53 41 2d 53 48 41 32 35 36 - 23 00 16 41 45 41 44 2d 41 45 53 31 32 38 - 2d 47 43 4d 2d 53 48 41 32 35 36 - } - expect_close -} -run - -delay 1 - -varnish v1 -expect ws_session_overflow == 1 - # workspace overflow handling elsewhere in the proxy code # # the workspace_session size is chosen to fail as closely as possible @@ -315,4 +270,55 @@ client c2 { expect_close } -run +varnish v1 -expect ws_session_overflow == 1 + +# increased workspace is being reflected immediately + +varnish v1 -cliok "param.set workspace_session 536" + +delay 1 + +client c1 { + # PROXY2 sp->ws overflow + sendhex { + 0d 0a 0d 0a 00 0d 0a 51 55 49 54 0a + 21 11 01 23 + d9 46 b5 21 + 5f 8e a8 22 + ed 96 + 01 bb + 03 00 04 c5 1b 5b 2b + 01 00 02 68 32 + 02 00 c8 61 61 61 61 61 61 61 61 61 61 61 + 61 61 61 61 61 61 61 61 61 61 61 + 61 61 61 61 61 61 61 61 61 61 61 + 61 61 61 61 61 61 61 61 61 61 61 + 61 61 61 61 61 61 61 61 61 61 61 + 61 61 61 61 61 61 61 61 61 61 61 + 61 61 61 61 61 61 61 61 61 61 61 + 61 61 61 61 61 61 61 61 61 61 61 + 61 61 61 61 61 61 61 61 61 61 61 + 61 61 61 61 61 61 61 61 61 61 61 + 61 61 61 61 61 61 61 61 61 61 61 + 61 61 61 61 61 61 61 61 61 61 61 + 61 61 61 61 61 61 61 61 61 61 61 + 61 61 61 61 61 61 61 61 61 61 61 + 61 61 61 61 61 61 61 61 61 61 61 + 61 61 61 61 61 61 61 61 61 61 61 + 61 61 61 61 61 61 61 61 61 61 61 + 61 61 61 61 61 61 61 61 61 61 61 + 61 61 + 20 00 3d + 01 00 00 00 00 + 21 00 07 54 4c 53 76 31 2e 33 + 25 00 05 45 43 32 35 36 + 24 00 0a 52 53 41 2d 53 48 41 32 35 36 + 23 00 16 41 45 41 44 2d 41 45 53 31 32 38 + 2d 47 43 4d 2d 53 48 41 32 35 36 + } + expect_close +} -run + +delay 1 + varnish v1 -expect ws_session_overflow == 2 From nils.goroll at uplex.de Thu Jan 16 10:35:05 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Thu, 16 Jan 2020 10:35:05 +0000 (UTC) Subject: [master] 5b90890fb s00010.vtc: lower pressure from timeout handling Message-ID: <20200116103505.DC4FAA18AB@lists.varnish-cache.org> commit 5b90890fbba33ec5decc4b2ba032809ef0cd6da5 Author: Nils Goroll Date: Thu Jan 16 11:32:01 2020 +0100 s00010.vtc: lower pressure from timeout handling freebsd vtest boxes cannot complete the c2 response within the 20s extended send_timeout, apparently for too much overhead from timeout handling. Try to fix with less pressure diff --git a/bin/varnishtest/tests/s00010.vtc b/bin/varnishtest/tests/s00010.vtc index 116b6b440..1e6297657 100644 --- a/bin/varnishtest/tests/s00010.vtc +++ b/bin/varnishtest/tests/s00010.vtc @@ -23,8 +23,8 @@ varnish v1 -cliok "param.set debug +syncvsl" varnish v1 -cliok "param.set debug +flush_head" varnish v1 -cliok "param.set thread_pools 1" varnish v1 -cliok "param.set timeout_idle 1" -varnish v1 -cliok "param.set idle_send_timeout .1" -varnish v1 -cliok "param.set send_timeout .1" +varnish v1 -cliok "param.set idle_send_timeout 1" +varnish v1 -cliok "param.set send_timeout 1" varnish v1 -vcl+backend { import debug; From nils.goroll at uplex.de Thu Jan 16 12:04:07 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Thu, 16 Jan 2020 12:04:07 +0000 (UTC) Subject: [master] 3d4bb4245 more numbers fiddling Message-ID: <20200116120407.5F447A3943@lists.varnish-cache.org> commit 3d4bb4245fc124c394043678a4beed5fe0b4f0e3 Author: Nils Goroll Date: Thu Jan 16 13:02:38 2020 +0100 more numbers fiddling we need a way for vtc to reach into session setup I guess diff --git a/bin/varnishtest/tests/o00005.vtc b/bin/varnishtest/tests/o00005.vtc index 90056f0c3..b7b5af7a5 100644 --- a/bin/varnishtest/tests/o00005.vtc +++ b/bin/varnishtest/tests/o00005.vtc @@ -274,7 +274,7 @@ varnish v1 -expect ws_session_overflow == 1 # increased workspace is being reflected immediately -varnish v1 -cliok "param.set workspace_session 536" +varnish v1 -cliok "param.set workspace_session 528" delay 1 From nils.goroll at uplex.de Thu Jan 16 12:23:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Thu, 16 Jan 2020 12:23:06 +0000 (UTC) Subject: [master] 66b27ae19 even more s00010.vtc tweaking Message-ID: <20200116122306.863F9A419C@lists.varnish-cache.org> commit 66b27ae191bd16392e24240f4668e31e192b90e6 Author: Nils Goroll Date: Thu Jan 16 13:21:26 2020 +0100 even more s00010.vtc tweaking Furhter lighten the load for the test to succeed on FreeBSD vtest, hopefully. Also, when stars align, we do not git the busy object (streaming) and do not see chunked encoding. diff --git a/bin/varnishtest/tests/s00010.vtc b/bin/varnishtest/tests/s00010.vtc index 1e6297657..53e93cc07 100644 --- a/bin/varnishtest/tests/s00010.vtc +++ b/bin/varnishtest/tests/s00010.vtc @@ -12,7 +12,7 @@ server s1 -repeat 2 { fatal rxreq txresp -nolen -hdr "Transfer-encoding: chunked" - chunkedlen 100000 + chunkedlen 65536 # make sure varnish is stuck in delivery barrier b1 sync non_fatal @@ -76,7 +76,7 @@ client c2 -rcvbuf 256 { rxresphdrs delay 0.8 rxrespbody - expect resp.bodylen == 100000 + expect resp.bodylen == 65536 } -start logexpect l0 -wait @@ -99,15 +99,17 @@ logexpect l2 -v v1 -g raw { } -start -logexpect l3 -v v1 -q "ReqURL ~ \"^/$\"" { +logexpect l3 -v v1 -X RespHeader:Transfer-Encoding \ + -q "ReqURL ~ \"^/$\"" { expect * * ReqURL "^/$" - expect * = RespHeader "^Transfer-Encoding" + expect * = RespHeader "^Connection" expect 0 = Debug "^Hit idle send timeout" } -start -logexpect l4 -v v1 -q "ReqURL ~ \"^/longidlesend$\"" { +logexpect l4 -v v1 -X RespHeader:Transfer-Encoding \ + -q "ReqURL ~ \"^/longidlesend$\"" { expect * * ReqURL "^/longidlesend$" - expect * = RespHeader "^Transfer-Encoding" + expect * = RespHeader "^Connection" # no Hit idle send ... expect 0 = Timestamp "^Resp" } -start @@ -119,7 +121,7 @@ client c3 -rcvbuf 256 { rxresphdrs delay 1.8 rxrespbody - expect resp.bodylen == 100000 + expect resp.bodylen == 65536 } -start logexpect l2 -wait From dridi at varni.sh Thu Jan 16 12:27:55 2020 From: dridi at varni.sh (Dridi Boukelmoune) Date: Thu, 16 Jan 2020 12:27:55 +0000 Subject: [master] 66b27ae19 even more s00010.vtc tweaking In-Reply-To: <20200116122306.863F9A419C@lists.varnish-cache.org> References: <20200116122306.863F9A419C@lists.varnish-cache.org> Message-ID: On Thu, Jan 16, 2020 at 12:23 PM Nils Goroll wrote: > > > commit 66b27ae191bd16392e24240f4668e31e192b90e6 > Author: Nils Goroll > Date: Thu Jan 16 13:21:26 2020 +0100 > > even more s00010.vtc tweaking > > Furhter lighten the load for the test to succeed on FreeBSD vtest, > hopefully. > > Also, when stars align, we do not git the busy object (streaming) and do > not see chunked encoding. > > diff --git a/bin/varnishtest/tests/s00010.vtc b/bin/varnishtest/tests/s00010.vtc > index 1e6297657..53e93cc07 100644 > --- a/bin/varnishtest/tests/s00010.vtc > +++ b/bin/varnishtest/tests/s00010.vtc > @@ -12,7 +12,7 @@ server s1 -repeat 2 { > fatal > rxreq > txresp -nolen -hdr "Transfer-encoding: chunked" > - chunkedlen 100000 > + chunkedlen 65536 > # make sure varnish is stuck in delivery > barrier b1 sync > non_fatal > @@ -76,7 +76,7 @@ client c2 -rcvbuf 256 { > rxresphdrs > delay 0.8 > rxrespbody > - expect resp.bodylen == 100000 > + expect resp.bodylen == 65536 I'm not available to look after that today but in my latest iteration on s10 stabilization I made sure _not_ to receive the response body, allowing the test case to move on as soon as the log statement was witnessed. Dridi > } -start > > logexpect l0 -wait > @@ -99,15 +99,17 @@ logexpect l2 -v v1 -g raw { > } -start > > > -logexpect l3 -v v1 -q "ReqURL ~ \"^/$\"" { > +logexpect l3 -v v1 -X RespHeader:Transfer-Encoding \ > + -q "ReqURL ~ \"^/$\"" { > expect * * ReqURL "^/$" > - expect * = RespHeader "^Transfer-Encoding" > + expect * = RespHeader "^Connection" > expect 0 = Debug "^Hit idle send timeout" > } -start > > -logexpect l4 -v v1 -q "ReqURL ~ \"^/longidlesend$\"" { > +logexpect l4 -v v1 -X RespHeader:Transfer-Encoding \ > + -q "ReqURL ~ \"^/longidlesend$\"" { > expect * * ReqURL "^/longidlesend$" > - expect * = RespHeader "^Transfer-Encoding" > + expect * = RespHeader "^Connection" > # no Hit idle send ... > expect 0 = Timestamp "^Resp" > } -start > @@ -119,7 +121,7 @@ client c3 -rcvbuf 256 { > rxresphdrs > delay 1.8 > rxrespbody > - expect resp.bodylen == 100000 > + expect resp.bodylen == 65536 > } -start > > logexpect l2 -wait > _______________________________________________ > varnish-commit mailing list > varnish-commit at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit From nils.goroll at uplex.de Thu Jan 16 12:56:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Thu, 16 Jan 2020 12:56:06 +0000 (UTC) Subject: [master] f59859384 even more session overflow test tweaking Message-ID: <20200116125606.0ADE9A4FED@lists.varnish-cache.org> commit f5985938429951fb570cfa1c350ff34d0b910b83 Author: Nils Goroll Date: Thu Jan 16 13:54:20 2020 +0100 even more session overflow test tweaking and enable debug output for better failure analysis diff --git a/bin/varnishtest/tests/o00005.vtc b/bin/varnishtest/tests/o00005.vtc index b7b5af7a5..df2bc747a 100644 --- a/bin/varnishtest/tests/o00005.vtc +++ b/bin/varnishtest/tests/o00005.vtc @@ -213,8 +213,8 @@ logexpect l1 -wait # This value is fragile, ideally we would want something like # vtc.alloc(-x), yet there is no vcl code being run before we parse # proxy headers + varnish v1 -cliok "param.set workspace_session 402" -varnish v1 -cliok "param.set pool_sess 10,100,1" delay 1 @@ -246,6 +246,7 @@ client c12 -wait client c13 -wait client c14 -wait +varnish v1 -cliok "param.set pool_sess 1,1,1" client c2 { # PROXY2 with CRC32C TLV sendhex { @@ -274,9 +275,9 @@ varnish v1 -expect ws_session_overflow == 1 # increased workspace is being reflected immediately -varnish v1 -cliok "param.set workspace_session 528" +varnish v1 -cliok "param.set workspace_session 524" -delay 1 +varnish v1 -cliok "param.set debug +workspace" client c1 { # PROXY2 sp->ws overflow From nils.goroll at uplex.de Thu Jan 16 13:04:42 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Thu, 16 Jan 2020 14:04:42 +0100 Subject: [master] 66b27ae19 even more s00010.vtc tweaking In-Reply-To: References: <20200116122306.863F9A419C@lists.varnish-cache.org> Message-ID: <6ffc5c9f-4d7b-456b-bc20-a46e8afbe95c@uplex.de> On 16/01/2020 13:27, Dridi Boukelmoune wrote: > I'm not available to look after that today but in my latest iteration > on s10 stabilization I made sure _not_ to receive the response body, > allowing the test case to move on as soon as the log statement was > witnessed. yes, the complications stem from the fact that I want to test the prolonged timeouts set per session also. I might give up on this for some time, all this fiddling feels so bad. -- ** * * UPLEX - Nils Goroll Systemoptimierung Scheffelstra?e 32 22301 Hamburg tel +49 40 28805731 mob +49 170 2723133 fax +49 40 42949753 xmpp://slink at jabber.int.uplex.de/ http://uplex.de/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: From dridi at varni.sh Thu Jan 16 14:08:45 2020 From: dridi at varni.sh (Dridi Boukelmoune) Date: Thu, 16 Jan 2020 14:08:45 +0000 Subject: [master] 66b27ae19 even more s00010.vtc tweaking In-Reply-To: <6ffc5c9f-4d7b-456b-bc20-a46e8afbe95c@uplex.de> References: <20200116122306.863F9A419C@lists.varnish-cache.org> <6ffc5c9f-4d7b-456b-bc20-a46e8afbe95c@uplex.de> Message-ID: On Thu, Jan 16, 2020 at 1:04 PM Nils Goroll wrote: > > On 16/01/2020 13:27, Dridi Boukelmoune wrote: > > I'm not available to look after that today but in my latest iteration > > on s10 stabilization I made sure _not_ to receive the response body, > > allowing the test case to move on as soon as the log statement was > > witnessed. > > yes, the complications stem from the fact that I want to test the prolonged > timeouts set per session also. > > I might give up on this for some time, all this fiddling feels so bad. I can take over later, I have a FreeBSD VM handy where I try changes before pushing them. From nils.goroll at uplex.de Thu Jan 16 14:11:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Thu, 16 Jan 2020 14:11:06 +0000 (UTC) Subject: [master] 55ef8e00b s00010: try a slight variation Message-ID: <20200116141106.64F1FA6E30@lists.varnish-cache.org> commit 55ef8e00bf2cdf08718b02e1abc1077ae20f3508 Author: Nils Goroll Date: Thu Jan 16 14:19:31 2020 +0100 s00010: try a slight variation when we stall sending on the backend side, we _have_ to run into a timeout on the client side, haven't we? diff --git a/bin/varnishtest/tests/s00010.vtc b/bin/varnishtest/tests/s00010.vtc index 53e93cc07..0aa8b6137 100644 --- a/bin/varnishtest/tests/s00010.vtc +++ b/bin/varnishtest/tests/s00010.vtc @@ -12,10 +12,10 @@ server s1 -repeat 2 { fatal rxreq txresp -nolen -hdr "Transfer-encoding: chunked" - chunkedlen 65536 + chunkedlen 8192 # make sure varnish is stuck in delivery barrier b1 sync - non_fatal + chunkedlen 57344 chunkedlen 0 } -start From nils.goroll at uplex.de Thu Jan 16 14:13:43 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Thu, 16 Jan 2020 15:13:43 +0100 Subject: [master] 66b27ae19 even more s00010.vtc tweaking In-Reply-To: References: <20200116122306.863F9A419C@lists.varnish-cache.org> <6ffc5c9f-4d7b-456b-bc20-a46e8afbe95c@uplex.de> Message-ID: On 16/01/2020 15:08, Dridi Boukelmoune wrote: > I can take over later, I have a FreeBSD VM handy where I try changes > before pushing them. Thank you soo much. I feel lost -- ** * * UPLEX - Nils Goroll Systemoptimierung Scheffelstra?e 32 22301 Hamburg tel +49 40 28805731 mob +49 170 2723133 fax +49 40 42949753 xmpp://slink at jabber.int.uplex.de/ http://uplex.de/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: From dridi.boukelmoune at gmail.com Fri Jan 17 16:53:07 2020 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Fri, 17 Jan 2020 16:53:07 +0000 (UTC) Subject: [master] 4fe881852 Stabilize s10, again Message-ID: <20200117165307.73912A6951@lists.varnish-cache.org> commit 4fe881852b98c9875745963fc0c1ac3a5611b7b7 Author: Dridi Boukelmoune Date: Fri Jan 17 17:41:39 2020 +0100 Stabilize s10, again The previous stabilization turned out not to reliably work with FreeBSD on aarch64 hardware. It was still an improvement overall, but the test case turned out to be a bit cryptic and when [idle_]send_timeout support landed in VCL it wasn't obvious how to add coverage. This attempt bites the bullet and defines one pair of client/logexpect instances per use case and clearly (I hope) indicates why it is doing things or not doing them. Since we now have two clients that aren't expected to complete before the test case itself the server is in dispatch mode instead of repeating its scenario. Using barriers in dispatch mode should raise a red flag for any reviewer, but in this case the barriers outside the server are properly serialized, are systematically used by every single client, and as a result should be safe. As usual, personal testing limited to x86_64 Linux and FreeBSD. diff --git a/bin/varnishtest/tests/s00010.vtc b/bin/varnishtest/tests/s00010.vtc index 0aa8b6137..fea3ea89d 100644 --- a/bin/varnishtest/tests/s00010.vtc +++ b/bin/varnishtest/tests/s00010.vtc @@ -8,58 +8,47 @@ feature SO_RCVTIMEO_WORKS barrier b1 cond 2 -cyclic barrier b2 cond 2 -cyclic -server s1 -repeat 2 { +server s0 { fatal rxreq txresp -nolen -hdr "Transfer-encoding: chunked" - chunkedlen 8192 + chunkedlen 100000 # make sure varnish is stuck in delivery barrier b1 sync - chunkedlen 57344 + non_fatal chunkedlen 0 -} -start +} -dispatch varnish v1 -cliok "param.set debug +syncvsl" -varnish v1 -cliok "param.set debug +flush_head" varnish v1 -cliok "param.set thread_pools 1" varnish v1 -cliok "param.set timeout_idle 1" -varnish v1 -cliok "param.set idle_send_timeout 1" -varnish v1 -cliok "param.set send_timeout 1" +varnish v1 -cliok "param.set idle_send_timeout .1" +varnish v1 -cliok "param.set send_timeout .1" varnish v1 -vcl+backend { + import std; import debug; sub vcl_recv { - if (req.url == "/longsend") { - # client -rcvbuf 256 is super inefficient, so - # we need a very long timeout - set sess.send_timeout = 20s; - } else - if (req.url == "/longidlesend") { - set sess.idle_send_timeout = 20s; + if (req.http.send_timeout) { + set sess.send_timeout = + std.duration(req.http.send_timeout); } + if (req.http.idle_send_timeout) { + set sess.idle_send_timeout = + std.duration(req.http.idle_send_timeout); + } + return (pass); } - - sub vcl_hash { - hash_data("/"); - return (lookup); - } - sub vcl_deliver { debug.sndbuf(256b); } } -start -# l0 signals when to raise the barrier -# l1 checks for the TX_ERROR in the same session - -logexpect l0 -v v1 -g raw { - expect * * ReqURL "^/$" - expect * = Debug "^Hit total send timeout" -} -start +# case 1: send_timeout parameter -logexpect l1 -v v1 -g session -q "ReqURL ~ \"^/$\"" { - expect * * SessClose "^TX_ERROR" - expect * * Debug "^Hit total send timeout" +logexpect l1 -v v1 -g raw { + expect * 1001 Debug "Hit total send timeout" + expect * 1000 SessClose TX_ERROR } -start client c1 -rcvbuf 256 { @@ -69,64 +58,79 @@ client c1 -rcvbuf 256 { barrier b1 sync # wait for the timeout to kick in barrier b2 sync -} -start - -client c2 -rcvbuf 256 { - txreq -url /longsend - rxresphdrs - delay 0.8 + non_fatal rxrespbody - expect resp.bodylen == 65536 + expect_close } -start -logexpect l0 -wait -barrier b2 sync logexpect l1 -wait +barrier b2 sync client c1 -wait -client c2 -wait -varnish v1 -cliok "param.reset send_timeout" - -varnish v1 -cliok "ban obj.status != 0" +# case 2: send_timeout overriden in VCL -# l2 signals when to raise the barrier -# l3 checks the idle send timeout in the right transaction -# l4 checks for no idle send timeout with the prolonged timeout +varnish v1 -cliok "param.reset send_timeout" logexpect l2 -v v1 -g raw { - expect * * ReqURL "^/$" - expect * = Debug "^Hit idle send timeout" + expect * 1004 Debug "Hit total send timeout" + expect * 1003 SessClose TX_ERROR } -start - -logexpect l3 -v v1 -X RespHeader:Transfer-Encoding \ - -q "ReqURL ~ \"^/$\"" { - expect * * ReqURL "^/$" - expect * = RespHeader "^Connection" - expect 0 = Debug "^Hit idle send timeout" +client c2 -rcvbuf 256 { + txreq -hdr "send_timeout: 100ms" + rxresphdrs + # varnish is stuck sending the chunk + barrier b1 sync + # wait for the timeout to kick in + barrier b2 sync + # expect the transaction to be interrupted + non_fatal + rxrespbody + expect_close } -start -logexpect l4 -v v1 -X RespHeader:Transfer-Encoding \ - -q "ReqURL ~ \"^/longidlesend$\"" { - expect * * ReqURL "^/longidlesend$" - expect * = RespHeader "^Connection" - # no Hit idle send ... - expect 0 = Timestamp "^Resp" -} -start +logexpect l2 -wait +barrier b2 sync +client c2 -wait -client c1 -start +# case 3: idle_send_timeout parameter + +logexpect l3 -v v1 -g raw { + expect * 1007 Debug "Hit idle send timeout" +} -start client c3 -rcvbuf 256 { - txreq -url /longidlesend + txreq rxresphdrs - delay 1.8 - rxrespbody - expect resp.bodylen == 65536 + # varnish is stuck sending the chunk + barrier b1 sync + # wait for the timeout to kick in + barrier b2 sync + # don't wait for the transaction to complete } -start -logexpect l2 -wait +logexpect l3 -wait barrier b2 sync -client c1 -wait client c3 -wait -logexpect l3 -wait + +# case 4: idle_send_timeout overriden in VCL + +varnish v1 -cliok "param.reset idle_send_timeout" + +logexpect l4 -v v1 -g raw { + expect * 1010 Debug "Hit idle send timeout" +} -start + +client c4 -rcvbuf 256 { + txreq -hdr "idle_send_timeout: 100ms" + rxresphdrs + # varnish is stuck sending the chunk + barrier b1 sync + # wait for the timeout to kick in + barrier b2 sync + # don't wait for the transaction to complete +} -start + logexpect l4 -wait +barrier b2 sync +client c4 -wait From dridi at varni.sh Fri Jan 17 16:53:45 2020 From: dridi at varni.sh (Dridi Boukelmoune) Date: Fri, 17 Jan 2020 16:53:45 +0000 Subject: [master] 66b27ae19 even more s00010.vtc tweaking In-Reply-To: References: <20200116122306.863F9A419C@lists.varnish-cache.org> <6ffc5c9f-4d7b-456b-bc20-a46e8afbe95c@uplex.de> Message-ID: On Thu, Jan 16, 2020 at 2:13 PM Nils Goroll wrote: > > On 16/01/2020 15:08, Dridi Boukelmoune wrote: > > I can take over later, I have a FreeBSD VM handy where I try changes > > before pushing them. > > Thank you soo much. I feel lost Done, please let me know if s10 is easier to grok now :) Dridi From nils.goroll at uplex.de Fri Jan 17 18:51:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Fri, 17 Jan 2020 18:51:06 +0000 (UTC) Subject: [master] 7ce983ec2 more TAKE_OBJ_NOTNULLification Message-ID: <20200117185106.C0E90A92F4@lists.varnish-cache.org> commit 7ce983ec2e269085c97373133747268602264aa8 Author: Nils Goroll Date: Fri Jan 17 19:45:11 2020 +0100 more TAKE_OBJ_NOTNULLification command: spatch -I include/ -I bin/varnishd/ --dir . --in-place \ --sp-file tools/coccinelle/take_obj_notnull.cocci diff --git a/bin/varnishd/cache/cache_hash.c b/bin/varnishd/cache/cache_hash.c index b98d3e535..692f0961f 100644 --- a/bin/varnishd/cache/cache_hash.c +++ b/bin/varnishd/cache/cache_hash.c @@ -980,12 +980,8 @@ HSH_DerefObjCore(struct worker *wrk, struct objcore **ocp, int rushmax) struct rush rush; unsigned r; - AN(ocp); - oc = *ocp; - *ocp = NULL; - CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); - CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC); + TAKE_OBJ_NOTNULL(oc, ocp, OBJCORE_MAGIC); assert(oc->refcnt > 0); INIT_OBJ(&rush, RUSH_MAGIC); diff --git a/bin/varnishd/cache/cache_vrt_vcl.c b/bin/varnishd/cache/cache_vrt_vcl.c index 228517d5c..40ee619b7 100644 --- a/bin/varnishd/cache/cache_vrt_vcl.c +++ b/bin/varnishd/cache/cache_vrt_vcl.c @@ -345,11 +345,7 @@ VRT_VCL_Allow_Cold(struct vclref **refp) struct vcl *vcl; struct vclref *ref; - AN(refp); - ref = *refp; - *refp = NULL; - - CHECK_OBJ_NOTNULL(ref, VCLREF_MAGIC); + TAKE_OBJ_NOTNULL(ref, refp, VCLREF_MAGIC); vcl = ref->vcl; CHECK_OBJ_NOTNULL(vcl, VCL_MAGIC); @@ -398,11 +394,7 @@ VRT_VCL_Allow_Discard(struct vclref **refp) struct vcl *vcl; struct vclref *ref; - AN(refp); - ref = *refp; - *refp = NULL; - - CHECK_OBJ_NOTNULL(ref, VCLREF_MAGIC); + TAKE_OBJ_NOTNULL(ref, refp, VCLREF_MAGIC); vcl = ref->vcl; CHECK_OBJ_NOTNULL(vcl, VCL_MAGIC); diff --git a/tools/coccinelle/take_obj_notnull.cocci b/tools/coccinelle/take_obj_notnull.cocci index 98ac7ca93..bfb9e03cf 100644 --- a/tools/coccinelle/take_obj_notnull.cocci +++ b/tools/coccinelle/take_obj_notnull.cocci @@ -12,8 +12,11 @@ expression obj, objp, magic; @@ - AN(objp); +... - obj = *objp; +... - *objp = NULL; +... - CHECK_OBJ_NOTNULL(obj, magic); + TAKE_OBJ_NOTNULL(obj, objp, magic); @@ -22,8 +25,11 @@ expression obj, objp, magic; @@ - AN(objp); +... - obj = *objp; +... - CHECK_OBJ_NOTNULL(obj, magic); +... - *objp = NULL; + TAKE_OBJ_NOTNULL(obj, objp, magic); @@ -32,7 +38,9 @@ expression obj, objp, magic; @@ - AN(objp); +... - obj = *objp; +... - CHECK_OBJ_NOTNULL(obj, magic); + TAKE_OBJ_NOTNULL(obj, objp, magic); ... From nils.goroll at uplex.de Fri Jan 17 19:14:07 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Fri, 17 Jan 2020 19:14:07 +0000 (UTC) Subject: [master] 65cd2e05c TAKE_OBJ_NOTNULLification: cases with the first AN(objp) missing Message-ID: <20200117191407.EBBB7A9C33@lists.varnish-cache.org> commit 65cd2e05c70f2870388c13cc0b4c274e7f94ca89 Author: Nils Goroll Date: Fri Jan 17 19:55:50 2020 +0100 TAKE_OBJ_NOTNULLification: cases with the first AN(objp) missing in these cases, the initial AN(objp) was missing, so we would potentially dereference a NULL pointer without an explicit assertion failure. in VCL_Rel(), AN(*vcc) was likely just a typo resulting in a semantic noop (the check was a duplication of the NULL check in CHECK_OBJ_NOTNULL). ... more examples why using the macro is a good idea diff --git a/bin/varnishd/cache/cache_tcp_pool.c b/bin/varnishd/cache/cache_tcp_pool.c index 14c9577cd..a20e04ef6 100644 --- a/bin/varnishd/cache/cache_tcp_pool.c +++ b/bin/varnishd/cache/cache_tcp_pool.c @@ -316,9 +316,7 @@ VCP_Recycle(const struct worker *wrk, struct pfd **pfdp) int i = 0; CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); - pfd = *pfdp; - *pfdp = NULL; - CHECK_OBJ_NOTNULL(pfd, PFD_MAGIC); + TAKE_OBJ_NOTNULL(pfd, pfdp, PFD_MAGIC); cp = pfd->conn_pool; CHECK_OBJ_NOTNULL(cp, CONN_POOL_MAGIC); @@ -451,9 +449,7 @@ VCP_Close(struct pfd **pfdp) struct pfd *pfd; struct conn_pool *cp; - pfd = *pfdp; - *pfdp = NULL; - CHECK_OBJ_NOTNULL(pfd, PFD_MAGIC); + TAKE_OBJ_NOTNULL(pfd, pfdp, PFD_MAGIC); cp = pfd->conn_pool; CHECK_OBJ_NOTNULL(cp, CONN_POOL_MAGIC); diff --git a/bin/varnishd/cache/cache_vrt_vcl.c b/bin/varnishd/cache/cache_vrt_vcl.c index 40ee619b7..d1eb561b8 100644 --- a/bin/varnishd/cache/cache_vrt_vcl.c +++ b/bin/varnishd/cache/cache_vrt_vcl.c @@ -123,11 +123,7 @@ VCL_Rel(struct vcl **vcc) { struct vcl *vcl; - AN(*vcc); - vcl = *vcc; - *vcc = NULL; - - CHECK_OBJ_NOTNULL(vcl, VCL_MAGIC); + TAKE_OBJ_NOTNULL(vcl, vcc, VCL_MAGIC); Lck_Lock(&vcl_mtx); assert(vcl->busy > 0); vcl->busy--; diff --git a/tools/coccinelle/take_obj_notnull.cocci b/tools/coccinelle/take_obj_notnull.cocci index bfb9e03cf..abd31fc38 100644 --- a/tools/coccinelle/take_obj_notnull.cocci +++ b/tools/coccinelle/take_obj_notnull.cocci @@ -24,6 +24,19 @@ expression obj, objp, magic; expression obj, objp, magic; @@ +- AN(*objp); +... +- obj = *objp; +... +- *objp = NULL; +... +- CHECK_OBJ_NOTNULL(obj, magic); ++ TAKE_OBJ_NOTNULL(obj, objp, magic); + +@@ +expression obj, objp, magic; +@@ + - AN(objp); ... - obj = *objp; @@ -45,3 +58,14 @@ expression obj, objp, magic; + TAKE_OBJ_NOTNULL(obj, objp, magic); ... - *objp = NULL; + +@@ +expression obj, objp, magic; +@@ + +- obj = *objp; +... +- *objp = NULL; +... +- CHECK_OBJ_NOTNULL(obj, magic); ++ TAKE_OBJ_NOTNULL(obj, objp, magic); From nils.goroll at uplex.de Sat Jan 18 12:31:07 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Sat, 18 Jan 2020 12:31:07 +0000 (UTC) Subject: [master] a06095da1 fix vcl temperature panic output Message-ID: <20200118123107.972A195FB8@lists.varnish-cache.org> commit a06095da13188d919a403fcab8c7bff8a9e61997 Author: Nils Goroll Date: Sat Jan 18 13:28:33 2020 +0100 fix vcl temperature panic output When we turned the vcl temperatures into a struct, we overlooked this statement because of the cast. Noticed when staring at #3192 diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c index 5eed51733..3299fd06c 100644 --- a/bin/varnishd/cache/cache_vcl.c +++ b/bin/varnishd/cache/cache_vcl.c @@ -222,7 +222,7 @@ VCL_Panic(struct vsb *vsb, const char *nm, const struct vcl *vcl) VSB_printf(vsb, "busy = %u,\n", vcl->busy); VSB_printf(vsb, "discard = %u,\n", vcl->discard); VSB_printf(vsb, "state = %s,\n", vcl->state); - VSB_printf(vsb, "temp = %s,\n", (const volatile char *)vcl->temp); + VSB_printf(vsb, "temp = %s,\n", vcl->temp ? vcl->temp->name : "(null)"); VSB_cat(vsb, "conf = {\n"); VSB_indent(vsb, 2); if (vcl->conf == NULL) { From nils.goroll at uplex.de Sat Jan 18 13:25:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Sat, 18 Jan 2020 13:25:06 +0000 (UTC) Subject: [master] b99c0bedd fix missing initialization Message-ID: <20200118132506.6D35F9745A@lists.varnish-cache.org> commit b99c0bedd0990cd171a48ab883debdf5e2172d7e Author: Nils Goroll Date: Sat Jan 18 14:19:10 2020 +0100 fix missing initialization ... introduced with 3bb8b84cd86a4d2b95c7e2508ace6d868ced412c: in Pool_Work_Thread(), we could break out of the for (i = 0; i < TASK_QUEUE__END; i++) loop with tp set to the value from the previous iteration of the top while() loop where if should have been NULL (for no task found). Noticed staring at #3192 - unclear yet if related diff --git a/bin/varnishd/cache/cache_wrk.c b/bin/varnishd/cache/cache_wrk.c index d66bfa809..15558adf7 100644 --- a/bin/varnishd/cache/cache_wrk.c +++ b/bin/varnishd/cache/cache_wrk.c @@ -335,7 +335,7 @@ pool_kiss_of_death(struct worker *wrk, void *priv) static void Pool_Work_Thread(struct pool *pp, struct worker *wrk) { - struct pool_task *tp = NULL; + struct pool_task *tp; struct pool_task tpx, tps; vtim_real tmo; int i, reserve; @@ -344,6 +344,7 @@ Pool_Work_Thread(struct pool *pp, struct worker *wrk) wrk->pool = pp; while (1) { CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); + tp = NULL; WS_Reset(wrk->aws, 0); AZ(wrk->vsl); From nils.goroll at uplex.de Mon Jan 20 10:21:05 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 20 Jan 2020 10:21:05 +0000 (UTC) Subject: [master] 35f574fb9 fix bad free of vsb on the stack Message-ID: <20200120102105.E1FFEB2C34@lists.varnish-cache.org> commit 35f574fb9fdae92812f64383bbfc26e2b3505437 Author: Nils Goroll Date: Mon Jan 20 11:17:14 2020 +0100 fix bad free of vsb on the stack introduced with a74315bcebce9aae690e53847581e7f94033eff1 spotted by coverity diff --git a/bin/varnishd/proxy/cache_proxy_proto.c b/bin/varnishd/proxy/cache_proxy_proto.c index 4a9d0e681..fb24fafdc 100644 --- a/bin/varnishd/proxy/cache_proxy_proto.c +++ b/bin/varnishd/proxy/cache_proxy_proto.c @@ -758,10 +758,8 @@ VPX_Send_Proxy(int fd, int version, const struct sess *sp) r = write(fd, VSB_data(vsb), VSB_len(vsb)); - if (!DO_DEBUG(DBG_PROTOCOL)) { - VSB_delete(vsb); + if (!DO_DEBUG(DBG_PROTOCOL)) return (r); - } vsb2 = VSB_new_auto(); AN(vsb2); @@ -769,7 +767,6 @@ VPX_Send_Proxy(int fd, int version, const struct sess *sp) version == 2 ? VSB_QUOTE_HEX : 0); AZ(VSB_finish(vsb2)); VSL(SLT_Debug, 999, "PROXY_HDR %s", VSB_data(vsb2)); - VSB_delete(vsb); VSB_delete(vsb2); return (r); } From nils.goroll at uplex.de Mon Jan 20 10:24:59 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 20 Jan 2020 11:24:59 +0100 Subject: [master] 35f574fb9 fix bad free of vsb on the stack In-Reply-To: <20200120102105.E1FFEB2C34@lists.varnish-cache.org> References: <20200120102105.E1FFEB2C34@lists.varnish-cache.org> Message-ID: <43ec75d9-c6de-cf48-f96d-9ea1816f684a@uplex.de> FTR: VSB_delete() does not actually free a fixed VSB, so this is purely cosmetic (and to appease coverity) On 20/01/2020 11:21, Nils Goroll wrote: > commit 35f574fb9fdae92812f64383bbfc26e2b3505437 > Author: Nils Goroll > Date: Mon Jan 20 11:17:14 2020 +0100 > > fix bad free of vsb on the stack > > introduced with a74315bcebce9aae690e53847581e7f94033eff1 > > spotted by coverity > > diff --git a/bin/varnishd/proxy/cache_proxy_proto.c b/bin/varnishd/proxy/cache_proxy_proto.c > index 4a9d0e681..fb24fafdc 100644 > --- a/bin/varnishd/proxy/cache_proxy_proto.c > +++ b/bin/varnishd/proxy/cache_proxy_proto.c > @@ -758,10 +758,8 @@ VPX_Send_Proxy(int fd, int version, const struct sess *sp) > > r = write(fd, VSB_data(vsb), VSB_len(vsb)); > > - if (!DO_DEBUG(DBG_PROTOCOL)) { > - VSB_delete(vsb); > + if (!DO_DEBUG(DBG_PROTOCOL)) > return (r); > - } > > vsb2 = VSB_new_auto(); > AN(vsb2); > @@ -769,7 +767,6 @@ VPX_Send_Proxy(int fd, int version, const struct sess *sp) > version == 2 ? VSB_QUOTE_HEX : 0); > AZ(VSB_finish(vsb2)); > VSL(SLT_Debug, 999, "PROXY_HDR %s", VSB_data(vsb2)); > - VSB_delete(vsb); > VSB_delete(vsb2); > return (r); > } > _______________________________________________ > varnish-commit mailing list > varnish-commit at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit -- ** * * UPLEX - Nils Goroll Systemoptimierung Scheffelstra?e 32 22301 Hamburg tel +49 40 28805731 mob +49 170 2723133 fax +49 40 42949753 xmpp://slink at jabber.int.uplex.de/ http://uplex.de/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: From nils.goroll at uplex.de Mon Jan 20 12:41:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 20 Jan 2020 12:41:06 +0000 (UTC) Subject: [master] c3ebd58cb fix return value of vtc.workspace_reserve Message-ID: <20200120124106.4E1FF924A@lists.varnish-cache.org> commit c3ebd58cbb06317b18045d9f770510c39ccc3a2a Author: Nils Goroll Date: Mon Jan 20 12:43:47 2020 +0100 fix return value of vtc.workspace_reserve diff --git a/lib/libvmod_vtc/vmod_vtc.c b/lib/libvmod_vtc/vmod_vtc.c index cb3e3a19e..6bb31ba55 100644 --- a/lib/libvmod_vtc/vmod_vtc.c +++ b/lib/libvmod_vtc/vmod_vtc.c @@ -193,7 +193,7 @@ vmod_workspace_reserve(VRT_CTX, VCL_ENUM which, VCL_INT size) if (r == 0) return (0); WS_Release(ws, 0); - return (1); + return (r); } VCL_INT v_matchproto_(td_vtc_workspace_free) From nils.goroll at uplex.de Mon Jan 20 12:41:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 20 Jan 2020 12:41:06 +0000 (UTC) Subject: [master] b12af6813 Improve workspace_reserve test Message-ID: <20200120124106.67AB3924D@lists.varnish-cache.org> commit b12af6813d3a3ab9a6579c583d17fdd29ac1adfb Author: Nils Goroll Date: Mon Jan 20 13:15:21 2020 +0100 Improve workspace_reserve test The test is now conducted on the session workspace in order to have the client workspace free to generate vtc.log() output which needs workspace to format the string. This made me notice that vtc.log, via WS_Reset(), clears a previous workspace overflow and I wonder if this is how it should be. diff --git a/bin/varnishtest/tests/r03131.vtc b/bin/varnishtest/tests/r03131.vtc index 5de9b7bfe..e0b47d4ca 100644 --- a/bin/varnishtest/tests/r03131.vtc +++ b/bin/varnishtest/tests/r03131.vtc @@ -12,13 +12,38 @@ varnish v1 -vcl { sub vcl_synth { set resp.http.res1 = vtc.workspace_reserve(client, 1024 * 1024); - vtc.workspace_alloc(client, -1); - set resp.http.res2 = vtc.workspace_reserve(client, 8); - set resp.http.res3 = vtc.workspace_reserve(client, 8); + + # XXX overflow gets cleared by WS_Reset called from std.log() + # -> do we want this ? + + vtc.workspace_alloc(session, -16); + std.log("res(8) = " + vtc.workspace_reserve(session, 8)); + std.log("res(15) = " + vtc.workspace_reserve(session, 15)); + std.log("res(16) = " + vtc.workspace_reserve(session, 16)); + std.log("res(17) = " + vtc.workspace_reserve(session, 17)); + std.log("res(8) = " + vtc.workspace_reserve(session, 8)); } } -start +logexpect l1 -v v1 -g raw { + expect * * VCL_Log {^\Qres(8) = 8.000\E$} + + # XXX these should return 16 + expect 0 = VCL_Log {^\Qres(15) = 0.000\E$} + expect 0 = VCL_Log {^\Qres(16) = 0.000\E$} + + expect 0 = VCL_Log {^\Qres(17) = 0.000\E$} + + # workspace is now overflown, but smaller reservation still succeeds + expect 0 = VCL_Log {^\Qres(8) = 8.000\E$} + + expect * = Error {^workspace_session overflow$} +} -start + client c1 { txreq rxresp + expect resp.status == 500 } -run + +logexpect l1 -wait From nils.goroll at uplex.de Mon Jan 20 12:41:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 20 Jan 2020 12:41:06 +0000 (UTC) Subject: [master] 03d9f5df4 Fix WS_ReserveSize calls when bytes is equal to free workspace Message-ID: <20200120124106.7F6119251@lists.varnish-cache.org> commit 03d9f5df4b5dbe10d4ff775aee384b163581471e Author: Martin Blix Grydeland Date: Mon Dec 16 16:37:27 2019 +0100 Fix WS_ReserveSize calls when bytes is equal to free workspace Currently, with the 505b7bd9643006fa8e3977f920564ce12a2b24a2 patch, when calling WS_ReserveSize with bytes equal to the amount of workspace that is currently available, it will return zero and mark overflow. This patch redoes the patch, and changes it to return zero and overflow only when the requested number of bytes is larger than what is available. diff --git a/bin/varnishd/cache/cache_ws.c b/bin/varnishd/cache/cache_ws.c index a8208d3a0..61fc5b3fa 100644 --- a/bin/varnishd/cache/cache_ws.c +++ b/bin/varnishd/cache/cache_ws.c @@ -262,7 +262,7 @@ WS_ReserveSize(struct ws *ws, unsigned bytes) if (bytes < b2) b2 = PRNDUP(bytes); - if (ws->f + b2 >= ws->e) { + if (bytes > b2) { WS_MarkOverflow(ws); return (0); } From nils.goroll at uplex.de Mon Jan 20 12:41:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 20 Jan 2020 12:41:06 +0000 (UTC) Subject: [master] d241d80e8 adjust vtc to previous commit Message-ID: <20200120124106.980CE9255@lists.varnish-cache.org> commit d241d80e89422494665a01f2e4d70e76bdc0ea63 Author: Nils Goroll Date: Mon Jan 20 13:17:31 2020 +0100 adjust vtc to previous commit ... which was received from martin in private communication, thank you diff --git a/bin/varnishtest/tests/r03131.vtc b/bin/varnishtest/tests/r03131.vtc index e0b47d4ca..5dda251fb 100644 --- a/bin/varnishtest/tests/r03131.vtc +++ b/bin/varnishtest/tests/r03131.vtc @@ -27,10 +27,8 @@ varnish v1 -vcl { logexpect l1 -v v1 -g raw { expect * * VCL_Log {^\Qres(8) = 8.000\E$} - - # XXX these should return 16 - expect 0 = VCL_Log {^\Qres(15) = 0.000\E$} - expect 0 = VCL_Log {^\Qres(16) = 0.000\E$} + expect 0 = VCL_Log {^\Qres(15) = 16.000\E$} + expect 0 = VCL_Log {^\Qres(16) = 16.000\E$} expect 0 = VCL_Log {^\Qres(17) = 0.000\E$} From dridi at varni.sh Mon Jan 20 13:18:49 2020 From: dridi at varni.sh (Dridi Boukelmoune) Date: Mon, 20 Jan 2020 13:18:49 +0000 Subject: [master] 35f574fb9 fix bad free of vsb on the stack In-Reply-To: <43ec75d9-c6de-cf48-f96d-9ea1816f684a@uplex.de> References: <20200120102105.E1FFEB2C34@lists.varnish-cache.org> <43ec75d9-c6de-cf48-f96d-9ea1816f684a@uplex.de> Message-ID: On Mon, Jan 20, 2020 at 10:25 AM Nils Goroll wrote: > > FTR: VSB_delete() does not actually free a fixed VSB, so this is purely cosmetic > (and to appease coverity) I looked at this yesterday and couldn't find a problem. I came to the conclusion that Coverity Scan was not smart enough to see this was safe (and to be fair, it's not too surprising) but I wouldn't have removed those lines since it is correct and clears the VSB state on the stack (unless of course it's optimized away) before the function returns. There is also the integrity check that could catch (unlikely) future mistakes. Dridi > On 20/01/2020 11:21, Nils Goroll wrote: > > commit 35f574fb9fdae92812f64383bbfc26e2b3505437 > > Author: Nils Goroll > > Date: Mon Jan 20 11:17:14 2020 +0100 > > > > fix bad free of vsb on the stack > > > > introduced with a74315bcebce9aae690e53847581e7f94033eff1 > > > > spotted by coverity > > > > diff --git a/bin/varnishd/proxy/cache_proxy_proto.c b/bin/varnishd/proxy/cache_proxy_proto.c > > index 4a9d0e681..fb24fafdc 100644 > > --- a/bin/varnishd/proxy/cache_proxy_proto.c > > +++ b/bin/varnishd/proxy/cache_proxy_proto.c > > @@ -758,10 +758,8 @@ VPX_Send_Proxy(int fd, int version, const struct sess *sp) > > > > r = write(fd, VSB_data(vsb), VSB_len(vsb)); > > > > - if (!DO_DEBUG(DBG_PROTOCOL)) { > > - VSB_delete(vsb); > > + if (!DO_DEBUG(DBG_PROTOCOL)) > > return (r); > > - } > > > > vsb2 = VSB_new_auto(); > > AN(vsb2); > > @@ -769,7 +767,6 @@ VPX_Send_Proxy(int fd, int version, const struct sess *sp) > > version == 2 ? VSB_QUOTE_HEX : 0); > > AZ(VSB_finish(vsb2)); > > VSL(SLT_Debug, 999, "PROXY_HDR %s", VSB_data(vsb2)); > > - VSB_delete(vsb); > > VSB_delete(vsb2); > > return (r); > > } > > _______________________________________________ > > varnish-commit mailing list > > varnish-commit at varnish-cache.org > > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit > > > -- > > ** * * UPLEX - Nils Goroll Systemoptimierung > > Scheffelstra?e 32 > 22301 Hamburg > > tel +49 40 28805731 > mob +49 170 2723133 > fax +49 40 42949753 > > xmpp://slink at jabber.int.uplex.de/ > > http://uplex.de/ > > > _______________________________________________ > varnish-commit mailing list > varnish-commit at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit From phk at FreeBSD.org Mon Jan 20 13:33:06 2020 From: phk at FreeBSD.org (Poul-Henning Kamp) Date: Mon, 20 Jan 2020 13:33:06 +0000 (UTC) Subject: [master] e5e545f9f OSX returns EINVAL for pthread_cond_timedwait(2) timestamps in the past. Message-ID: <20200120133307.0C04660CE9@lists.varnish-cache.org> commit e5e545f9fe14b4bfd4003c26403d80645c73385a Author: Poul-Henning Kamp Date: Mon Jan 20 13:30:06 2020 +0000 OSX returns EINVAL for pthread_cond_timedwait(2) timestamps in the past. Fixes #1853 diff --git a/bin/varnishd/cache/cache_lck.c b/bin/varnishd/cache/cache_lck.c index 3d7dd74d8..c0bb98bb3 100644 --- a/bin/varnishd/cache/cache_lck.c +++ b/bin/varnishd/cache/cache_lck.c @@ -40,6 +40,10 @@ #include #include +#if defined (__APPLE__) +# include "vtim.h" +#endif + #include "VSC_lck.h" struct ilck { @@ -214,6 +218,19 @@ Lck_CondWait(pthread_cond_t *cond, struct lock *lck, vtim_real when) ts.tv_sec = (long)t; assert(ts.tv_nsec >= 0 && ts.tv_nsec < 999999999); errno = pthread_cond_timedwait(cond, &ilck->mtx, &ts); +#if defined (__APPLE__) + if (errno == EINVAL && when > VTIM_real()) { + /* + * Most kernels treat this as honest error, + * recognizing that a thread has no way to + * prevent being descheduled between a user- + * land check of the timestamp, and getting + * the timestamp into the kernel before it + * expires. OS/X on the other hand... + */ + errno = ETIMEDOUT; + } +#endif assert(errno == 0 || errno == ETIMEDOUT || errno == EINTR); From nils.goroll at uplex.de Tue Jan 21 16:40:08 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Tue, 21 Jan 2020 16:40:08 +0000 (UTC) Subject: [master] 906955836 remove wrong comment Message-ID: <20200121164008.779956763@lists.varnish-cache.org> commit 9069558365f42943a186271424f2929b69461708 Author: Nils Goroll Date: Tue Jan 21 15:35:11 2020 +0100 remove wrong comment it is the true (1) argument to VCL_Get_CliCtx which creates the msg vsb. diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c index 3299fd06c..39dd7e112 100644 --- a/bin/varnishd/cache/cache_vcl.c +++ b/bin/varnishd/cache/cache_vcl.c @@ -778,7 +778,7 @@ vcl_cli_state(struct cli *cli, const char * const *av, void *priv) AN(av[3]); ctx = VCL_Get_CliCtx(1); ctx->vcl = vcl_find(av[2]); - AN(ctx->vcl); // MGT ensures this + AN(ctx->vcl); if (vcl_set_state(ctx, av[3])) { AZ(VSB_finish(ctx->msg)); VCLI_SetResult(cli, CLIS_CANT); From nils.goroll at uplex.de Tue Jan 21 16:40:08 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Tue, 21 Jan 2020 16:40:08 +0000 (UTC) Subject: [master] 7d93810ac issue vcl event through vcl_send_event() Message-ID: <20200121164008.8BB396766@lists.varnish-cache.org> commit 7d93810acfbf2437b82ec3b1aebef54d767f0190 Author: Nils Goroll Date: Tue Jan 21 17:06:14 2020 +0100 issue vcl event through vcl_send_event() we were missing VCL_TaskEnter()/VCL_TaskLeave() Noticed working on #2902 diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c index 39dd7e112..2bd3f1eeb 100644 --- a/bin/varnishd/cache/cache_vcl.c +++ b/bin/varnishd/cache/cache_vcl.c @@ -540,7 +540,7 @@ vcl_set_state(VRT_CTX, const char *state) vcl_BackendEvent(vcl, VCL_EVENT_WARM); break; } - AZ(vcl->conf->event_vcl(ctx, VCL_EVENT_COLD)); + AZ(vcl_send_event(ctx, VCL_EVENT_COLD)); vcl->temp = VCL_TEMP_COLD; } break; From nils.goroll at uplex.de Tue Jan 21 16:40:08 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Tue, 21 Jan 2020 16:40:08 +0000 (UTC) Subject: [master] 8f937e31f straighten cli ctx vs. temperature event Message-ID: <20200121164008.A8CFC6769@lists.varnish-cache.org> commit 8f937e31f6c5e2abf0d65a9a539e9bb6c78de4f4 Author: Nils Goroll Date: Tue Jan 21 16:29:18 2020 +0100 straighten cli ctx vs. temperature event Our code was inconsistent with respect to the cli vrt_ctx.msg being set for vcl temperature events. This patch is intended as a temporary bandaid to at least make the code consistent. A proper solution is pending after clarification of the intent in #2902, in particular wrt VCL_EVENT_COLD, which, by design, should not have a ctx->msg, but does have one at the moment. See #2902 for more details diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c index 2bd3f1eeb..4a6a0605d 100644 --- a/bin/varnishd/cache/cache_vcl.c +++ b/bin/varnishd/cache/cache_vcl.c @@ -567,6 +567,9 @@ vcl_cancel_load(struct vrt_ctx *ctx, struct cli *cli, VCLI_Out(cli, "VCL \"%s\" Failed %s", name, step); if (VSB_len(ctx->msg)) VCLI_Out(cli, "\nMessage:\n\t%s", VSB_data(ctx->msg)); + VCL_Rel_CliCtx(&ctx); + ctx = VCL_Get_CliCtx(0); + ctx->vcl = vcl; ctx->method = VCL_MET_FINI; AZ(vcl_send_event(ctx, VCL_EVENT_DISCARD)); ctx->method = 0; @@ -641,20 +644,24 @@ VCL_Poll(void) struct vcl *vcl, *vcl2; ASSERT_CLI(); - ctx = VCL_Get_CliCtx(0); VTAILQ_FOREACH_SAFE(vcl, &vcl_head, list, vcl2) { if (vcl->temp == VCL_TEMP_BUSY || vcl->temp == VCL_TEMP_COOLING) { + // XXX #2902 : cold event to have msg ? + // move ctx into vcl_set_state() ? + ctx = VCL_Get_CliCtx(1); ctx->vcl = vcl; ctx->syntax = ctx->vcl->conf->syntax; ctx->method = 0; (void)vcl_set_state(ctx, "0"); + VCL_Rel_CliCtx(&ctx); } if (vcl->discard && vcl->temp == VCL_TEMP_COLD) { AZ(vcl->busy); assert(vcl != vcl_active); assert(VTAILQ_EMPTY(&vcl->ref_list)); VTAILQ_REMOVE(&vcl_head, vcl, list); + ctx = VCL_Get_CliCtx(0); ctx->vcl = vcl; ctx->syntax = ctx->vcl->conf->syntax; ctx->method = VCL_MET_FINI; @@ -665,9 +672,9 @@ VCL_Poll(void) VCL_Close(&vcl); VSC_C_main->n_vcl--; VSC_C_main->n_vcl_discard--; + VCL_Rel_CliCtx(&ctx); } } - VCL_Rel_CliCtx(&ctx); } /*--------------------------------------------------------------------*/ diff --git a/bin/varnishd/cache/cache_vrt.c b/bin/varnishd/cache/cache_vrt.c index d6d32ca0a..ef5a135cd 100644 --- a/bin/varnishd/cache/cache_vrt.c +++ b/bin/varnishd/cache/cache_vrt.c @@ -631,6 +631,7 @@ VRT_fail(VRT_CTX, const char *fmt, ...) if (ctx->vsl != NULL) { VSLbv(ctx->vsl, SLT_VCL_Error, fmt, ap); } else { + AN(ctx->msg); VSB_vprintf(ctx->msg, fmt, ap); VSB_putc(ctx->msg, '\n'); } From nils.goroll at uplex.de Tue Jan 21 16:40:08 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Tue, 21 Jan 2020 16:40:08 +0000 (UTC) Subject: [master] 2f2ef5909 clarify when we do (not) have ctx->msg Message-ID: <20200121164008.CFBD0676F@lists.varnish-cache.org> commit 2f2ef5909a90bf7b74dd1f0a29c2228db0cd898d Author: Nils Goroll Date: Tue Jan 21 15:49:15 2020 +0100 clarify when we do (not) have ctx->msg This tests that we are at least consistent, though not necessarily correct See #2902 diff --git a/include/vrt.h b/include/vrt.h index 168a4251e..979d5b3d9 100644 --- a/include/vrt.h +++ b/include/vrt.h @@ -286,7 +286,13 @@ struct vrt_ctx { unsigned *handling; unsigned vclver; - struct vsb *msg; // Only in ...init() + /* + * msg is for error messages and exists only for + * VCL_EVENT_LOAD + * VCL_EVENT_WARM + * VCL_EVENT_COLD + */ + struct vsb *msg; struct vsl_log *vsl; VCL_VCL vcl; struct ws *ws; diff --git a/lib/libvmod_debug/vmod_debug.c b/lib/libvmod_debug/vmod_debug.c index 2c601fe1c..a17760e69 100644 --- a/lib/libvmod_debug/vmod_debug.c +++ b/lib/libvmod_debug/vmod_debug.c @@ -495,6 +495,8 @@ event_cold(VRT_CTX, const struct vmod_priv *priv) pthread_t thread; struct priv_vcl *priv_vcl; + AN(ctx->msg); + CAST_OBJ_NOTNULL(priv_vcl, priv->priv, PRIV_VCL_MAGIC); VSL(SLT_Debug, 0, "%s: VCL_EVENT_COLD", VCL_Name(ctx->vcl)); @@ -530,6 +532,8 @@ event_discard(VRT_CTX, void *priv) (void)priv; + AZ(ctx->msg); + VRT_RemoveVFP(ctx, &xyzzy_rot13); VRT_RemoveVDP(ctx, &xyzzy_vdp_rot13); @@ -557,7 +561,7 @@ xyzzy_event_function(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e) case VCL_EVENT_WARM: return (event_warm(ctx, priv)); case VCL_EVENT_COLD: return (event_cold(ctx, priv)); case VCL_EVENT_DISCARD: return (event_discard(ctx, priv)); - default: return (0); + default: WRONG("we should test all possible events"); } } From gquintard at users.noreply.github.com Tue Jan 21 17:04:06 2020 From: gquintard at users.noreply.github.com (guillaume quintard) Date: Tue, 21 Jan 2020 17:04:06 +0000 (UTC) Subject: [master] ffc69d817 Add 'arch' to the jobs, so that it tests both amd64 and arm64 on Linux Message-ID: <20200121170406.D09FF7652@lists.varnish-cache.org> commit ffc69d8170fef118f02b8dd158feb08ae7a24d87 Author: Martin Tzvetanov Grigorov Date: Sun Jan 19 18:30:30 2020 +0200 Add 'arch' to the jobs, so that it tests both amd64 and arm64 on Linux diff --git a/.travis.yml b/.travis.yml index 0d4c431de..806d4f45a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ jobs: stage: test os: linux dist: xenial + arch: amd64 compiler: clang addons: apt: @@ -19,6 +20,7 @@ jobs: - python3-docutils - python3-sphinx - libunwind-dev + - libpcre3-dev before_script: - ./autogen.sh - ./configure --with-unwind @@ -29,8 +31,16 @@ jobs: else make -j3 check VERBOSE=1 fi + - <<: *test-linux + arch: arm64 + - <<: *test-linux + compiler: gcc + before_script: + - ./autogen.sh + - ./configure - <<: *test-linux compiler: gcc + arch: arm64 before_script: - ./autogen.sh - ./configure From dridi.boukelmoune at gmail.com Thu Jan 23 16:17:08 2020 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Thu, 23 Jan 2020 16:17:08 +0000 (UTC) Subject: [master] 4bcea68ab Wrong fromat Message-ID: <20200123161708.87854A5A5E@lists.varnish-cache.org> commit 4bcea68ab55e3d31075a09167bb8f3cc09a36591 Author: Dridi Boukelmoune Date: Thu Jan 23 17:16:02 2020 +0100 Wrong fromat diff --git a/doc/changes.rst b/doc/changes.rst index ee9c13405..22c14f6cc 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -33,8 +33,8 @@ NEXT (2020-03-15) * The ``MAIN.sess_drop`` counter is gone. * New configure switch: --with-unwind. Alpine linux appears to offer a - `libexecinfo` implementation that crashes when called by Varnish, this - offers the alternative of using `libunwind` instead. + ``libexecinfo`` implementation that crashes when called by Varnish, this + offers the alternative of using ``libunwind`` instead. * backend ``none`` was added for "no backend". From phk at FreeBSD.org Mon Jan 27 11:20:12 2020 From: phk at FreeBSD.org (Poul-Henning Kamp) Date: Mon, 27 Jan 2020 11:20:12 +0000 (UTC) Subject: [master] 508ae8bc1 Add SPDX license identifiers to all files with a Copyright notice. Message-ID: <20200127112013.1765BA615B@lists.varnish-cache.org> commit 508ae8bc149d3ad338d227a04ddc030e2045105b Author: Poul-Henning Kamp Date: Mon Jan 27 11:19:09 2020 +0000 Add SPDX license identifiers to all files with a Copyright notice. diff --git a/LICENSE b/LICENSE index 1fc73b8bf..db1cc57f8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,12 @@ +The compilation of software known as "Varnish Cache" is distributed +under the following terms: + Copyright (c) 2006 Verdens Gang AS Copyright (c) 2006-2016 Varnish Software AS All rights reserved. +SPDX-License-Identifier: BSD-2-Clause + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c index cd72a536a..71c82d2a3 100644 --- a/bin/varnishadm/varnishadm.c +++ b/bin/varnishadm/varnishadm.c @@ -5,6 +5,8 @@ * * Author: Cecilie Fritzvold * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/builtin.vcl b/bin/varnishd/builtin.vcl index a7e23f49a..329323c90 100644 --- a/bin/varnishd/builtin.vcl +++ b/bin/varnishd/builtin.vcl @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h index 14f5338c4..ecf14cf41 100644 --- a/bin/varnishd/cache/cache.h +++ b/bin/varnishd/cache/cache.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_acceptor.c b/bin/varnishd/cache/cache_acceptor.c index 36eddcca7..b40987e00 100644 --- a/bin/varnishd/cache/cache_acceptor.c +++ b/bin/varnishd/cache/cache_acceptor.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_backend.c b/bin/varnishd/cache/cache_backend.c index 31767b4a1..81ab3c5fa 100644 --- a/bin/varnishd/cache/cache_backend.c +++ b/bin/varnishd/cache/cache_backend.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_backend.h b/bin/varnishd/cache/cache_backend.h index c46e10365..9262c5290 100644 --- a/bin/varnishd/cache/cache_backend.h +++ b/bin/varnishd/cache/cache_backend.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_backend_probe.c b/bin/varnishd/cache/cache_backend_probe.c index 3339b722c..252ae7ecb 100644 --- a/bin/varnishd/cache/cache_backend_probe.c +++ b/bin/varnishd/cache/cache_backend_probe.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_ban.c b/bin/varnishd/cache/cache_ban.c index 354e9fc08..03a912d9e 100644 --- a/bin/varnishd/cache/cache_ban.c +++ b/bin/varnishd/cache/cache_ban.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_ban.h b/bin/varnishd/cache/cache_ban.h index 4288f1297..1302c17be 100644 --- a/bin/varnishd/cache/cache_ban.h +++ b/bin/varnishd/cache/cache_ban.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_ban_build.c b/bin/varnishd/cache/cache_ban_build.c index 55fcc4bb1..e8c768ee5 100644 --- a/bin/varnishd/cache/cache_ban_build.c +++ b/bin/varnishd/cache/cache_ban_build.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_ban_lurker.c b/bin/varnishd/cache/cache_ban_lurker.c index 4d0453807..cc18eccb8 100644 --- a/bin/varnishd/cache/cache_ban_lurker.c +++ b/bin/varnishd/cache/cache_ban_lurker.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_busyobj.c b/bin/varnishd/cache/cache_busyobj.c index 98b7f9a74..1e77272c0 100644 --- a/bin/varnishd/cache/cache_busyobj.c +++ b/bin/varnishd/cache/cache_busyobj.c @@ -5,6 +5,8 @@ * Author: Martin Blix Grydeland * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_cli.c b/bin/varnishd/cache/cache_cli.c index b38387d67..85a16a724 100644 --- a/bin/varnishd/cache/cache_cli.c +++ b/bin/varnishd/cache/cache_cli.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_deliver_proc.c b/bin/varnishd/cache/cache_deliver_proc.c index 1bd65a66c..b7a316733 100644 --- a/bin/varnishd/cache/cache_deliver_proc.c +++ b/bin/varnishd/cache/cache_deliver_proc.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_director.c b/bin/varnishd/cache/cache_director.c index 192347f3d..b0adeb172 100644 --- a/bin/varnishd/cache/cache_director.c +++ b/bin/varnishd/cache/cache_director.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_director.h b/bin/varnishd/cache/cache_director.h index 7c0442513..e164e1678 100644 --- a/bin/varnishd/cache/cache_director.h +++ b/bin/varnishd/cache/cache_director.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_esi.h b/bin/varnishd/cache/cache_esi.h index 454e595fb..1e5777b50 100644 --- a/bin/varnishd/cache/cache_esi.h +++ b/bin/varnishd/cache/cache_esi.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_esi_deliver.c b/bin/varnishd/cache/cache_esi_deliver.c index 6e6ca7a8f..301d8f6ed 100644 --- a/bin/varnishd/cache/cache_esi_deliver.c +++ b/bin/varnishd/cache/cache_esi_deliver.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_esi_fetch.c b/bin/varnishd/cache/cache_esi_fetch.c index e301ab705..74b430173 100644 --- a/bin/varnishd/cache/cache_esi_fetch.c +++ b/bin/varnishd/cache/cache_esi_fetch.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_esi_parse.c b/bin/varnishd/cache/cache_esi_parse.c index ed67f0e5f..2cd1f85c8 100644 --- a/bin/varnishd/cache/cache_esi_parse.c +++ b/bin/varnishd/cache/cache_esi_parse.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_expire.c b/bin/varnishd/cache/cache_expire.c index c55bfec91..2ed544dc2 100644 --- a/bin/varnishd/cache/cache_expire.c +++ b/bin/varnishd/cache/cache_expire.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c index 7a2e57b37..9f94a546d 100644 --- a/bin/varnishd/cache/cache_fetch.c +++ b/bin/varnishd/cache/cache_fetch.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_fetch_proc.c b/bin/varnishd/cache/cache_fetch_proc.c index e92c8a685..1e0b766a2 100644 --- a/bin/varnishd/cache/cache_fetch_proc.c +++ b/bin/varnishd/cache/cache_fetch_proc.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_filter.h b/bin/varnishd/cache/cache_filter.h index 57415e1af..4d0c7640d 100644 --- a/bin/varnishd/cache/cache_filter.h +++ b/bin/varnishd/cache/cache_filter.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_gzip.c b/bin/varnishd/cache/cache_gzip.c index 33d7e7ae1..27e6c9926 100644 --- a/bin/varnishd/cache/cache_gzip.c +++ b/bin/varnishd/cache/cache_gzip.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_hash.c b/bin/varnishd/cache/cache_hash.c index 692f0961f..51d2f972f 100644 --- a/bin/varnishd/cache/cache_hash.c +++ b/bin/varnishd/cache/cache_hash.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_http.c b/bin/varnishd/cache/cache_http.c index 5bf32db7b..fad9b236b 100644 --- a/bin/varnishd/cache/cache_http.c +++ b/bin/varnishd/cache/cache_http.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_lck.c b/bin/varnishd/cache/cache_lck.c index c0bb98bb3..7af1a5712 100644 --- a/bin/varnishd/cache/cache_lck.c +++ b/bin/varnishd/cache/cache_lck.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_main.c b/bin/varnishd/cache/cache_main.c index d6618876d..a62cb83f6 100644 --- a/bin/varnishd/cache/cache_main.c +++ b/bin/varnishd/cache/cache_main.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_mempool.c b/bin/varnishd/cache/cache_mempool.c index 9add62d3c..abd5d5daa 100644 --- a/bin/varnishd/cache/cache_mempool.c +++ b/bin/varnishd/cache/cache_mempool.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_obj.c b/bin/varnishd/cache/cache_obj.c index b533eefcf..ef10c10b7 100644 --- a/bin/varnishd/cache/cache_obj.c +++ b/bin/varnishd/cache/cache_obj.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_obj.h b/bin/varnishd/cache/cache_obj.h index 5229b7e00..5208afa0c 100644 --- a/bin/varnishd/cache/cache_obj.h +++ b/bin/varnishd/cache/cache_obj.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_objhead.h b/bin/varnishd/cache/cache_objhead.h index 286859223..bc1782379 100644 --- a/bin/varnishd/cache/cache_objhead.h +++ b/bin/varnishd/cache/cache_objhead.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c index ce0d163fb..d5031b131 100644 --- a/bin/varnishd/cache/cache_panic.c +++ b/bin/varnishd/cache/cache_panic.c @@ -5,6 +5,8 @@ * * Author: Dag-Erling Sm?rgrav * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_pool.c b/bin/varnishd/cache/cache_pool.c index 58846b4e9..c5991c634 100644 --- a/bin/varnishd/cache/cache_pool.c +++ b/bin/varnishd/cache/cache_pool.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_pool.h b/bin/varnishd/cache/cache_pool.h index b4b5890c5..04a026e61 100644 --- a/bin/varnishd/cache/cache_pool.h +++ b/bin/varnishd/cache/cache_pool.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_range.c b/bin/varnishd/cache/cache_range.c index 6370c0951..c1f8bd344 100644 --- a/bin/varnishd/cache/cache_range.c +++ b/bin/varnishd/cache/cache_range.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_req.c b/bin/varnishd/cache/cache_req.c index 0363bf72e..61c0182e8 100644 --- a/bin/varnishd/cache/cache_req.c +++ b/bin/varnishd/cache/cache_req.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_req_body.c b/bin/varnishd/cache/cache_req_body.c index 011b5c511..2987a2bb2 100644 --- a/bin/varnishd/cache/cache_req_body.c +++ b/bin/varnishd/cache/cache_req_body.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c index f4067c1d8..7cff23876 100644 --- a/bin/varnishd/cache/cache_req_fsm.c +++ b/bin/varnishd/cache/cache_req_fsm.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_rfc2616.c b/bin/varnishd/cache/cache_rfc2616.c index a870ba05c..77f30f92c 100644 --- a/bin/varnishd/cache/cache_rfc2616.c +++ b/bin/varnishd/cache/cache_rfc2616.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_session.c b/bin/varnishd/cache/cache_session.c index 1be9f1fff..1ba60742f 100644 --- a/bin/varnishd/cache/cache_session.c +++ b/bin/varnishd/cache/cache_session.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_shmlog.c b/bin/varnishd/cache/cache_shmlog.c index 4eb9ed30b..9590d284f 100644 --- a/bin/varnishd/cache/cache_shmlog.c +++ b/bin/varnishd/cache/cache_shmlog.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_tcp_pool.c b/bin/varnishd/cache/cache_tcp_pool.c index a20e04ef6..d4451e5b7 100644 --- a/bin/varnishd/cache/cache_tcp_pool.c +++ b/bin/varnishd/cache/cache_tcp_pool.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_tcp_pool.h b/bin/varnishd/cache/cache_tcp_pool.h index d7608da85..91bbc642a 100644 --- a/bin/varnishd/cache/cache_tcp_pool.h +++ b/bin/varnishd/cache/cache_tcp_pool.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_transport.h b/bin/varnishd/cache/cache_transport.h index 2551665b5..9d8f9dfc5 100644 --- a/bin/varnishd/cache/cache_transport.h +++ b/bin/varnishd/cache/cache_transport.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_varnishd.h b/bin/varnishd/cache/cache_varnishd.h index 8e8e50664..73c758f23 100644 --- a/bin/varnishd/cache/cache_varnishd.h +++ b/bin/varnishd/cache/cache_varnishd.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_vary.c b/bin/varnishd/cache/cache_vary.c index 4af92f69c..3dc23e33f 100644 --- a/bin/varnishd/cache/cache_vary.c +++ b/bin/varnishd/cache/cache_vary.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c index 4a6a0605d..66b8ff775 100644 --- a/bin/varnishd/cache/cache_vcl.c +++ b/bin/varnishd/cache/cache_vcl.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_vcl.h b/bin/varnishd/cache/cache_vcl.h index 2c4c18016..1864367ce 100644 --- a/bin/varnishd/cache/cache_vcl.h +++ b/bin/varnishd/cache/cache_vcl.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_vgz.h b/bin/varnishd/cache/cache_vgz.h index 6f977c1aa..af5e08933 100644 --- a/bin/varnishd/cache/cache_vgz.h +++ b/bin/varnishd/cache/cache_vgz.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_vpi.c b/bin/varnishd/cache/cache_vpi.c index b80f4be04..298cac7a9 100644 --- a/bin/varnishd/cache/cache_vpi.c +++ b/bin/varnishd/cache/cache_vpi.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_vrt.c b/bin/varnishd/cache/cache_vrt.c index ef5a135cd..f224b9ffd 100644 --- a/bin/varnishd/cache/cache_vrt.c +++ b/bin/varnishd/cache/cache_vrt.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_vrt_filter.c b/bin/varnishd/cache/cache_vrt_filter.c index 2f75dfda0..b6444d886 100644 --- a/bin/varnishd/cache/cache_vrt_filter.c +++ b/bin/varnishd/cache/cache_vrt_filter.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_vrt_priv.c b/bin/varnishd/cache/cache_vrt_priv.c index b20660436..6493698b7 100644 --- a/bin/varnishd/cache/cache_vrt_priv.c +++ b/bin/varnishd/cache/cache_vrt_priv.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_vrt_re.c b/bin/varnishd/cache/cache_vrt_re.c index ad1f44de8..955fb1c2b 100644 --- a/bin/varnishd/cache/cache_vrt_re.c +++ b/bin/varnishd/cache/cache_vrt_re.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_vrt_var.c b/bin/varnishd/cache/cache_vrt_var.c index ab650b6ad..d7cb5f794 100644 --- a/bin/varnishd/cache/cache_vrt_var.c +++ b/bin/varnishd/cache/cache_vrt_var.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_vrt_vcl.c b/bin/varnishd/cache/cache_vrt_vcl.c index d1eb561b8..2da13502f 100644 --- a/bin/varnishd/cache/cache_vrt_vcl.c +++ b/bin/varnishd/cache/cache_vrt_vcl.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_vrt_vmod.c b/bin/varnishd/cache/cache_vrt_vmod.c index 5a5fd1d24..6456b1657 100644 --- a/bin/varnishd/cache/cache_vrt_vmod.c +++ b/bin/varnishd/cache/cache_vrt_vmod.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_wrk.c b/bin/varnishd/cache/cache_wrk.c index 15558adf7..d7fb95530 100644 --- a/bin/varnishd/cache/cache_wrk.c +++ b/bin/varnishd/cache/cache_wrk.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/cache/cache_ws.c b/bin/varnishd/cache/cache_ws.c index 61fc5b3fa..2ea57116a 100644 --- a/bin/varnishd/cache/cache_ws.c +++ b/bin/varnishd/cache/cache_ws.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/common/common_param.h b/bin/varnishd/common/common_param.h index 13ce0cb18..d9e2b8437 100644 --- a/bin/varnishd/common/common_param.h +++ b/bin/varnishd/common/common_param.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/common/common_vsc.c b/bin/varnishd/common/common_vsc.c index ea1d0049c..94cb465cd 100644 --- a/bin/varnishd/common/common_vsc.c +++ b/bin/varnishd/common/common_vsc.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/common/common_vsmw.c b/bin/varnishd/common/common_vsmw.c index 71ced508f..383d90c36 100644 --- a/bin/varnishd/common/common_vsmw.c +++ b/bin/varnishd/common/common_vsmw.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/common/heritage.h b/bin/varnishd/common/heritage.h index db1dd37d6..e3550ada6 100644 --- a/bin/varnishd/common/heritage.h +++ b/bin/varnishd/common/heritage.h @@ -6,6 +6,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/common/vsmw.h b/bin/varnishd/common/vsmw.h index 4d4e35974..07d46b19e 100644 --- a/bin/varnishd/common/vsmw.h +++ b/bin/varnishd/common/vsmw.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/fuzzers/esi_parse_fuzzer.c b/bin/varnishd/fuzzers/esi_parse_fuzzer.c index 34548b90f..0a1b9cc76 100644 --- a/bin/varnishd/fuzzers/esi_parse_fuzzer.c +++ b/bin/varnishd/fuzzers/esi_parse_fuzzer.c @@ -4,6 +4,8 @@ * * Author: Federico G. Schwindt * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/hash/hash_classic.c b/bin/varnishd/hash/hash_classic.c index cb3b0b3a2..71c5e7564 100644 --- a/bin/varnishd/hash/hash_classic.c +++ b/bin/varnishd/hash/hash_classic.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/hash/hash_critbit.c b/bin/varnishd/hash/hash_critbit.c index 1f1a36c1a..2c9d6b4f3 100644 --- a/bin/varnishd/hash/hash_critbit.c +++ b/bin/varnishd/hash/hash_critbit.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/hash/hash_simple_list.c b/bin/varnishd/hash/hash_simple_list.c index 8c0858e18..68d7dc26d 100644 --- a/bin/varnishd/hash/hash_simple_list.c +++ b/bin/varnishd/hash/hash_simple_list.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/hash/hash_slinger.h b/bin/varnishd/hash/hash_slinger.h index 0ff95cca2..66d4c2639 100644 --- a/bin/varnishd/hash/hash_slinger.h +++ b/bin/varnishd/hash/hash_slinger.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/hash/mgt_hash.c b/bin/varnishd/hash/mgt_hash.c index fc715c081..2964177ba 100644 --- a/bin/varnishd/hash/mgt_hash.c +++ b/bin/varnishd/hash/mgt_hash.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/hpack/vhp.h b/bin/varnishd/hpack/vhp.h index ae67136a1..f89dd981a 100644 --- a/bin/varnishd/hpack/vhp.h +++ b/bin/varnishd/hpack/vhp.h @@ -4,6 +4,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/hpack/vhp_decode.c b/bin/varnishd/hpack/vhp_decode.c index fa1e65231..d18f30b13 100644 --- a/bin/varnishd/hpack/vhp_decode.c +++ b/bin/varnishd/hpack/vhp_decode.c @@ -5,6 +5,8 @@ * Author: Martin Blix Grydeland * Author: Dridi Boukelmoune * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/hpack/vhp_gen_hufdec.c b/bin/varnishd/hpack/vhp_gen_hufdec.c index da0593a94..679251efe 100644 --- a/bin/varnishd/hpack/vhp_gen_hufdec.c +++ b/bin/varnishd/hpack/vhp_gen_hufdec.c @@ -4,6 +4,8 @@ * * Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/hpack/vhp_table.c b/bin/varnishd/hpack/vhp_table.c index 3ac29969e..4d8a6b7fa 100644 --- a/bin/varnishd/hpack/vhp_table.c +++ b/bin/varnishd/hpack/vhp_table.c @@ -4,6 +4,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/http1/cache_http1.h b/bin/varnishd/http1/cache_http1.h index 9d83a782a..4e66938bb 100644 --- a/bin/varnishd/http1/cache_http1.h +++ b/bin/varnishd/http1/cache_http1.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/http1/cache_http1_deliver.c b/bin/varnishd/http1/cache_http1_deliver.c index 2714a0410..f5f2c9579 100644 --- a/bin/varnishd/http1/cache_http1_deliver.c +++ b/bin/varnishd/http1/cache_http1_deliver.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/http1/cache_http1_fetch.c b/bin/varnishd/http1/cache_http1_fetch.c index 30d03d469..50edabb83 100644 --- a/bin/varnishd/http1/cache_http1_fetch.c +++ b/bin/varnishd/http1/cache_http1_fetch.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/http1/cache_http1_fsm.c b/bin/varnishd/http1/cache_http1_fsm.c index 63c7833c9..4668c5f8c 100644 --- a/bin/varnishd/http1/cache_http1_fsm.c +++ b/bin/varnishd/http1/cache_http1_fsm.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/http1/cache_http1_line.c b/bin/varnishd/http1/cache_http1_line.c index 5ea8335e0..88ff2ffd9 100644 --- a/bin/varnishd/http1/cache_http1_line.c +++ b/bin/varnishd/http1/cache_http1_line.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/http1/cache_http1_pipe.c b/bin/varnishd/http1/cache_http1_pipe.c index 420005641..2ddaf7f44 100644 --- a/bin/varnishd/http1/cache_http1_pipe.c +++ b/bin/varnishd/http1/cache_http1_pipe.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/http1/cache_http1_proto.c b/bin/varnishd/http1/cache_http1_proto.c index 7fe4422db..935e70e47 100644 --- a/bin/varnishd/http1/cache_http1_proto.c +++ b/bin/varnishd/http1/cache_http1_proto.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/http1/cache_http1_vfp.c b/bin/varnishd/http1/cache_http1_vfp.c index a6cda3caf..30d879ec2 100644 --- a/bin/varnishd/http1/cache_http1_vfp.c +++ b/bin/varnishd/http1/cache_http1_vfp.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/http2/cache_http2.h b/bin/varnishd/http2/cache_http2.h index 4c263ce04..270306d15 100644 --- a/bin/varnishd/http2/cache_http2.h +++ b/bin/varnishd/http2/cache_http2.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/http2/cache_http2_deliver.c b/bin/varnishd/http2/cache_http2_deliver.c index 529042e33..c279ec54f 100644 --- a/bin/varnishd/http2/cache_http2_deliver.c +++ b/bin/varnishd/http2/cache_http2_deliver.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/http2/cache_http2_hpack.c b/bin/varnishd/http2/cache_http2_hpack.c index 0b4b3f78d..e00473452 100644 --- a/bin/varnishd/http2/cache_http2_hpack.c +++ b/bin/varnishd/http2/cache_http2_hpack.c @@ -4,6 +4,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/http2/cache_http2_panic.c b/bin/varnishd/http2/cache_http2_panic.c index 122e43d83..ddc4eb761 100644 --- a/bin/varnishd/http2/cache_http2_panic.c +++ b/bin/varnishd/http2/cache_http2_panic.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c index 9290cc0f8..e90dfa87f 100644 --- a/bin/varnishd/http2/cache_http2_proto.c +++ b/bin/varnishd/http2/cache_http2_proto.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/http2/cache_http2_send.c b/bin/varnishd/http2/cache_http2_send.c index 37f052d26..a684b9488 100644 --- a/bin/varnishd/http2/cache_http2_send.c +++ b/bin/varnishd/http2/cache_http2_send.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/http2/cache_http2_session.c b/bin/varnishd/http2/cache_http2_session.c index 8480692f0..618f26b33 100644 --- a/bin/varnishd/http2/cache_http2_session.c +++ b/bin/varnishd/http2/cache_http2_session.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt.h b/bin/varnishd/mgt/mgt.h index 82c34b52a..7daf52b60 100644 --- a/bin/varnishd/mgt/mgt.h +++ b/bin/varnishd/mgt/mgt.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_acceptor.c b/bin/varnishd/mgt/mgt_acceptor.c index 7f1207c63..1d513bc31 100644 --- a/bin/varnishd/mgt/mgt_acceptor.c +++ b/bin/varnishd/mgt/mgt_acceptor.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_child.c b/bin/varnishd/mgt/mgt_child.c index da85d048b..f2d90e52e 100644 --- a/bin/varnishd/mgt/mgt_child.c +++ b/bin/varnishd/mgt/mgt_child.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_cli.c b/bin/varnishd/mgt/mgt_cli.c index 4de0db5d9..8cf182bac 100644 --- a/bin/varnishd/mgt/mgt_cli.c +++ b/bin/varnishd/mgt/mgt_cli.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_jail.c b/bin/varnishd/mgt/mgt_jail.c index a46a366f8..60515d28f 100644 --- a/bin/varnishd/mgt/mgt_jail.c +++ b/bin/varnishd/mgt/mgt_jail.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_jail_solaris.c b/bin/varnishd/mgt/mgt_jail_solaris.c index dda89efae..961ce1e8e 100644 --- a/bin/varnishd/mgt/mgt_jail_solaris.c +++ b/bin/varnishd/mgt/mgt_jail_solaris.c @@ -6,6 +6,8 @@ * Author: Poul-Henning Kamp * Nils Goroll * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_jail_unix.c b/bin/varnishd/mgt/mgt_jail_unix.c index cc3aeb199..b34fc04e8 100644 --- a/bin/varnishd/mgt/mgt_jail_unix.c +++ b/bin/varnishd/mgt/mgt_jail_unix.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c index 77e2039a5..4753ef69b 100644 --- a/bin/varnishd/mgt/mgt_main.c +++ b/bin/varnishd/mgt/mgt_main.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_param.c b/bin/varnishd/mgt/mgt_param.c index 4eaecfae5..1ce83dee6 100644 --- a/bin/varnishd/mgt/mgt_param.c +++ b/bin/varnishd/mgt/mgt_param.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_param.h b/bin/varnishd/mgt/mgt_param.h index c1e799874..98d47f77d 100644 --- a/bin/varnishd/mgt/mgt_param.h +++ b/bin/varnishd/mgt/mgt_param.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_param_bits.c b/bin/varnishd/mgt/mgt_param_bits.c index 279994a73..14adeba6d 100644 --- a/bin/varnishd/mgt/mgt_param_bits.c +++ b/bin/varnishd/mgt/mgt_param_bits.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_param_tbl.c b/bin/varnishd/mgt/mgt_param_tbl.c index fe1ee507f..adb448a91 100644 --- a/bin/varnishd/mgt/mgt_param_tbl.c +++ b/bin/varnishd/mgt/mgt_param_tbl.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_param_tcp.c b/bin/varnishd/mgt/mgt_param_tcp.c index ef555337b..087800a0f 100644 --- a/bin/varnishd/mgt/mgt_param_tcp.c +++ b/bin/varnishd/mgt/mgt_param_tcp.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_param_tweak.c b/bin/varnishd/mgt/mgt_param_tweak.c index 78f95d3ff..a947fd52b 100644 --- a/bin/varnishd/mgt/mgt_param_tweak.c +++ b/bin/varnishd/mgt/mgt_param_tweak.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_pool.c b/bin/varnishd/mgt/mgt_pool.c index 3d7201380..dc8b847c8 100644 --- a/bin/varnishd/mgt/mgt_pool.c +++ b/bin/varnishd/mgt/mgt_pool.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_shmem.c b/bin/varnishd/mgt/mgt_shmem.c index 574513413..439c9d42c 100644 --- a/bin/varnishd/mgt/mgt_shmem.c +++ b/bin/varnishd/mgt/mgt_shmem.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_symtab.c b/bin/varnishd/mgt/mgt_symtab.c index b8ef07d3a..d4666328a 100644 --- a/bin/varnishd/mgt/mgt_symtab.c +++ b/bin/varnishd/mgt/mgt_symtab.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_util.c b/bin/varnishd/mgt/mgt_util.c index de31fdadd..889fdc69b 100644 --- a/bin/varnishd/mgt/mgt_util.c +++ b/bin/varnishd/mgt/mgt_util.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_vcc.c b/bin/varnishd/mgt/mgt_vcc.c index 86d9a354d..8f742e16c 100644 --- a/bin/varnishd/mgt/mgt_vcc.c +++ b/bin/varnishd/mgt/mgt_vcc.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_vcl.c b/bin/varnishd/mgt/mgt_vcl.c index cc372d2b8..c15d3879d 100644 --- a/bin/varnishd/mgt/mgt_vcl.c +++ b/bin/varnishd/mgt/mgt_vcl.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/mgt/mgt_vcl.h b/bin/varnishd/mgt/mgt_vcl.h index 7f55c5a45..6f3b7d4bf 100644 --- a/bin/varnishd/mgt/mgt_vcl.h +++ b/bin/varnishd/mgt/mgt_vcl.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/proxy/cache_proxy.h b/bin/varnishd/proxy/cache_proxy.h index 97c11deaf..6fdfe6078 100644 --- a/bin/varnishd/proxy/cache_proxy.h +++ b/bin/varnishd/proxy/cache_proxy.h @@ -4,6 +4,8 @@ * * Author: Emmanuel Hocdet * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/proxy/cache_proxy_proto.c b/bin/varnishd/proxy/cache_proxy_proto.c index fb24fafdc..7efe6cc2f 100644 --- a/bin/varnishd/proxy/cache_proxy_proto.c +++ b/bin/varnishd/proxy/cache_proxy_proto.c @@ -6,6 +6,8 @@ * Authors: Poul-Henning Kamp * Emmanuel Hocdet * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/storage/mgt_stevedore.c b/bin/varnishd/storage/mgt_stevedore.c index 7e16dbc8a..24cc27fdb 100644 --- a/bin/varnishd/storage/mgt_stevedore.c +++ b/bin/varnishd/storage/mgt_stevedore.c @@ -4,6 +4,8 @@ * * Author: Dag-Erling Sm?rgav * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/storage/mgt_storage_persistent.c b/bin/varnishd/storage/mgt_storage_persistent.c index 40d5d7233..372dfb953 100644 --- a/bin/varnishd/storage/mgt_storage_persistent.c +++ b/bin/varnishd/storage/mgt_storage_persistent.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/storage/stevedore.c b/bin/varnishd/storage/stevedore.c index 0f33bd656..93d3f78d4 100644 --- a/bin/varnishd/storage/stevedore.c +++ b/bin/varnishd/storage/stevedore.c @@ -4,6 +4,8 @@ * * Author: Dag-Erling Sm?rgav * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/storage/stevedore_utils.c b/bin/varnishd/storage/stevedore_utils.c index 99207e469..e46b5485e 100644 --- a/bin/varnishd/storage/stevedore_utils.c +++ b/bin/varnishd/storage/stevedore_utils.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/storage/storage.h b/bin/varnishd/storage/storage.h index 0db48e3de..32bd1a2fa 100644 --- a/bin/varnishd/storage/storage.h +++ b/bin/varnishd/storage/storage.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/storage/storage_file.c b/bin/varnishd/storage/storage_file.c index 7e0c0a2ae..52422e3bc 100644 --- a/bin/varnishd/storage/storage_file.c +++ b/bin/varnishd/storage/storage_file.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/storage/storage_lru.c b/bin/varnishd/storage/storage_lru.c index 381612bb8..e14782e56 100644 --- a/bin/varnishd/storage/storage_lru.c +++ b/bin/varnishd/storage/storage_lru.c @@ -4,6 +4,8 @@ * * Author: Dag-Erling Sm?rgav * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/storage/storage_malloc.c b/bin/varnishd/storage/storage_malloc.c index b8a168af8..b04f7bf64 100644 --- a/bin/varnishd/storage/storage_malloc.c +++ b/bin/varnishd/storage/storage_malloc.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/storage/storage_persistent.c b/bin/varnishd/storage/storage_persistent.c index 3125c8d35..dc494c5f5 100644 --- a/bin/varnishd/storage/storage_persistent.c +++ b/bin/varnishd/storage/storage_persistent.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/storage/storage_persistent.h b/bin/varnishd/storage/storage_persistent.h index 48fe8c0c5..0f8aafbed 100644 --- a/bin/varnishd/storage/storage_persistent.h +++ b/bin/varnishd/storage/storage_persistent.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/storage/storage_persistent_silo.c b/bin/varnishd/storage/storage_persistent_silo.c index aa3831582..95d3864d0 100644 --- a/bin/varnishd/storage/storage_persistent_silo.c +++ b/bin/varnishd/storage/storage_persistent_silo.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/storage/storage_persistent_subr.c b/bin/varnishd/storage/storage_persistent_subr.c index 32144f374..8a1ba8808 100644 --- a/bin/varnishd/storage/storage_persistent_subr.c +++ b/bin/varnishd/storage/storage_persistent_subr.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/storage/storage_simple.c b/bin/varnishd/storage/storage_simple.c index 962756cdd..231a50d6b 100644 --- a/bin/varnishd/storage/storage_simple.c +++ b/bin/varnishd/storage/storage_simple.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/storage/storage_simple.h b/bin/varnishd/storage/storage_simple.h index 6985cdd8c..4e63efb9d 100644 --- a/bin/varnishd/storage/storage_simple.h +++ b/bin/varnishd/storage/storage_simple.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/storage/storage_umem.c b/bin/varnishd/storage/storage_umem.c index dc53a1d60..db45305f6 100644 --- a/bin/varnishd/storage/storage_umem.c +++ b/bin/varnishd/storage/storage_umem.c @@ -7,6 +7,8 @@ * Authors: Poul-Henning Kamp * Nils Goroll * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/waiter/cache_waiter.c b/bin/varnishd/waiter/cache_waiter.c index 80a0deb9f..79de2cdef 100644 --- a/bin/varnishd/waiter/cache_waiter.c +++ b/bin/varnishd/waiter/cache_waiter.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/waiter/cache_waiter_epoll.c b/bin/varnishd/waiter/cache_waiter_epoll.c index f7dcc7c3f..53fa4be3b 100644 --- a/bin/varnishd/waiter/cache_waiter_epoll.c +++ b/bin/varnishd/waiter/cache_waiter_epoll.c @@ -5,6 +5,8 @@ * * Author: Rogerio Carvalho Schneider * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/waiter/cache_waiter_kqueue.c b/bin/varnishd/waiter/cache_waiter_kqueue.c index 8a50c260c..33429b19b 100644 --- a/bin/varnishd/waiter/cache_waiter_kqueue.c +++ b/bin/varnishd/waiter/cache_waiter_kqueue.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/waiter/cache_waiter_poll.c b/bin/varnishd/waiter/cache_waiter_poll.c index 57f7bbcd2..ea77af96c 100644 --- a/bin/varnishd/waiter/cache_waiter_poll.c +++ b/bin/varnishd/waiter/cache_waiter_poll.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/waiter/cache_waiter_ports.c b/bin/varnishd/waiter/cache_waiter_ports.c index dc5e82805..4120586f9 100644 --- a/bin/varnishd/waiter/cache_waiter_ports.c +++ b/bin/varnishd/waiter/cache_waiter_ports.c @@ -6,6 +6,8 @@ * Copyright (c) 2010-2016 UPLEX, Nils Goroll * All rights reserved. * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/waiter/mgt_waiter.c b/bin/varnishd/waiter/mgt_waiter.c index 1ea8320f2..4dab32a10 100644 --- a/bin/varnishd/waiter/mgt_waiter.c +++ b/bin/varnishd/waiter/mgt_waiter.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/waiter/mgt_waiter.h b/bin/varnishd/waiter/mgt_waiter.h index d8f622247..5b93f8eab 100644 --- a/bin/varnishd/waiter/mgt_waiter.h +++ b/bin/varnishd/waiter/mgt_waiter.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/waiter/waiter.h b/bin/varnishd/waiter/waiter.h index cbdf6a6d6..912f76669 100644 --- a/bin/varnishd/waiter/waiter.h +++ b/bin/varnishd/waiter/waiter.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishd/waiter/waiter_priv.h b/bin/varnishd/waiter/waiter_priv.h index 8ef498613..ce8f93b4e 100644 --- a/bin/varnishd/waiter/waiter_priv.h +++ b/bin/varnishd/waiter/waiter_priv.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishhist/varnishhist.c b/bin/varnishhist/varnishhist.c index 8f5dd795d..4f19de3f0 100644 --- a/bin/varnishhist/varnishhist.c +++ b/bin/varnishhist/varnishhist.c @@ -7,6 +7,8 @@ * Author: Dag-Erling Sm?rgrav * Author: Guillaume Quintard * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishhist/varnishhist_options.h b/bin/varnishhist/varnishhist_options.h index 44d710da4..28d2fc4c7 100644 --- a/bin/varnishhist/varnishhist_options.h +++ b/bin/varnishhist/varnishhist_options.h @@ -4,6 +4,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishhist/varnishhist_profiles.h b/bin/varnishhist/varnishhist_profiles.h index a7295b670..6619f06d1 100644 --- a/bin/varnishhist/varnishhist_profiles.h +++ b/bin/varnishhist/varnishhist_profiles.h @@ -4,6 +4,8 @@ * * Author: Nils Goroll * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishlog/varnishlog.c b/bin/varnishlog/varnishlog.c index 003528b46..d9c5170f3 100644 --- a/bin/varnishlog/varnishlog.c +++ b/bin/varnishlog/varnishlog.c @@ -6,6 +6,8 @@ * Author: Poul-Henning Kamp * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishlog/varnishlog_options.h b/bin/varnishlog/varnishlog_options.h index 8c9fd1db7..85394c204 100644 --- a/bin/varnishlog/varnishlog_options.h +++ b/bin/varnishlog/varnishlog_options.h @@ -5,6 +5,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishncsa/b64.h b/bin/varnishncsa/b64.h index 526ae1986..6b0aab35b 100644 --- a/bin/varnishncsa/b64.h +++ b/bin/varnishncsa/b64.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c index 0dc640237..657d4a5fc 100644 --- a/bin/varnishncsa/varnishncsa.c +++ b/bin/varnishncsa/varnishncsa.c @@ -8,6 +8,8 @@ * Author: Tollef Fog Heen * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishncsa/varnishncsa_options.h b/bin/varnishncsa/varnishncsa_options.h index 896b33da0..fb9ab474d 100644 --- a/bin/varnishncsa/varnishncsa_options.h +++ b/bin/varnishncsa/varnishncsa_options.h @@ -4,6 +4,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishstat/varnishstat.c b/bin/varnishstat/varnishstat.c index 6906499e5..6247f5035 100644 --- a/bin/varnishstat/varnishstat.c +++ b/bin/varnishstat/varnishstat.c @@ -6,6 +6,8 @@ * Author: Poul-Henning Kamp * Author: Dag-Erling Sm?rgrav * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishstat/varnishstat.h b/bin/varnishstat/varnishstat.h index 00099ea02..4b0377864 100644 --- a/bin/varnishstat/varnishstat.h +++ b/bin/varnishstat/varnishstat.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishstat/varnishstat_bindings.h b/bin/varnishstat/varnishstat_bindings.h index f90ade1fa..7d8cbc2ba 100644 --- a/bin/varnishstat/varnishstat_bindings.h +++ b/bin/varnishstat/varnishstat_bindings.h @@ -4,6 +4,8 @@ * * Author: Dridi Boukelmoune * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishstat/varnishstat_curses.c b/bin/varnishstat/varnishstat_curses.c index 5ca5e279e..f61612fb6 100644 --- a/bin/varnishstat/varnishstat_curses.c +++ b/bin/varnishstat/varnishstat_curses.c @@ -7,6 +7,8 @@ * Author: Dag-Erling Sm?rgrav * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishstat/varnishstat_options.h b/bin/varnishstat/varnishstat_options.h index a1ea33b2d..73cba2a99 100644 --- a/bin/varnishstat/varnishstat_options.h +++ b/bin/varnishstat/varnishstat_options.h @@ -4,6 +4,8 @@ * * Author: Federico G. Schwindt * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/cmds.h b/bin/varnishtest/cmds.h index 8eb2fa4f1..17a64408c 100644 --- a/bin/varnishtest/cmds.h +++ b/bin/varnishtest/cmds.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/gensequences b/bin/varnishtest/gensequences index 18a68b43b..59f137977 100644 --- a/bin/varnishtest/gensequences +++ b/bin/varnishtest/gensequences @@ -4,6 +4,8 @@ # Copyright (c) 2008-2009 Ed Schouten # All rights reserved. # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/bin/varnishtest/hpack.h b/bin/varnishtest/hpack.h index b1ad007bb..c9d55977b 100644 --- a/bin/varnishtest/hpack.h +++ b/bin/varnishtest/hpack.h @@ -4,6 +4,8 @@ * * Author: Guillaume Quintard * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/programs.h b/bin/varnishtest/programs.h index f8875ce31..05c4f136d 100644 --- a/bin/varnishtest/programs.h +++ b/bin/varnishtest/programs.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/sequences b/bin/varnishtest/sequences index 50f589626..cf49a4961 100644 --- a/bin/varnishtest/sequences +++ b/bin/varnishtest/sequences @@ -2,6 +2,8 @@ # Copyright (c) 2008-2009 Ed Schouten # All rights reserved. # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/bin/varnishtest/teken.3 b/bin/varnishtest/teken.3 index c1ece8554..840a17cec 100644 --- a/bin/varnishtest/teken.3 +++ b/bin/varnishtest/teken.3 @@ -1,6 +1,8 @@ .\" Copyright (c) 2011 Ed Schouten .\" All rights reserved. .\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: diff --git a/bin/varnishtest/vmods.h b/bin/varnishtest/vmods.h index 06ab9b80c..2af7644d9 100644 --- a/bin/varnishtest/vmods.h +++ b/bin/varnishtest/vmods.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc.c b/bin/varnishtest/vtc.c index be6c85aa1..88c0eba11 100644 --- a/bin/varnishtest/vtc.c +++ b/bin/varnishtest/vtc.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc.h b/bin/varnishtest/vtc.h index ab218abce..2300288d4 100644 --- a/bin/varnishtest/vtc.h +++ b/bin/varnishtest/vtc.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_barrier.c b/bin/varnishtest/vtc_barrier.c index 99ed617d5..3b04026fc 100644 --- a/bin/varnishtest/vtc_barrier.c +++ b/bin/varnishtest/vtc_barrier.c @@ -4,6 +4,8 @@ * * Author: Dridi Boukelmoune * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_client.c b/bin/varnishtest/vtc_client.c index 639e80a6d..c0a532e47 100644 --- a/bin/varnishtest/vtc_client.c +++ b/bin/varnishtest/vtc_client.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_gzip.c b/bin/varnishtest/vtc_gzip.c index ab42c68c6..2f9043a9c 100644 --- a/bin/varnishtest/vtc_gzip.c +++ b/bin/varnishtest/vtc_gzip.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_h2_hpack.c b/bin/varnishtest/vtc_h2_hpack.c index e16361c9f..64b5d0360 100644 --- a/bin/varnishtest/vtc_h2_hpack.c +++ b/bin/varnishtest/vtc_h2_hpack.c @@ -4,6 +4,8 @@ * * Author: Guillaume Quintard * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_h2_priv.h b/bin/varnishtest/vtc_h2_priv.h index 5c646d3ed..683d020b3 100644 --- a/bin/varnishtest/vtc_h2_priv.h +++ b/bin/varnishtest/vtc_h2_priv.h @@ -4,6 +4,8 @@ * * Author: Guillaume Quintard * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_h2_tbl.c b/bin/varnishtest/vtc_h2_tbl.c index 0aaa35289..5a5234254 100644 --- a/bin/varnishtest/vtc_h2_tbl.c +++ b/bin/varnishtest/vtc_h2_tbl.c @@ -4,6 +4,8 @@ * * Author: Guillaume Quintard * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_haproxy.c b/bin/varnishtest/vtc_haproxy.c index 72e9d3438..80fb8b827 100644 --- a/bin/varnishtest/vtc_haproxy.c +++ b/bin/varnishtest/vtc_haproxy.c @@ -4,6 +4,8 @@ * * Author: Fr?d?ric L?caille * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c index b062773e2..382a55c5a 100644 --- a/bin/varnishtest/vtc_http.c +++ b/bin/varnishtest/vtc_http.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_http.h b/bin/varnishtest/vtc_http.h index 0e6337839..d1690a4a3 100644 --- a/bin/varnishtest/vtc_http.h +++ b/bin/varnishtest/vtc_http.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_http2.c b/bin/varnishtest/vtc_http2.c index 9d9a4e5f6..ab78ed162 100644 --- a/bin/varnishtest/vtc_http2.c +++ b/bin/varnishtest/vtc_http2.c @@ -4,6 +4,8 @@ * * Author: Guillaume Quintard * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_log.c b/bin/varnishtest/vtc_log.c index be67a5d9c..645a5f11a 100644 --- a/bin/varnishtest/vtc_log.c +++ b/bin/varnishtest/vtc_log.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_logexp.c b/bin/varnishtest/vtc_logexp.c index 31a9cb450..4719ad034 100644 --- a/bin/varnishtest/vtc_logexp.c +++ b/bin/varnishtest/vtc_logexp.c @@ -4,6 +4,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c index 46335e6e2..b0cc128b2 100644 --- a/bin/varnishtest/vtc_main.c +++ b/bin/varnishtest/vtc_main.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_misc.c b/bin/varnishtest/vtc_misc.c index 1bd6b88a8..dd0cd2e6f 100644 --- a/bin/varnishtest/vtc_misc.c +++ b/bin/varnishtest/vtc_misc.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_process.c b/bin/varnishtest/vtc_process.c index 39911afaa..99c68cc0c 100644 --- a/bin/varnishtest/vtc_process.c +++ b/bin/varnishtest/vtc_process.c @@ -4,6 +4,8 @@ * * Author: Dridi Boukelmoune * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_proxy.c b/bin/varnishtest/vtc_proxy.c index ffa322e85..7a3fd7ac7 100644 --- a/bin/varnishtest/vtc_proxy.c +++ b/bin/varnishtest/vtc_proxy.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_server.c b/bin/varnishtest/vtc_server.c index 3ff49705e..9ed58d923 100644 --- a/bin/varnishtest/vtc_server.c +++ b/bin/varnishtest/vtc_server.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_subr.c b/bin/varnishtest/vtc_subr.c index 3cf36d586..1d549ab60 100644 --- a/bin/varnishtest/vtc_subr.c +++ b/bin/varnishtest/vtc_subr.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_syslog.c b/bin/varnishtest/vtc_syslog.c index d4f7dbc15..c388ac8e6 100644 --- a/bin/varnishtest/vtc_syslog.c +++ b/bin/varnishtest/vtc_syslog.c @@ -4,6 +4,8 @@ * * Author: Fr?d?ric L?caille * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c index bbc80899c..1ec748cb6 100644 --- a/bin/varnishtest/vtc_varnish.c +++ b/bin/varnishtest/vtc_varnish.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtop/varnishtop.c b/bin/varnishtop/varnishtop.c index 070b71bd7..de64c7519 100644 --- a/bin/varnishtop/varnishtop.c +++ b/bin/varnishtop/varnishtop.c @@ -7,6 +7,8 @@ * Author: Dag-Erling Sm?rgrav * Author: Guillaume Quintard * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/bin/varnishtop/varnishtop_options.h b/bin/varnishtop/varnishtop_options.h index 2a6c312e7..7070a4618 100644 --- a/bin/varnishtop/varnishtop_options.h +++ b/bin/varnishtop/varnishtop_options.h @@ -4,6 +4,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/doc/sphinx/vtc-syntax.py b/doc/sphinx/vtc-syntax.py index 42205797c..03451ce51 100644 --- a/doc/sphinx/vtc-syntax.py +++ b/doc/sphinx/vtc-syntax.py @@ -5,6 +5,8 @@ # # Author: Guillaume Quintard # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/etc/devicedetect.vcl b/etc/devicedetect.vcl index cabc16a45..006cc6843 100644 --- a/etc/devicedetect.vcl +++ b/etc/devicedetect.vcl @@ -2,6 +2,8 @@ # Copyright (c) 2016-2018 Varnish Cache project # Copyright (c) 2012-2016 Varnish Software AS # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/include/binary_heap.h b/include/binary_heap.h index 7cef493dd..da2b27133 100644 --- a/include/binary_heap.h +++ b/include/binary_heap.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/compat/daemon.h b/include/compat/daemon.h index 3f987f675..6f335e992 100644 --- a/include/compat/daemon.h +++ b/include/compat/daemon.h @@ -5,6 +5,8 @@ * * Author: Dag-Erling Sm?rgrav * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/generate.py b/include/generate.py index 6d1377661..20bdd8130 100755 --- a/include/generate.py +++ b/include/generate.py @@ -6,6 +6,8 @@ # # Author: Poul-Henning Kamp # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/include/libvcc.h b/include/libvcc.h index 10ed6f04d..3bf2d1ea1 100644 --- a/include/libvcc.h +++ b/include/libvcc.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/acct_fields_bereq.h b/include/tbl/acct_fields_bereq.h index b1063257c..15b307e34 100644 --- a/include/tbl/acct_fields_bereq.h +++ b/include/tbl/acct_fields_bereq.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/acct_fields_req.h b/include/tbl/acct_fields_req.h index 3921ab2e4..1b8a0b0c9 100644 --- a/include/tbl/acct_fields_req.h +++ b/include/tbl/acct_fields_req.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/backend_poll.h b/include/tbl/backend_poll.h index 5c1e2078f..1d1cdbadf 100644 --- a/include/tbl/backend_poll.h +++ b/include/tbl/backend_poll.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/ban_arg_oper.h b/include/tbl/ban_arg_oper.h index df372c2aa..d139e08a6 100644 --- a/include/tbl/ban_arg_oper.h +++ b/include/tbl/ban_arg_oper.h @@ -4,6 +4,8 @@ * * Author: Nils Goroll * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, diff --git a/include/tbl/ban_oper.h b/include/tbl/ban_oper.h index 06430c1f3..cd4103e61 100644 --- a/include/tbl/ban_oper.h +++ b/include/tbl/ban_oper.h @@ -4,6 +4,8 @@ * * Author: Nils Goroll * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, diff --git a/include/tbl/ban_vars.h b/include/tbl/ban_vars.h index db7ff2ef7..015cef817 100644 --- a/include/tbl/ban_vars.h +++ b/include/tbl/ban_vars.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/bo_flags.h b/include/tbl/bo_flags.h index 88b8eebe3..91293f5d6 100644 --- a/include/tbl/bo_flags.h +++ b/include/tbl/bo_flags.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/boc_state.h b/include/tbl/boc_state.h index a5c4a61ff..44984de81 100644 --- a/include/tbl/boc_state.h +++ b/include/tbl/boc_state.h @@ -4,6 +4,8 @@ * * Author: Federico G. Schwindt * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/body_status.h b/include/tbl/body_status.h index c1718318b..4ab48f1a3 100644 --- a/include/tbl/body_status.h +++ b/include/tbl/body_status.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/cli_cmds.h b/include/tbl/cli_cmds.h index 7ad0817d8..41c0569a1 100644 --- a/include/tbl/cli_cmds.h +++ b/include/tbl/cli_cmds.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/debug_bits.h b/include/tbl/debug_bits.h index f76eb76ec..6002cecd9 100644 --- a/include/tbl/debug_bits.h +++ b/include/tbl/debug_bits.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/feature_bits.h b/include/tbl/feature_bits.h index 23f1b01f8..042240f3c 100644 --- a/include/tbl/feature_bits.h +++ b/include/tbl/feature_bits.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/h2_error.h b/include/tbl/h2_error.h index 02044db6f..88b2337e7 100644 --- a/include/tbl/h2_error.h +++ b/include/tbl/h2_error.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/h2_frames.h b/include/tbl/h2_frames.h index 825908217..805613b19 100644 --- a/include/tbl/h2_frames.h +++ b/include/tbl/h2_frames.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/h2_settings.h b/include/tbl/h2_settings.h index c382e862d..6c4520711 100644 --- a/include/tbl/h2_settings.h +++ b/include/tbl/h2_settings.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/h2_stream.h b/include/tbl/h2_stream.h index 21f6b3de2..171fec968 100644 --- a/include/tbl/h2_stream.h +++ b/include/tbl/h2_stream.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/htc.h b/include/tbl/htc.h index 4e9695491..911e2bfca 100644 --- a/include/tbl/htc.h +++ b/include/tbl/htc.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/http_headers.h b/include/tbl/http_headers.h index 44e7d0656..5ce6b673a 100644 --- a/include/tbl/http_headers.h +++ b/include/tbl/http_headers.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/http_response.h b/include/tbl/http_response.h index 0e21d00d6..8f2314639 100644 --- a/include/tbl/http_response.h +++ b/include/tbl/http_response.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/locks.h b/include/tbl/locks.h index cf2a6ed06..c3852dad8 100644 --- a/include/tbl/locks.h +++ b/include/tbl/locks.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/obj_attr.h b/include/tbl/obj_attr.h index a695c1efa..65c3ac0cc 100644 --- a/include/tbl/obj_attr.h +++ b/include/tbl/obj_attr.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/oc_exp_flags.h b/include/tbl/oc_exp_flags.h index 83160b064..926ab5d8e 100644 --- a/include/tbl/oc_exp_flags.h +++ b/include/tbl/oc_exp_flags.h @@ -4,6 +4,8 @@ * * Author: Federico G. Schwindt * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/oc_flags.h b/include/tbl/oc_flags.h index 84fd86f80..6bde9d19e 100644 --- a/include/tbl/oc_flags.h +++ b/include/tbl/oc_flags.h @@ -4,6 +4,8 @@ * * Author: Federico G. Schwindt * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/params.h b/include/tbl/params.h index ccb416eb0..a37f60bcb 100644 --- a/include/tbl/params.h +++ b/include/tbl/params.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/req_body.h b/include/tbl/req_body.h index 5b4716a13..9effc0707 100644 --- a/include/tbl/req_body.h +++ b/include/tbl/req_body.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/req_flags.h b/include/tbl/req_flags.h index 2c0dbe803..2e826601c 100644 --- a/include/tbl/req_flags.h +++ b/include/tbl/req_flags.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/sess_attr.h b/include/tbl/sess_attr.h index 7702e463a..5c0122a80 100644 --- a/include/tbl/sess_attr.h +++ b/include/tbl/sess_attr.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/sess_close.h b/include/tbl/sess_close.h index c20e71ca6..61d8f3b99 100644 --- a/include/tbl/sess_close.h +++ b/include/tbl/sess_close.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/steps.h b/include/tbl/steps.h index 12deb9cd7..7fa119557 100644 --- a/include/tbl/steps.h +++ b/include/tbl/steps.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/symbol_kind.h b/include/tbl/symbol_kind.h index 8c0294373..40dfbfdd8 100644 --- a/include/tbl/symbol_kind.h +++ b/include/tbl/symbol_kind.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/vhd_fsm.h b/include/tbl/vhd_fsm.h index 4d0e66075..ec7258706 100644 --- a/include/tbl/vhd_fsm.h +++ b/include/tbl/vhd_fsm.h @@ -4,6 +4,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/vhd_fsm_funcs.h b/include/tbl/vhd_fsm_funcs.h index f8bb45928..e3f80f462 100644 --- a/include/tbl/vhd_fsm_funcs.h +++ b/include/tbl/vhd_fsm_funcs.h @@ -4,6 +4,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/vhd_return.h b/include/tbl/vhd_return.h index 66547d4b7..aab5212fd 100644 --- a/include/tbl/vhd_return.h +++ b/include/tbl/vhd_return.h @@ -4,6 +4,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/vsc_levels.h b/include/tbl/vsc_levels.h index f85dd2a70..c043bc5b8 100644 --- a/include/tbl/vsc_levels.h +++ b/include/tbl/vsc_levels.h @@ -5,6 +5,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/vsig_list.h b/include/tbl/vsig_list.h index f7a05d60c..e9a8c08a0 100644 --- a/include/tbl/vsig_list.h +++ b/include/tbl/vsig_list.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/vsl_tags.h b/include/tbl/vsl_tags.h index cf3a20e2c..ad51c1e04 100644 --- a/include/tbl/vsl_tags.h +++ b/include/tbl/vsl_tags.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/vsl_tags_http.h b/include/tbl/vsl_tags_http.h index 249e35c98..7a0198da6 100644 --- a/include/tbl/vsl_tags_http.h +++ b/include/tbl/vsl_tags_http.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/tbl/waiters.h b/include/tbl/waiters.h index f2fcf6446..cee56bdf4 100644 --- a/include/tbl/waiters.h +++ b/include/tbl/waiters.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vapi/vapi_options.h b/include/vapi/vapi_options.h index a357abd28..419a71302 100644 --- a/include/vapi/vapi_options.h +++ b/include/vapi/vapi_options.h @@ -5,6 +5,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vapi/voptget.h b/include/vapi/voptget.h index 51de7c683..902599e03 100644 --- a/include/vapi/voptget.h +++ b/include/vapi/voptget.h @@ -5,6 +5,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vapi/vsc.h b/include/vapi/vsc.h index 6976c857b..b2ba993e9 100644 --- a/include/vapi/vsc.h +++ b/include/vapi/vsc.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vapi/vsig.h b/include/vapi/vsig.h index 1556ae779..810b37dce 100644 --- a/include/vapi/vsig.h +++ b/include/vapi/vsig.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vapi/vsl.h b/include/vapi/vsl.h index 8a8872acb..7d75ef772 100644 --- a/include/vapi/vsl.h +++ b/include/vapi/vsl.h @@ -6,6 +6,8 @@ * Author: Poul-Henning Kamp * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vapi/vsl_int.h b/include/vapi/vsl_int.h index 589a96637..d4b9fe54e 100644 --- a/include/vapi/vsl_int.h +++ b/include/vapi/vsl_int.h @@ -6,6 +6,8 @@ * Author: Poul-Henning Kamp * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vapi/vsm.h b/include/vapi/vsm.h index a852e4c77..81a613d3d 100644 --- a/include/vapi/vsm.h +++ b/include/vapi/vsm.h @@ -6,6 +6,8 @@ * Author: Poul-Henning Kamp * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vas.h b/include/vas.h index bd51d9211..a73b6d927 100644 --- a/include/vas.h +++ b/include/vas.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vav.h b/include/vav.h index a3861cf40..c94cee902 100644 --- a/include/vav.h +++ b/include/vav.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vbm.h b/include/vbm.h index 9dcc3d0fb..4f0486cf1 100644 --- a/include/vbm.h +++ b/include/vbm.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vbm_test.c b/include/vbm_test.c index f68059720..bf55a6a30 100644 --- a/include/vbm_test.c +++ b/include/vbm_test.c @@ -4,6 +4,8 @@ * * Author: Nils Goroll * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vcc_interface.h b/include/vcc_interface.h index 37cc04aac..9d9f46d6d 100644 --- a/include/vcc_interface.h +++ b/include/vcc_interface.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vcli.h b/include/vcli.h index f147ef07b..51e1e55f7 100644 --- a/include/vcli.h +++ b/include/vcli.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vcli_serve.h b/include/vcli_serve.h index 71beae3a1..f3757f28b 100644 --- a/include/vcli_serve.h +++ b/include/vcli_serve.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vcs.h b/include/vcs.h index 8e605eb97..489316299 100644 --- a/include/vcs.h +++ b/include/vcs.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vct.h b/include/vct.h index 40425296a..34aca2536 100644 --- a/include/vct.h +++ b/include/vct.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vcurses.h b/include/vcurses.h index 911cf969c..1bd756661 100644 --- a/include/vcurses.h +++ b/include/vcurses.h @@ -2,6 +2,8 @@ * Copyright (c) 2014 Varnish Software AS * All rights reserved. * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vdef.h b/include/vdef.h index 250ff2bfe..0a60716b0 100644 --- a/include/vdef.h +++ b/include/vdef.h @@ -9,6 +9,8 @@ * * Inspired by FreeBSD's * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vend.h b/include/vend.h index 7bd5aaa5a..8a701b86e 100644 --- a/include/vend.h +++ b/include/vend.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2003,2010 Poul-Henning Kamp * All rights reserved. * diff --git a/include/vev.h b/include/vev.h index edd90141a..197c14882 100644 --- a/include/vev.h +++ b/include/vev.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vfil.h b/include/vfil.h index 49369f57e..1f72c2305 100644 --- a/include/vfil.h +++ b/include/vfil.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vfl.h b/include/vfl.h index 6cf926526..99bc55b41 100644 --- a/include/vfl.h +++ b/include/vfl.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 2007 Dag-Erling Co?dan Sm?rgrav * All rights reserved. * diff --git a/include/vin.h b/include/vin.h index c594980c5..373dda0e1 100644 --- a/include/vin.h +++ b/include/vin.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vjsn.h b/include/vjsn.h index 5051a6cfa..274c23b12 100644 --- a/include/vjsn.h +++ b/include/vjsn.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vlu.h b/include/vlu.h index 8ce98dd3f..12d55a057 100644 --- a/include/vlu.h +++ b/include/vlu.h @@ -2,6 +2,8 @@ * Copyright (c) 2005-2008 Poul-Henning Kamp * All rights reserved. * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vmb.h b/include/vmb.h index 9c148fbf7..9aaa7e949 100644 --- a/include/vmb.h +++ b/include/vmb.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vnum.h b/include/vnum.h index 53da2a8e3..93f797e72 100644 --- a/include/vnum.h +++ b/include/vnum.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vpf.h b/include/vpf.h index 51afaf36f..68e256baa 100644 --- a/include/vpf.h +++ b/include/vpf.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 2005 Pawel Jakub Dawidek * All rights reserved. * diff --git a/include/vqueue.h b/include/vqueue.h index 3bbb7a170..58dcb41ce 100644 --- a/include/vqueue.h +++ b/include/vqueue.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * diff --git a/include/vre.h b/include/vre.h index 8062a3a01..b139c8a06 100644 --- a/include/vre.h +++ b/include/vre.h @@ -4,6 +4,8 @@ * * Author: Tollef Fog Heen * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vrnd.h b/include/vrnd.h index a828af86b..248fc6eac 100644 --- a/include/vrnd.h +++ b/include/vrnd.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vrt.h b/include/vrt.h index 979d5b3d9..8d06bb7b5 100644 --- a/include/vrt.h +++ b/include/vrt.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vsa.h b/include/vsa.h index 2e4f0da91..e44544d55 100644 --- a/include/vsa.h +++ b/include/vsa.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vsb.h b/include/vsb.h index 47d66ac2e..806719b70 100644 --- a/include/vsb.h +++ b/include/vsb.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2000-2011 Poul-Henning Kamp * Copyright (c) 2000-2008 Dag-Erling Co?dan Sm?rgrav * All rights reserved. diff --git a/include/vsc_priv.h b/include/vsc_priv.h index 88f55dd3d..110e618d2 100644 --- a/include/vsc_priv.h +++ b/include/vsc_priv.h @@ -5,6 +5,8 @@ * Author: Poul-Henning Kamp * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vsha256.h b/include/vsha256.h index 8f20505fc..546e8a2c9 100644 --- a/include/vsha256.h +++ b/include/vsha256.h @@ -2,6 +2,8 @@ * Copyright 2005 Colin Percival * All rights reserved. * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vsl_priv.h b/include/vsl_priv.h index 434550fd7..73e98ffdd 100644 --- a/include/vsl_priv.h +++ b/include/vsl_priv.h @@ -6,6 +6,8 @@ * Author: Poul-Henning Kamp * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vsm_priv.h b/include/vsm_priv.h index 9bb327109..f0751683e 100644 --- a/include/vsm_priv.h +++ b/include/vsm_priv.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vss.h b/include/vss.h index bf1fb2b6d..4695743b2 100644 --- a/include/vss.h +++ b/include/vss.h @@ -3,6 +3,8 @@ * Copyright (c) 2006-2009 Varnish Software AS * All rights reserved. * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vsub.h b/include/vsub.h index de62908ec..711185afb 100644 --- a/include/vsub.h +++ b/include/vsub.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vtcp.h b/include/vtcp.h index a5431aba6..05244f74b 100644 --- a/include/vtcp.h +++ b/include/vtcp.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vtim.h b/include/vtim.h index 3eab38d69..d69a6130d 100644 --- a/include/vtim.h +++ b/include/vtim.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vtree.h b/include/vtree.h index 4f53c7551..647917690 100644 --- a/include/vtree.h +++ b/include/vtree.h @@ -3,6 +3,8 @@ /* $FreeBSD: release/9.0.0/sys/sys/tree.h 189204 2009-03-01 04:57:23Z bms $ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright 2002 Niels Provos * All rights reserved. * diff --git a/include/vus.h b/include/vus.h index ddaf33199..ce4c53494 100644 --- a/include/vus.h +++ b/include/vus.h @@ -4,6 +4,8 @@ * * Author: Geoffrey Simmons * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vut.h b/include/vut.h index 8a35b0267..275a85ea4 100644 --- a/include/vut.h +++ b/include/vut.h @@ -5,6 +5,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/include/vut_options.h b/include/vut_options.h index 7aacaaaec..ad9e59a71 100644 --- a/include/vut_options.h +++ b/include/vut_options.h @@ -5,6 +5,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/binary_heap.c b/lib/libvarnish/binary_heap.c index fee40c93c..0079efe1d 100644 --- a/lib/libvarnish/binary_heap.c +++ b/lib/libvarnish/binary_heap.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vas.c b/lib/libvarnish/vas.c index 3a9193268..13161bcea 100644 --- a/lib/libvarnish/vas.c +++ b/lib/libvarnish/vas.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vav.c b/lib/libvarnish/vav.c index f1bc3db10..12fb4d6f5 100644 --- a/lib/libvarnish/vav.c +++ b/lib/libvarnish/vav.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vcli_proto.c b/lib/libvarnish/vcli_proto.c index d914f0879..d7eef5d88 100644 --- a/lib/libvarnish/vcli_proto.c +++ b/lib/libvarnish/vcli_proto.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vcli_serve.c b/lib/libvarnish/vcli_serve.c index b97611978..2fc7dfe5b 100644 --- a/lib/libvarnish/vcli_serve.c +++ b/lib/libvarnish/vcli_serve.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vct.c b/lib/libvarnish/vct.c index 2bb540687..cbc6da20a 100644 --- a/lib/libvarnish/vct.c +++ b/lib/libvarnish/vct.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/version.c b/lib/libvarnish/version.c index db3398f22..d2e344f7e 100644 --- a/lib/libvarnish/version.c +++ b/lib/libvarnish/version.c @@ -5,6 +5,8 @@ * * Author: Dag-Erling Sm?rgrav * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vev.c b/lib/libvarnish/vev.c index dcace04f4..ac8fd4d4f 100644 --- a/lib/libvarnish/vev.c +++ b/lib/libvarnish/vev.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vfil.c b/lib/libvarnish/vfil.c index ad41c5644..0720e7f74 100644 --- a/lib/libvarnish/vfil.c +++ b/lib/libvarnish/vfil.c @@ -5,6 +5,8 @@ * * Author: Dag-Erling Sm?rgrav * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vin.c b/lib/libvarnish/vin.c index 053e9ed36..8f8d616dd 100644 --- a/lib/libvarnish/vin.c +++ b/lib/libvarnish/vin.c @@ -4,6 +4,8 @@ * * Author: Dag-Erling Sm?rgrav * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vjsn.c b/lib/libvarnish/vjsn.c index d9c1a1e53..2a52bd874 100644 --- a/lib/libvarnish/vjsn.c +++ b/lib/libvarnish/vjsn.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vlu.c b/lib/libvarnish/vlu.c index 7b4eb90db..3c32a87a0 100644 --- a/lib/libvarnish/vlu.c +++ b/lib/libvarnish/vlu.c @@ -2,6 +2,8 @@ * Copyright (c) 2005-2008 Poul-Henning Kamp * All rights reserved. * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vmb.c b/lib/libvarnish/vmb.c index af860240d..8105e0224 100644 --- a/lib/libvarnish/vmb.c +++ b/lib/libvarnish/vmb.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vnum.c b/lib/libvarnish/vnum.c index 7533158ac..4e0d004f0 100644 --- a/lib/libvarnish/vnum.c +++ b/lib/libvarnish/vnum.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vpf.c b/lib/libvarnish/vpf.c index ce406a0dc..ef6cf27cf 100644 --- a/lib/libvarnish/vpf.c +++ b/lib/libvarnish/vpf.c @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2005 Pawel Jakub Dawidek * All rights reserved. * diff --git a/lib/libvarnish/vre.c b/lib/libvarnish/vre.c index 42047aafe..7ef62da8d 100644 --- a/lib/libvarnish/vre.c +++ b/lib/libvarnish/vre.c @@ -4,6 +4,8 @@ * * Author: Tollef Fog Heen * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vrnd.c b/lib/libvarnish/vrnd.c index 13557b0e7..778c31fb2 100644 --- a/lib/libvarnish/vrnd.c +++ b/lib/libvarnish/vrnd.c @@ -6,6 +6,8 @@ * * Author: Dag-Erling Sm?rgrav * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vsa.c b/lib/libvarnish/vsa.c index 438126ccc..cd8dd4f72 100644 --- a/lib/libvarnish/vsa.c +++ b/lib/libvarnish/vsa.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vsb.c b/lib/libvarnish/vsb.c index 66fc7b1ed..0762c175e 100644 --- a/lib/libvarnish/vsb.c +++ b/lib/libvarnish/vsb.c @@ -3,6 +3,8 @@ * Copyright (c) 2000-2008 Dag-Erling Co?dan Sm?rgrav * All rights reserved. * + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vsha256.c b/lib/libvarnish/vsha256.c index 73efb0b2b..5f16fe342 100644 --- a/lib/libvarnish/vsha256.c +++ b/lib/libvarnish/vsha256.c @@ -2,6 +2,8 @@ * Copyright 2005 Colin Percival * All rights reserved. * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vss.c b/lib/libvarnish/vss.c index 10281eee6..24056c4da 100644 --- a/lib/libvarnish/vss.c +++ b/lib/libvarnish/vss.c @@ -6,6 +6,8 @@ * Author: Dag-Erling Sm?rgrav * Author: Cecilie Fritzvold * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vsub.c b/lib/libvarnish/vsub.c index 515169d82..eade83bac 100644 --- a/lib/libvarnish/vsub.c +++ b/lib/libvarnish/vsub.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vtcp.c b/lib/libvarnish/vtcp.c index 763db1ee6..bdd5d4e53 100644 --- a/lib/libvarnish/vtcp.c +++ b/lib/libvarnish/vtcp.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vte.c b/lib/libvarnish/vte.c index fa6be82be..119dd9880 100644 --- a/lib/libvarnish/vte.c +++ b/lib/libvarnish/vte.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vtim.c b/lib/libvarnish/vtim.c index ddc0201a6..5b91fc970 100644 --- a/lib/libvarnish/vtim.c +++ b/lib/libvarnish/vtim.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnish/vus.c b/lib/libvarnish/vus.c index 200679fc0..d36bb8784 100644 --- a/lib/libvarnish/vus.c +++ b/lib/libvarnish/vus.c @@ -4,6 +4,8 @@ * * Author: Geoffrey Simmons * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnishapi/daemon.c b/lib/libvarnishapi/daemon.c index 180f3370a..d7ca0026e 100644 --- a/lib/libvarnishapi/daemon.c +++ b/lib/libvarnishapi/daemon.c @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * diff --git a/lib/libvarnishapi/generate.py b/lib/libvarnishapi/generate.py index e411957d6..3924e4a13 100755 --- a/lib/libvarnishapi/generate.py +++ b/lib/libvarnishapi/generate.py @@ -7,6 +7,8 @@ # Author: Poul-Henning Kamp # Author: Martin Blix Grydeland # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/lib/libvarnishapi/libvarnishapi.map b/lib/libvarnishapi/libvarnishapi.map index 17f982ddd..4c0acb133 100644 --- a/lib/libvarnishapi/libvarnishapi.map +++ b/lib/libvarnishapi/libvarnishapi.map @@ -4,6 +4,8 @@ * * Author: Tollef Fog Heen * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnishapi/vsc.c b/lib/libvarnishapi/vsc.c index a59a861c8..6846e19f3 100644 --- a/lib/libvarnishapi/vsc.c +++ b/lib/libvarnishapi/vsc.c @@ -6,6 +6,8 @@ * Author: Poul-Henning Kamp * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnishapi/vsig.c b/lib/libvarnishapi/vsig.c index 924973e3c..2237eeec6 100644 --- a/lib/libvarnishapi/vsig.c +++ b/lib/libvarnishapi/vsig.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnishapi/vsl.c b/lib/libvarnishapi/vsl.c index 2c3c160fd..761cc4402 100644 --- a/lib/libvarnishapi/vsl.c +++ b/lib/libvarnishapi/vsl.c @@ -6,6 +6,8 @@ * Author: Poul-Henning Kamp * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnishapi/vsl2rst.c b/lib/libvarnishapi/vsl2rst.c index ea9866e71..947edd4e6 100644 --- a/lib/libvarnishapi/vsl2rst.c +++ b/lib/libvarnishapi/vsl2rst.c @@ -4,6 +4,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnishapi/vsl_api.h b/lib/libvarnishapi/vsl_api.h index 8817aa8fe..600ee994f 100644 --- a/lib/libvarnishapi/vsl_api.h +++ b/lib/libvarnishapi/vsl_api.h @@ -6,6 +6,8 @@ * Author: Poul-Henning Kamp * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnishapi/vsl_arg.c b/lib/libvarnishapi/vsl_arg.c index c72d5a1a9..25e811424 100644 --- a/lib/libvarnishapi/vsl_arg.c +++ b/lib/libvarnishapi/vsl_arg.c @@ -6,6 +6,8 @@ * Author: Poul-Henning Kamp * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnishapi/vsl_cursor.c b/lib/libvarnishapi/vsl_cursor.c index c9505d484..aa77fdc1c 100644 --- a/lib/libvarnishapi/vsl_cursor.c +++ b/lib/libvarnishapi/vsl_cursor.c @@ -6,6 +6,8 @@ * Author: Poul-Henning Kamp * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnishapi/vsl_dispatch.c b/lib/libvarnishapi/vsl_dispatch.c index e563ef751..8ce001409 100644 --- a/lib/libvarnishapi/vsl_dispatch.c +++ b/lib/libvarnishapi/vsl_dispatch.c @@ -5,6 +5,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnishapi/vsl_glob_test.c b/lib/libvarnishapi/vsl_glob_test.c index bf09d0be4..84814647f 100644 --- a/lib/libvarnishapi/vsl_glob_test.c +++ b/lib/libvarnishapi/vsl_glob_test.c @@ -4,6 +4,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnishapi/vsl_query.c b/lib/libvarnishapi/vsl_query.c index 227591190..eb08bf18a 100644 --- a/lib/libvarnishapi/vsl_query.c +++ b/lib/libvarnishapi/vsl_query.c @@ -5,6 +5,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnishapi/vsm.c b/lib/libvarnishapi/vsm.c index 423211e56..4bc283ad2 100644 --- a/lib/libvarnishapi/vsm.c +++ b/lib/libvarnishapi/vsm.c @@ -6,6 +6,8 @@ * Author: Poul-Henning Kamp * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnishapi/vut.c b/lib/libvarnishapi/vut.c index 5c9d6a509..165c2e34d 100644 --- a/lib/libvarnishapi/vut.c +++ b/lib/libvarnishapi/vut.c @@ -5,6 +5,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnishapi/vxp.c b/lib/libvarnishapi/vxp.c index 4b23a8882..f23ffad3f 100644 --- a/lib/libvarnishapi/vxp.c +++ b/lib/libvarnishapi/vxp.c @@ -5,6 +5,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnishapi/vxp.h b/lib/libvarnishapi/vxp.h index 0cb7a9eca..337c4b519 100644 --- a/lib/libvarnishapi/vxp.h +++ b/lib/libvarnishapi/vxp.h @@ -5,6 +5,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnishapi/vxp_lexer.c b/lib/libvarnishapi/vxp_lexer.c index 49a8dfed4..18ae314da 100644 --- a/lib/libvarnishapi/vxp_lexer.c +++ b/lib/libvarnishapi/vxp_lexer.c @@ -5,6 +5,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnishapi/vxp_parse.c b/lib/libvarnishapi/vxp_parse.c index b11e8dd50..1dfd42065 100644 --- a/lib/libvarnishapi/vxp_parse.c +++ b/lib/libvarnishapi/vxp_parse.c @@ -5,6 +5,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvarnishapi/vxp_test.c b/lib/libvarnishapi/vxp_test.c index 4cc0f8d81..359902025 100644 --- a/lib/libvarnishapi/vxp_test.c +++ b/lib/libvarnishapi/vxp_test.c @@ -4,6 +4,8 @@ * * Author: Martin Blix Grydeland * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvcc/generate.py b/lib/libvcc/generate.py index f962a8810..749eebd38 100755 --- a/lib/libvcc/generate.py +++ b/lib/libvcc/generate.py @@ -6,6 +6,8 @@ # # Author: Poul-Henning Kamp # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/lib/libvcc/vcc_acl.c b/lib/libvcc/vcc_acl.c index 9ca756a88..cf18107d7 100644 --- a/lib/libvcc/vcc_acl.c +++ b/lib/libvcc/vcc_acl.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvcc/vcc_action.c b/lib/libvcc/vcc_action.c index a1b57b407..542e1289f 100644 --- a/lib/libvcc/vcc_action.c +++ b/lib/libvcc/vcc_action.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvcc/vcc_backend.c b/lib/libvcc/vcc_backend.c index 374eeec5c..217b2366a 100644 --- a/lib/libvcc/vcc_backend.c +++ b/lib/libvcc/vcc_backend.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvcc/vcc_backend_util.c b/lib/libvcc/vcc_backend_util.c index e7c68edfc..fa3583a72 100644 --- a/lib/libvcc/vcc_backend_util.c +++ b/lib/libvcc/vcc_backend_util.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvcc/vcc_compile.c b/lib/libvcc/vcc_compile.c index 31d27f970..b7ccc9cf1 100644 --- a/lib/libvcc/vcc_compile.c +++ b/lib/libvcc/vcc_compile.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvcc/vcc_compile.h b/lib/libvcc/vcc_compile.h index 32de12063..ad1af617a 100644 --- a/lib/libvcc/vcc_compile.h +++ b/lib/libvcc/vcc_compile.h @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvcc/vcc_expr.c b/lib/libvcc/vcc_expr.c index cacbbdfac..dc36effeb 100644 --- a/lib/libvcc/vcc_expr.c +++ b/lib/libvcc/vcc_expr.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvcc/vcc_parse.c b/lib/libvcc/vcc_parse.c index 978c10057..2bfeb86fb 100644 --- a/lib/libvcc/vcc_parse.c +++ b/lib/libvcc/vcc_parse.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvcc/vcc_storage.c b/lib/libvcc/vcc_storage.c index ac4fbeb7d..a0b160f37 100644 --- a/lib/libvcc/vcc_storage.c +++ b/lib/libvcc/vcc_storage.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvcc/vcc_symb.c b/lib/libvcc/vcc_symb.c index 97d418921..bf33292e4 100644 --- a/lib/libvcc/vcc_symb.c +++ b/lib/libvcc/vcc_symb.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvcc/vcc_token.c b/lib/libvcc/vcc_token.c index 20caadabe..0e3b4569d 100644 --- a/lib/libvcc/vcc_token.c +++ b/lib/libvcc/vcc_token.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvcc/vcc_types.c b/lib/libvcc/vcc_types.c index 196efa539..2691a0531 100644 --- a/lib/libvcc/vcc_types.c +++ b/lib/libvcc/vcc_types.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvcc/vcc_utils.c b/lib/libvcc/vcc_utils.c index 3270e203a..ea38f69f3 100644 --- a/lib/libvcc/vcc_utils.c +++ b/lib/libvcc/vcc_utils.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvcc/vcc_var.c b/lib/libvcc/vcc_var.c index c662947c8..cdc071f9f 100644 --- a/lib/libvcc/vcc_var.c +++ b/lib/libvcc/vcc_var.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvcc/vcc_vmod.c b/lib/libvcc/vcc_vmod.c index 96b119913..1f28b1758 100644 --- a/lib/libvcc/vcc_vmod.c +++ b/lib/libvcc/vcc_vmod.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvcc/vcc_xref.c b/lib/libvcc/vcc_xref.c index 1d902795f..9e66bdd8a 100644 --- a/lib/libvcc/vcc_xref.c +++ b/lib/libvcc/vcc_xref.c @@ -5,6 +5,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvcc/vmodtool.py b/lib/libvcc/vmodtool.py index 6ed98632e..7f73d9c41 100755 --- a/lib/libvcc/vmodtool.py +++ b/lib/libvcc/vmodtool.py @@ -5,6 +5,8 @@ # # Author: Poul-Henning Kamp # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/lib/libvcc/vsctool.py b/lib/libvcc/vsctool.py index c175d181c..9df1dc40d 100644 --- a/lib/libvcc/vsctool.py +++ b/lib/libvcc/vsctool.py @@ -6,6 +6,8 @@ # # Author: Poul-Henning Kamp # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/lib/libvmod_blob/base64.c b/lib/libvmod_blob/base64.c index 45987c2ae..82f897dbe 100644 --- a/lib/libvmod_blob/base64.c +++ b/lib/libvmod_blob/base64.c @@ -5,6 +5,8 @@ * Authors: Nils Goroll * Geoffrey Simmons * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, diff --git a/lib/libvmod_blob/hex.c b/lib/libvmod_blob/hex.c index 2fe05a422..1444faeeb 100644 --- a/lib/libvmod_blob/hex.c +++ b/lib/libvmod_blob/hex.c @@ -5,6 +5,8 @@ * Authors: Nils Goroll * Geoffrey Simmons * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, diff --git a/lib/libvmod_blob/hex.h b/lib/libvmod_blob/hex.h index 53cfc8915..203a95aaa 100644 --- a/lib/libvmod_blob/hex.h +++ b/lib/libvmod_blob/hex.h @@ -5,6 +5,8 @@ * Authors: Nils Goroll * Geoffrey Simmons * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, diff --git a/lib/libvmod_blob/id.c b/lib/libvmod_blob/id.c index 3eb5ee28d..ad6b64607 100644 --- a/lib/libvmod_blob/id.c +++ b/lib/libvmod_blob/id.c @@ -5,6 +5,8 @@ * Authors: Nils Goroll * Geoffrey Simmons * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, diff --git a/lib/libvmod_blob/url.c b/lib/libvmod_blob/url.c index 65d678879..79fdc39b5 100644 --- a/lib/libvmod_blob/url.c +++ b/lib/libvmod_blob/url.c @@ -5,6 +5,8 @@ * Authors: Nils Goroll * Geoffrey Simmons * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, diff --git a/lib/libvmod_blob/vmod_blob.c b/lib/libvmod_blob/vmod_blob.c index 0092686e9..14c1d0160 100644 --- a/lib/libvmod_blob/vmod_blob.c +++ b/lib/libvmod_blob/vmod_blob.c @@ -5,6 +5,8 @@ * Authors: Nils Goroll * Geoffrey Simmons * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, diff --git a/lib/libvmod_blob/vmod_blob.h b/lib/libvmod_blob/vmod_blob.h index 5fd560816..fd728a93f 100644 --- a/lib/libvmod_blob/vmod_blob.h +++ b/lib/libvmod_blob/vmod_blob.h @@ -5,6 +5,8 @@ * Authors: Nils Goroll * Geoffrey Simmons * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, diff --git a/lib/libvmod_debug/vmod.vcc b/lib/libvmod_debug/vmod.vcc index e28bbd204..35ce24631 100644 --- a/lib/libvmod_debug/vmod.vcc +++ b/lib/libvmod_debug/vmod.vcc @@ -4,6 +4,8 @@ # # Author: Poul-Henning Kamp # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/lib/libvmod_debug/vmod_debug.c b/lib/libvmod_debug/vmod_debug.c index a17760e69..9f46a2436 100644 --- a/lib/libvmod_debug/vmod_debug.c +++ b/lib/libvmod_debug/vmod_debug.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_debug/vmod_debug_dyn.c b/lib/libvmod_debug/vmod_debug_dyn.c index 6dc0af797..b2430a978 100644 --- a/lib/libvmod_debug/vmod_debug_dyn.c +++ b/lib/libvmod_debug/vmod_debug_dyn.c @@ -4,6 +4,8 @@ * * Author: Dridi Boukelmoune * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_debug/vmod_debug_obj.c b/lib/libvmod_debug/vmod_debug_obj.c index bd8cda714..0d32683b1 100644 --- a/lib/libvmod_debug/vmod_debug_obj.c +++ b/lib/libvmod_debug/vmod_debug_obj.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_directors/fall_back.c b/lib/libvmod_directors/fall_back.c index c14e745af..72001d6de 100644 --- a/lib/libvmod_directors/fall_back.c +++ b/lib/libvmod_directors/fall_back.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_directors/hash.c b/lib/libvmod_directors/hash.c index d1f7fd6b3..314e9a2c6 100644 --- a/lib/libvmod_directors/hash.c +++ b/lib/libvmod_directors/hash.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_directors/misc.c b/lib/libvmod_directors/misc.c index c72799558..d70c8ce55 100644 --- a/lib/libvmod_directors/misc.c +++ b/lib/libvmod_directors/misc.c @@ -4,6 +4,8 @@ * * Author: Nils Goroll * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_directors/random.c b/lib/libvmod_directors/random.c index 3be74527f..fc0e355c8 100644 --- a/lib/libvmod_directors/random.c +++ b/lib/libvmod_directors/random.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_directors/round_robin.c b/lib/libvmod_directors/round_robin.c index d323f8a5e..bc4e81876 100644 --- a/lib/libvmod_directors/round_robin.c +++ b/lib/libvmod_directors/round_robin.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_directors/shard_cfg.c b/lib/libvmod_directors/shard_cfg.c index cb67915c6..7567f0050 100644 --- a/lib/libvmod_directors/shard_cfg.c +++ b/lib/libvmod_directors/shard_cfg.c @@ -5,6 +5,8 @@ * Authors: Nils Goroll * Geoffrey Simmons * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_directors/shard_cfg.h b/lib/libvmod_directors/shard_cfg.h index 2ce1817b8..5c6f1e6b6 100644 --- a/lib/libvmod_directors/shard_cfg.h +++ b/lib/libvmod_directors/shard_cfg.h @@ -4,6 +4,8 @@ * * Author: Nils Goroll * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_directors/shard_dir.c b/lib/libvmod_directors/shard_dir.c index 40472e677..850aeebcf 100644 --- a/lib/libvmod_directors/shard_dir.c +++ b/lib/libvmod_directors/shard_dir.c @@ -6,6 +6,8 @@ * Geoffrey Simmons * Julian Wiesener * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_directors/shard_dir.h b/lib/libvmod_directors/shard_dir.h index 1888aaf4b..067b4415a 100644 --- a/lib/libvmod_directors/shard_dir.h +++ b/lib/libvmod_directors/shard_dir.h @@ -5,6 +5,8 @@ * Authors: Julian Wiesener * Nils Goroll * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_directors/vdir.c b/lib/libvmod_directors/vdir.c index a862580b9..a4a24212c 100644 --- a/lib/libvmod_directors/vdir.c +++ b/lib/libvmod_directors/vdir.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_directors/vdir.h b/lib/libvmod_directors/vdir.h index e448bee43..00b47b131 100644 --- a/lib/libvmod_directors/vdir.h +++ b/lib/libvmod_directors/vdir.h @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_directors/vmod.vcc b/lib/libvmod_directors/vmod.vcc index 0f27f3c29..054b6c34e 100644 --- a/lib/libvmod_directors/vmod.vcc +++ b/lib/libvmod_directors/vmod.vcc @@ -11,6 +11,8 @@ # Nils Goroll # Geoffrey Simmons # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/lib/libvmod_directors/vmod_shard.c b/lib/libvmod_directors/vmod_shard.c index 09a547faa..7c56cedb6 100644 --- a/lib/libvmod_directors/vmod_shard.c +++ b/lib/libvmod_directors/vmod_shard.c @@ -5,6 +5,8 @@ * Authors: Julian Wiesener * Nils Goroll * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_proxy/vmod.vcc b/lib/libvmod_proxy/vmod.vcc index d07456cb5..603456e1c 100644 --- a/lib/libvmod_proxy/vmod.vcc +++ b/lib/libvmod_proxy/vmod.vcc @@ -4,6 +4,8 @@ # # Author: Emmanuel Hocdet # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/lib/libvmod_proxy/vmod_proxy.c b/lib/libvmod_proxy/vmod_proxy.c index 222de9c53..499cf24d3 100644 --- a/lib/libvmod_proxy/vmod_proxy.c +++ b/lib/libvmod_proxy/vmod_proxy.c @@ -4,6 +4,8 @@ * * Author: Emmanuel Hocdet * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_purge/vmod.vcc b/lib/libvmod_purge/vmod.vcc index a0fafde83..fd320f816 100644 --- a/lib/libvmod_purge/vmod.vcc +++ b/lib/libvmod_purge/vmod.vcc @@ -4,6 +4,8 @@ # # Author: Dridi Boukelmoune # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/lib/libvmod_purge/vmod_purge.c b/lib/libvmod_purge/vmod_purge.c index 1a01bae50..fd68b31e4 100644 --- a/lib/libvmod_purge/vmod_purge.c +++ b/lib/libvmod_purge/vmod_purge.c @@ -4,6 +4,8 @@ * * Author: Dridi Boukelmoune * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_std/vmod.vcc b/lib/libvmod_std/vmod.vcc index 1b48351bb..8f8c7cacf 100644 --- a/lib/libvmod_std/vmod.vcc +++ b/lib/libvmod_std/vmod.vcc @@ -4,6 +4,8 @@ # # Author: Poul-Henning Kamp # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/lib/libvmod_std/vmod_std.c b/lib/libvmod_std/vmod_std.c index d1b7411ec..b3233d827 100644 --- a/lib/libvmod_std/vmod_std.c +++ b/lib/libvmod_std/vmod_std.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_std/vmod_std_conversions.c b/lib/libvmod_std/vmod_std_conversions.c index 52a006205..e038d785a 100644 --- a/lib/libvmod_std/vmod_std_conversions.c +++ b/lib/libvmod_std/vmod_std_conversions.c @@ -4,6 +4,8 @@ * * Author: Poul-Henning Kamp * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_std/vmod_std_fileread.c b/lib/libvmod_std/vmod_std_fileread.c index 1bb003e48..cd9181e2b 100644 --- a/lib/libvmod_std/vmod_std_fileread.c +++ b/lib/libvmod_std/vmod_std_fileread.c @@ -4,6 +4,8 @@ * * Author: Sanjoy Das * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_std/vmod_std_querysort.c b/lib/libvmod_std/vmod_std_querysort.c index 4b99092f8..f5b5e115e 100644 --- a/lib/libvmod_std/vmod_std_querysort.c +++ b/lib/libvmod_std/vmod_std_querysort.c @@ -4,6 +4,8 @@ * * Author: Naren Venkataraman of Vimeo Inc. * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/lib/libvmod_unix/cred_compat.h b/lib/libvmod_unix/cred_compat.h index 6512d2122..9ac8438f8 100644 --- a/lib/libvmod_unix/cred_compat.h +++ b/lib/libvmod_unix/cred_compat.h @@ -4,6 +4,8 @@ * * Authors: Geoffrey Simmons * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, diff --git a/lib/libvmod_unix/vmod_unix.c b/lib/libvmod_unix/vmod_unix.c index 4388d58d4..99159a182 100644 --- a/lib/libvmod_unix/vmod_unix.c +++ b/lib/libvmod_unix/vmod_unix.c @@ -4,6 +4,8 @@ * * Authors: Geoffrey Simmons * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, diff --git a/lib/libvmod_vtc/vmod.vcc b/lib/libvmod_vtc/vmod.vcc index 22d3dded1..17a823f2c 100644 --- a/lib/libvmod_vtc/vmod.vcc +++ b/lib/libvmod_vtc/vmod.vcc @@ -4,6 +4,8 @@ # # Author: Dridi Boukelmoune # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/lib/libvmod_vtc/vmod_vtc.c b/lib/libvmod_vtc/vmod_vtc.c index 6bb31ba55..6b8c7bcf9 100644 --- a/lib/libvmod_vtc/vmod_vtc.c +++ b/lib/libvmod_vtc/vmod_vtc.c @@ -5,6 +5,8 @@ * Author: Poul-Henning Kamp * Author: Dridi Boukelmoune * + * SPDX-License-Identifier: BSD-2-Clause + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/tools/gcov_digest.py b/tools/gcov_digest.py index 797d9dea0..464d56626 100644 --- a/tools/gcov_digest.py +++ b/tools/gcov_digest.py @@ -5,6 +5,8 @@ # # Author: Poul-Henning Kamp # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/tools/vtc-bisect.sh b/tools/vtc-bisect.sh index 050c3319c..e70c9fff9 100755 --- a/tools/vtc-bisect.sh +++ b/tools/vtc-bisect.sh @@ -5,6 +5,8 @@ # # Author: Dridi Boukelmoune # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/tools/vtest.sh b/tools/vtest.sh index c4bc26e02..2e451e638 100755 --- a/tools/vtest.sh +++ b/tools/vtest.sh @@ -5,6 +5,8 @@ # # Author: Poul-Henning Kamp # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/varnish-legacy.m4 b/varnish-legacy.m4 index 9f67359ea..e4ba1b9ce 100644 --- a/varnish-legacy.m4 +++ b/varnish-legacy.m4 @@ -6,6 +6,8 @@ # # Author: Tollef Fog Heen # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/varnish.m4 b/varnish.m4 index 6a8eb0609..13a273f39 100644 --- a/varnish.m4 +++ b/varnish.m4 @@ -3,6 +3,8 @@ # # Author: Dridi Boukelmoune # +# SPDX-License-Identifier: BSD-2-Clause +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: From nils.goroll at uplex.de Mon Jan 27 12:02:05 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 27 Jan 2020 12:02:05 +0000 (UTC) Subject: [master] 0867bb1a0 attempt to stabilize c00040.vtc (for travis arm tests) Message-ID: <20200127120206.08F3DA715E@lists.varnish-cache.org> commit 0867bb1a0790968a2d16c25067ea3debec71c072 Author: Nils Goroll Date: Mon Jan 27 12:59:42 2020 +0100 attempt to stabilize c00040.vtc (for travis arm tests) We should not consider an early close of the backend connection a failure of the test, this vtc is not concerned with bodies. diff --git a/bin/varnishtest/tests/c00040.vtc b/bin/varnishtest/tests/c00040.vtc index b0511c7a5..157caa173 100644 --- a/bin/varnishtest/tests/c00040.vtc +++ b/bin/varnishtest/tests/c00040.vtc @@ -35,6 +35,7 @@ server s1 { send "1...5: ..0....5....0....5....0\r\n" send "1...5: ..0....5....0....5....0\r\n" send "1...5: ..0....5....0....5...\r\n\r\n" + non_fatal send "asdf" rxreq @@ -48,6 +49,7 @@ server s1 { send "1...5: ..0....5....0....5....0\r\n" send "1...5: ..0....5....0....5....0\r\n" send "1...5: ..0....5....0....5....\r\n\r\n" + non_fatal send "asdf" } -start From nils.goroll at uplex.de Mon Jan 27 15:21:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 27 Jan 2020 15:21:06 +0000 (UTC) Subject: [master] 14ea7ff2e assert that the destination pointer for vcl_get be zero Message-ID: <20200127152106.C9CEAAD83A@lists.varnish-cache.org> commit 14ea7ff2ea7da98d216899fe642ccc93a760287b Author: Nils Goroll Date: Wed Jan 22 09:42:04 2020 +0100 assert that the destination pointer for vcl_get be zero This is already implied in the code (because otherwise we would potentially leak a vcl reference (busy counter)). (yes, I have run make check with this) diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c index 66b8ff775..4dc504b03 100644 --- a/bin/varnishd/cache/cache_vcl.c +++ b/bin/varnishd/cache/cache_vcl.c @@ -260,6 +260,7 @@ void vcl_get(struct vcl **vcc, struct vcl *vcl) { AN(vcc); + AZ(*vcc); Lck_Lock(&vcl_mtx); if (vcl == NULL) From nils.goroll at uplex.de Mon Jan 27 15:21:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 27 Jan 2020 15:21:06 +0000 (UTC) Subject: [master] 82eb76934 integrate the VCL_Rel() step into vcl_get() Message-ID: <20200127152106.DBC47AD83D@lists.varnish-cache.org> commit 82eb76934ad782e7b6e2e752dafc22cbb95ff5f8 Author: Nils Goroll Date: Wed Jan 22 10:01:53 2020 +0100 integrate the VCL_Rel() step into vcl_get() ... potentially saving a lock/unlock on the critical vcl_mtx Both callers of vcl_get(), VPI_vcl_select() and VCL_Refresh(), potentially have to unref another vcl first. For VCL_Refresh(), this happens when the active vcl changes and the previously active vcl is cached in (struct worker).vcl, which can be assumed to always be the case on a busy system. For VPI_vcl_select(), this happens when switching vcls at esi_level > 0. To summarize, this patch will primarily reduce contention on the vcl_mtx after a 'vcl.use' CLI command on a busy system and for 'return(vcl(...))' with ESI. diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c index 4dc504b03..fa653c636 100644 --- a/bin/varnishd/cache/cache_vcl.c +++ b/bin/varnishd/cache/cache_vcl.c @@ -259,10 +259,21 @@ VCL_Panic(struct vsb *vsb, const char *nm, const struct vcl *vcl) void vcl_get(struct vcl **vcc, struct vcl *vcl) { + struct vcl *old; + AN(vcc); - AZ(*vcc); + + old = *vcc; + *vcc = NULL; + + CHECK_OBJ_ORNULL(old, VCL_MAGIC); Lck_Lock(&vcl_mtx); + if (old != NULL) { + assert(old->busy > 0); + old->busy--; + } + if (vcl == NULL) vcl = vcl_active; /* Sample vcl_active under lock to avoid * race */ diff --git a/bin/varnishd/cache/cache_vpi.c b/bin/varnishd/cache/cache_vpi.c index 298cac7a9..fd168fc18 100644 --- a/bin/varnishd/cache/cache_vpi.c +++ b/bin/varnishd/cache/cache_vpi.c @@ -108,8 +108,6 @@ VPI_vcl_select(VRT_CTX, VCL_VCL vcl) AZ(req->top->vcl0); req->top->vcl0 = req->vcl; req->vcl = NULL; - } else { - VCL_Rel(&req->vcl); } vcl_get(&req->vcl, vcl); VSLb(ctx->req->vsl, SLT_VCL_use, "%s via %s", diff --git a/bin/varnishd/cache/cache_vrt_vcl.c b/bin/varnishd/cache/cache_vrt_vcl.c index 2da13502f..d02f9bddc 100644 --- a/bin/varnishd/cache/cache_vrt_vcl.c +++ b/bin/varnishd/cache/cache_vrt_vcl.c @@ -84,8 +84,6 @@ VCL_Refresh(struct vcl **vcc) if (*vcc == vcl_active) return; - if (*vcc != NULL) - VCL_Rel(vcc); /* XXX: optimize locking */ vcl_get(vcc, NULL); } From nils.goroll at uplex.de Mon Jan 27 15:21:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 27 Jan 2020 15:21:06 +0000 (UTC) Subject: [master] d3c50d043 rename vcl_get() -> VCL_Update() Message-ID: <20200127152106.F1732AD840@lists.varnish-cache.org> commit d3c50d0435cb0e58794bf9406c31ce728ac447fb Author: Nils Goroll Date: Mon Jan 27 16:11:37 2020 +0100 rename vcl_get() -> VCL_Update() note: no change to vrt.h, this is a private interface between vcl and vrt_vcl/vpi. diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c index fa653c636..8c0686597 100644 --- a/bin/varnishd/cache/cache_vcl.c +++ b/bin/varnishd/cache/cache_vcl.c @@ -257,7 +257,7 @@ VCL_Panic(struct vsb *vsb, const char *nm, const struct vcl *vcl) /*--------------------------------------------------------------------*/ void -vcl_get(struct vcl **vcc, struct vcl *vcl) +VCL_Update(struct vcl **vcc, struct vcl *vcl) { struct vcl *old; diff --git a/bin/varnishd/cache/cache_vcl.h b/bin/varnishd/cache/cache_vcl.h index 1864367ce..885e918a8 100644 --- a/bin/varnishd/cache/cache_vcl.h +++ b/bin/varnishd/cache/cache_vcl.h @@ -70,7 +70,7 @@ struct vclref { extern struct lock vcl_mtx; extern struct vcl *vcl_active; /* protected by vcl_mtx */ struct vcl *vcl_find(const char *); -void vcl_get(struct vcl **, struct vcl *); +void VCL_Update(struct vcl **, struct vcl *); struct vcltemp { const char * const name; diff --git a/bin/varnishd/cache/cache_vpi.c b/bin/varnishd/cache/cache_vpi.c index fd168fc18..e02867521 100644 --- a/bin/varnishd/cache/cache_vpi.c +++ b/bin/varnishd/cache/cache_vpi.c @@ -109,7 +109,7 @@ VPI_vcl_select(VRT_CTX, VCL_VCL vcl) req->top->vcl0 = req->vcl; req->vcl = NULL; } - vcl_get(&req->vcl, vcl); + VCL_Update(&req->vcl, vcl); VSLb(ctx->req->vsl, SLT_VCL_use, "%s via %s", req->vcl->loaded_name, vcl->loaded_name); } diff --git a/bin/varnishd/cache/cache_vrt_vcl.c b/bin/varnishd/cache/cache_vrt_vcl.c index d02f9bddc..2d7b39a36 100644 --- a/bin/varnishd/cache/cache_vrt_vcl.c +++ b/bin/varnishd/cache/cache_vrt_vcl.c @@ -85,7 +85,7 @@ VCL_Refresh(struct vcl **vcc) if (*vcc == vcl_active) return; - vcl_get(vcc, NULL); + VCL_Update(vcc, NULL); } void From nils.goroll at uplex.de Mon Jan 27 15:22:07 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 27 Jan 2020 15:22:07 +0000 (UTC) Subject: [master] 598b13d7f Add a strands interface to VSL and use it for std.log Message-ID: <20200127152207.40A7AADD40@lists.varnish-cache.org> commit 598b13d7fb96e65346e25ab5fdbe1810a3dd93d7 Author: Nils Goroll Date: Mon Jan 20 18:48:21 2020 +0100 Add a strands interface to VSL and use it for std.log Since 8baf4a690fdb699923dd8438d0088f34fcb24365 we lost information about an overflowed workspace by calling std.log(), which resulted from use of the workspace for construction of a contiguous string from the argument constituents. Since then, we have changed the interface to STRANDS, but this issue remained. We now solve the case for real by pushing the string concatenation down to VSL: New versions of VSL and VSLb (coded by example of VSLv() and VSLbt()) take a strands argument and create a log record without additional copy overhead. These solve #3194 for std.log(), make logging more efficient and, in particular, allow use of std.log() in low workspace conditions (because they do not require any). Also improve test coverage for std.log() Ref #3194 diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h index ecf14cf41..360855e44 100644 --- a/bin/varnishd/cache/cache.h +++ b/bin/varnishd/cache/cache.h @@ -727,10 +727,12 @@ const char *SES_Get_String_Attr(const struct sess *sp, enum sess_attr a); void VSLv(enum VSL_tag_e tag, uint32_t vxid, const char *fmt, va_list va); void VSL(enum VSL_tag_e tag, uint32_t vxid, const char *fmt, ...) v_printflike_(3, 4); +void VSLs(enum VSL_tag_e tag, uint32_t vxid, const struct strands *s); void VSLbv(struct vsl_log *, enum VSL_tag_e tag, const char *fmt, va_list va); void VSLb(struct vsl_log *, enum VSL_tag_e tag, const char *fmt, ...) v_printflike_(3, 4); void VSLbt(struct vsl_log *, enum VSL_tag_e tag, txt t); +void VSLbs(struct vsl_log *, enum VSL_tag_e tag, const struct strands *s); void VSLb_ts(struct vsl_log *, const char *event, vtim_real first, vtim_real *pprev, vtim_real now); void VSLb_bin(struct vsl_log *, enum VSL_tag_e, ssize_t, const void*); diff --git a/bin/varnishd/cache/cache_shmlog.c b/bin/varnishd/cache/cache_shmlog.c index 9590d284f..4fc746eee 100644 --- a/bin/varnishd/cache/cache_shmlog.c +++ b/bin/varnishd/cache/cache_shmlog.c @@ -43,6 +43,55 @@ #include "common/heritage.h" #include "common/vsmw.h" +/* ------------------------------------------------------------ + * strands helpers - move elsewhere? + */ + +static unsigned +strands_len(const struct strands *s) +{ + unsigned r = 0; + int i; + + for (i = 0; i < s->n; i++) { + if (s->p[i] == NULL || *s->p[i] == '\0') + continue; + r += strlen(s->p[i]); + } + + return (r); +} + +/* + * like VRT_Strands(), but truncating instead of failing for end of buffer + * + * returns number of bytes including NUL + */ +static unsigned +strands_cat(char *buf, unsigned bufl, const struct strands *s) +{ + unsigned l = 0, ll; + int i; + + /* NUL-terminated */ + assert(bufl > 0); + bufl--; + + for (i = 0; i < s->n && bufl > 0; i++) { + if (s->p[i] == NULL || *s->p[i] == '\0') + continue; + ll = strlen(s->p[i]); + if (ll > bufl) + ll = bufl; + memcpy(buf, s->p[i], ll); + l += ll; + buf += ll; + bufl -= ll; + } + *buf = '\0'; /* NUL-terminated */ + return (l + 1); +} + /* These cannot be struct lock, which depends on vsm/vsl working */ static pthread_mutex_t vsl_mtx; static pthread_mutex_t vsc_mtx; @@ -231,6 +280,20 @@ VSLv(enum VSL_tag_e tag, uint32_t vxid, const char *fmt, va_list ap) } +void +VSLs(enum VSL_tag_e tag, uint32_t vxid, const struct strands *s) +{ + unsigned n, mlen = cache_param->vsl_reclen; + char buf[mlen]; + + if (vsl_tag_is_masked(tag)) + return; + + n = strands_cat(buf, mlen, s); + + vslr(tag, vxid, buf, n); +} + void VSL(enum VSL_tag_e tag, uint32_t vxid, const char *fmt, ...) { @@ -304,6 +367,42 @@ VSLbt(struct vsl_log *vsl, enum VSL_tag_e tag, txt t) VSL_Flush(vsl, 0); } +/*-------------------------------------------------------------------- + * VSL-buffered-strands + */ +void +VSLbs(struct vsl_log *vsl, enum VSL_tag_e tag, const struct strands *s) +{ + unsigned l, mlen; + + vsl_sanity(vsl); + if (vsl_tag_is_masked(tag)) + return; + mlen = cache_param->vsl_reclen; + + /* including NUL */ + l = strands_len(s) + 1; + if (l > mlen) + l = mlen; + + assert(vsl->wlp < vsl->wle); + + /* Flush if necessary */ + if (VSL_END(vsl->wlp, l) >= vsl->wle) + VSL_Flush(vsl, 1); + assert(VSL_END(vsl->wlp, l) < vsl->wle); + + mlen = strands_cat(VSL_DATA(vsl->wlp), l, s); + assert(l == mlen); + + vsl->wlp = vsl_hdr(tag, vsl->wlp, l, vsl->wid); + assert(vsl->wlp < vsl->wle); + vsl->wlr++; + + if (DO_DEBUG(DBG_SYNCVSL)) + VSL_Flush(vsl, 0); +} + /*-------------------------------------------------------------------- * VSL-buffered */ diff --git a/bin/varnishtest/tests/m00000.vtc b/bin/varnishtest/tests/m00000.vtc index 342a861e3..5a861c680 100644 --- a/bin/varnishtest/tests/m00000.vtc +++ b/bin/varnishtest/tests/m00000.vtc @@ -14,9 +14,30 @@ varnish v1 -vcl+backend { import debug as dbg; import debug as dbg; // again + sub log { + std.log("VCL" + " initiated " + "log"); + std.log("01030507090b0d0f" + + "11131517191b1d1f" + + "21232527292b2d2f" + + "31333537393b3d3f" + + "41434547494b4d4f" + + "51535557595b5d5f" + + "61636567696b6d6f" + + "71737577797b7d7f" + + "81838587898b8d8f" + + "91939597999b9d9f" + + "a1a3a5a7a9abadaf" + + "b1b3b5b7b9bbbdbf" + + "c1c3c5c7c9cbcdcf" + + "d1d3d5d7d9dbdddf" + + "e1e3e5e7e9ebedef" + + "f1f3f5f7f9fbfdff"); + } + sub vcl_init { new objx = dbg.obj(); dbg.vsc_new(); + call log; } sub vcl_synth { @@ -54,7 +75,7 @@ varnish v1 -vcl+backend { debug.test_priv_vcl(); objx.test_priv_call(); objx.test_priv_vcl(); - std.log("VCL" + " initiated " + "log"); + call log; std.syslog(8 + 7, "Somebody runs varnishtest"); debug.rot52(resp); } @@ -89,6 +110,12 @@ client c1 { varnish v1 -expect DEBUG.count == 1 logexpect l1 -v v1 -g raw -d 1 { + expect * 0 CLI {^Rd vcl.load} + expect 0 0 VCL_Log {^VCL initiated log} + # vsl_reclen = 255b minus NUL byte (last "ff" missing) + expect 0 0 VCL_Log {^01030507090b0d0f11131517191b1d1f21232527292b2d2f31333537393b3d3f41434547494b4d4f51535557595b5d5f61636567696b6d6f71737577797b7d7f81838587898b8d8f91939597999b9d9fa1a3a5a7a9abadafb1b3b5b7b9bbbdbfc1c3c5c7c9cbcdcfd1d3d5d7d9dbdddfe1e3e5e7e9ebedeff1f3f5f7f9fbfd$} + expect 0 0 Debug {VCL_EVENT_WARM} + expect * 1001 VCL_call {^DELIVER} expect 0 = RespUnset {^foo: bAr} expect 0 = RespHeader {^foo: BAR} @@ -100,6 +127,7 @@ logexpect l1 -v v1 -g raw -d 1 { expect 0 = RespHeader {^what: [1-9][0-9]} expect 0 = RespHeader {^not: -1} expect 0 = VCL_Log {^VCL initiated log} + expect 0 = VCL_Log {^01030507090b0d0f11131517191b1d1f21232527292b2d2f31333537393b3d3f41434547494b4d4f51535557595b5d5f61636567696b6d6f71737577797b7d7f81838587898b8d8f91939597999b9d9fa1a3a5a7a9abadafb1b3b5b7b9bbbdbfc1c3c5c7c9cbcdcfd1d3d5d7d9dbdddfe1e3e5e7e9ebedeff1f3f5f7f9fbfd$} expect 0 = RespHeader {^Encrypted: ROT52} expect 0 = VCL_return {^deliver} } -start diff --git a/bin/varnishtest/tests/r03131.vtc b/bin/varnishtest/tests/r03131.vtc index 5dda251fb..c70f6500f 100644 --- a/bin/varnishtest/tests/r03131.vtc +++ b/bin/varnishtest/tests/r03131.vtc @@ -11,11 +11,6 @@ varnish v1 -vcl { } sub vcl_synth { - set resp.http.res1 = vtc.workspace_reserve(client, 1024 * 1024); - - # XXX overflow gets cleared by WS_Reset called from std.log() - # -> do we want this ? - vtc.workspace_alloc(session, -16); std.log("res(8) = " + vtc.workspace_reserve(session, 8)); std.log("res(15) = " + vtc.workspace_reserve(session, 15)); diff --git a/lib/libvmod_std/vmod_std.c b/lib/libvmod_std/vmod_std.c index b3233d827..51a9b7e16 100644 --- a/lib/libvmod_std/vmod_std.c +++ b/lib/libvmod_std/vmod_std.c @@ -133,19 +133,12 @@ vmod_random(VRT_CTX, VCL_REAL lo, VCL_REAL hi) VCL_VOID v_matchproto_(td_std_log) vmod_log(VRT_CTX, VCL_STRANDS s) { - const char *p; - uintptr_t sn; - CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC); - sn = WS_Snapshot(ctx->ws); - p = VRT_StrandsWS(ctx->ws, NULL, s); - if (p != NULL) { - if (ctx->vsl != NULL) - VSLb(ctx->vsl, SLT_VCL_Log, "%s", p); - else - VSL(SLT_VCL_Log, 0, "%s", p); - } - WS_Reset(ctx->ws, sn); + + if (ctx->vsl != NULL) + VSLbs(ctx->vsl, SLT_VCL_Log, s); + else + VSLs(SLT_VCL_Log, 0, s); } /* XXX use vsyslog() ? */ From nils.goroll at uplex.de Mon Jan 27 15:22:07 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 27 Jan 2020 15:22:07 +0000 (UTC) Subject: [master] f47afac0a reduce workspace load on the parameter canary vtc Message-ID: <20200127152207.5F7D9ADD43@lists.varnish-cache.org> commit f47afac0afa606a9872ef50b9b070c0cbb3371e4 Author: Nils Goroll Date: Mon Jan 20 20:17:52 2020 +0100 reduce workspace load on the parameter canary vtc It now bails out due to a workspace overflow which it acually did trigger all the time, but that remained unnoticed due to #3194 The test to multiply the cookie header 128 times (8x in the first regex, 16x in the second) was not realistic even for "modern times", so I do not think we should have workspaces sized by such an example. diff --git a/bin/varnishtest/tests/v00004.vtc b/bin/varnishtest/tests/v00004.vtc index 486f88a50..716f47294 100644 --- a/bin/varnishtest/tests/v00004.vtc +++ b/bin/varnishtest/tests/v00004.vtc @@ -153,8 +153,6 @@ varnish v1 -vcl+backend { sub recv9 { std.log("STK recv9 " + debug.stk()); set req.http.regex = regsub(req.http.cookie, "(.*)", "\1\1\1\1\1\1\1\1"); - set req.http.regex = regsub(req.http.regex, "(.*)", - "\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"); # hey geoff, this is deliberate set req.http.regex = regsub(req.http.regex, "(.*)(.{5})(.{6})(.{7})(.{8})", "/\5\4\3\2\1"); From nils.goroll at uplex.de Mon Jan 27 16:36:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 27 Jan 2020 16:36:06 +0000 (UTC) Subject: [master] b9c5cb57b Improve workspace overflow test Message-ID: <20200127163606.F270BAF931@lists.varnish-cache.org> commit b9c5cb57b3ffc5be93fc9d179da948681204a113 Author: Nils Goroll Date: Mon Jan 27 17:34:37 2020 +0100 Improve workspace overflow test Ref #3194 diff --git a/bin/varnishtest/tests/c00071.vtc b/bin/varnishtest/tests/c00071.vtc index 7e3c156ee..9142f382a 100644 --- a/bin/varnishtest/tests/c00071.vtc +++ b/bin/varnishtest/tests/c00071.vtc @@ -13,6 +13,7 @@ server s1 { varnish v1 -vcl+backend { import vtc; + import std; sub vcl_deliver { vtc.workspace_alloc(client, -192); @@ -21,7 +22,8 @@ varnish v1 -vcl+backend { vtc.workspace_alloc(client, -10); } else if (req.url ~ "/baz") { - set resp.http.x-foo = regsub(req.url, "baz", "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz"); + set resp.http.x-foo = regsub(req.url, "baz", "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz"); + std.log("dummy"); } set resp.http.x-of = vtc.workspace_overflowed(client); } @@ -41,6 +43,16 @@ client c1 { varnish v1 -vsl_catchup +logexpect l1 -v v1 -g raw { + expect * 1006 VCL_call {^DELIVER$} + expect 0 = LostHeader {^x-foo:$} + # std.log does not need workspace + expect 0 = VCL_Log {^dummy$} + # the workspace is overflowed, but still has space + expect 0 = RespHeader {^x-of: true$} + expect 6 = Error {^workspace_client overflow} +} -start + client c2 { txreq -url /baz rxresp @@ -48,6 +60,7 @@ client c2 { expect resp.http.x-of == } -run +logexpect l1 -wait varnish v1 -expect client_resp_500 == 2 varnish v1 -expect ws_client_overflow == 2 From nils.goroll at uplex.de Mon Jan 27 16:55:56 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 27 Jan 2020 17:55:56 +0100 Subject: [master] 4fe881852 Stabilize s10, again In-Reply-To: <20200117165307.73912A6951@lists.varnish-cache.org> References: <20200117165307.73912A6951@lists.varnish-cache.org> Message-ID: <965c841b-bbae-5d2f-a7b7-94476e6b89db@uplex.de> Hi Dridi, we're still failing quite consistently on one of the vtest boxes. Would you like to have another look? Thanks, Nils -- ** * * UPLEX - Nils Goroll Systemoptimierung Scheffelstra?e 32 22301 Hamburg tel +49 40 28805731 mob +49 170 2723133 fax +49 40 42949753 xmpp://slink at jabber.int.uplex.de/ http://uplex.de/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: From nils.goroll at uplex.de Mon Jan 27 17:12:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 27 Jan 2020 17:12:06 +0000 (UTC) Subject: [master] 9c7abda73 parameter canary vtc: Get a better idea of workspace usage Message-ID: <20200127171206.CBDFEB0B5F@lists.varnish-cache.org> commit 9c7abda7396b6dca517fc7b081762a4c5c5232d7 Author: Nils Goroll Date: Mon Jan 27 18:11:01 2020 +0100 parameter canary vtc: Get a better idea of workspace usage related to vtest failures diff --git a/bin/varnishtest/tests/v00004.vtc b/bin/varnishtest/tests/v00004.vtc index 716f47294..872796caa 100644 --- a/bin/varnishtest/tests/v00004.vtc +++ b/bin/varnishtest/tests/v00004.vtc @@ -140,6 +140,7 @@ server s1 { varnish v1 -vcl+backend { import std; import debug; + import vtc; sub recv0 { call recv1; std.log("STK recv0 " + debug.stk()); } sub recv1 { call recv2; std.log("STK recv1 " + debug.stk()); } @@ -151,11 +152,14 @@ varnish v1 -vcl+backend { sub recv7 { call recv8; std.log("STK recv7 " + debug.stk()); } sub recv8 { call recv9; std.log("STK recv8 " + debug.stk()); } sub recv9 { - std.log("STK recv9 " + debug.stk()); + std.log("STK recv9 " + debug.stk() + " WS " + + vtc.workspace_free(client)); set req.http.regex = regsub(req.http.cookie, "(.*)", "\1\1\1\1\1\1\1\1"); + std.log("WS " + vtc.workspace_free(client)); # hey geoff, this is deliberate set req.http.regex = regsub(req.http.regex, "(.*)(.{5})(.{6})(.{7})(.{8})", "/\5\4\3\2\1"); + std.log("WS " + vtc.workspace_free(client)); std.log("REGEX recv9 " + req.http.regex); } From nils.goroll at uplex.de Mon Jan 27 17:21:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 27 Jan 2020 17:21:06 +0000 (UTC) Subject: [master] 9ffad1b37 32bit fiddling again Message-ID: <20200127172106.63E08B0FF1@lists.varnish-cache.org> commit 9ffad1b377612824e2fcfc6fc02b2a51a43b338f Author: Nils Goroll Date: Mon Jan 27 18:20:15 2020 +0100 32bit fiddling again diff --git a/bin/varnishtest/tests/c00071.vtc b/bin/varnishtest/tests/c00071.vtc index 9142f382a..fdb48c4da 100644 --- a/bin/varnishtest/tests/c00071.vtc +++ b/bin/varnishtest/tests/c00071.vtc @@ -22,7 +22,7 @@ varnish v1 -vcl+backend { vtc.workspace_alloc(client, -10); } else if (req.url ~ "/baz") { - set resp.http.x-foo = regsub(req.url, "baz", "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz"); + set resp.http.x-foo = regsub(req.url, "baz", "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz"); std.log("dummy"); } set resp.http.x-of = vtc.workspace_overflowed(client); From nils.goroll at uplex.de Mon Jan 27 17:40:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 27 Jan 2020 17:40:06 +0000 (UTC) Subject: [master] 95db1abee skip workspace-hungry operations on 32bit for now Message-ID: <20200127174006.86263B17D5@lists.varnish-cache.org> commit 95db1abeecaf5027a97ed4649ed3ea2dbec3bc42 Author: Nils Goroll Date: Mon Jan 27 18:38:36 2020 +0100 skip workspace-hungry operations on 32bit for now (actually not on 32bit, but where the default workspace is low) Ref #3203 diff --git a/bin/varnishtest/tests/v00004.vtc b/bin/varnishtest/tests/v00004.vtc index 872796caa..5f7a7aec8 100644 --- a/bin/varnishtest/tests/v00004.vtc +++ b/bin/varnishtest/tests/v00004.vtc @@ -154,6 +154,10 @@ varnish v1 -vcl+backend { sub recv9 { std.log("STK recv9 " + debug.stk() + " WS " + vtc.workspace_free(client)); + if (vtc.workspace_free(client) < 48 * 1024) { + std.log("XXX #3203 skipping"); + return; + } set req.http.regex = regsub(req.http.cookie, "(.*)", "\1\1\1\1\1\1\1\1"); std.log("WS " + vtc.workspace_free(client)); # hey geoff, this is deliberate From dridi at varni.sh Mon Jan 27 17:40:28 2020 From: dridi at varni.sh (Dridi Boukelmoune) Date: Mon, 27 Jan 2020 17:40:28 +0000 Subject: [master] 4fe881852 Stabilize s10, again In-Reply-To: <965c841b-bbae-5d2f-a7b7-94476e6b89db@uplex.de> References: <20200117165307.73912A6951@lists.varnish-cache.org> <965c841b-bbae-5d2f-a7b7-94476e6b89db@uplex.de> Message-ID: On Mon, Jan 27, 2020 at 4:56 PM Nils Goroll wrote: > > Hi Dridi, > > we're still failing quite consistently on one of the vtest boxes. Would you like > to have another look? We are back to the previous state before those timeouts were exposed to VCL: less than 50% of failure for arm64 FreeBSD on VTEST, and (I believe) a 100% success rate on other platforms that don't skip the test case. So until I have some arm64 hardware to run FreeBSD on (I'm not sure my boards can) there's no way for me to dig deeper. Please note that my own VTEST box runs on aarch64 hardware, a fancy label for arm64. I have a spare board on which I could try to install FreeBSD but I'm pretty sure it's not supported, and don't have time for such an endeavor. Dridi From phk at FreeBSD.org Mon Jan 27 21:45:10 2020 From: phk at FreeBSD.org (Poul-Henning Kamp) Date: Mon, 27 Jan 2020 21:45:10 +0000 (UTC) Subject: [master] 0ca0a16b5 Use the same pattern we do for other families of variables. Message-ID: <20200127214510.E4F189D8B@lists.varnish-cache.org> commit 0ca0a16b5abcae913ae40513f028b73628056720 Author: Poul-Henning Kamp Date: Mon Jan 27 21:44:23 2020 +0000 Use the same pattern we do for other families of variables. diff --git a/bin/varnishd/cache/cache_vrt_var.c b/bin/varnishd/cache/cache_vrt_var.c index d7cb5f794..8409511f8 100644 --- a/bin/varnishd/cache/cache_vrt_var.c +++ b/bin/varnishd/cache/cache_vrt_var.c @@ -950,19 +950,18 @@ HTTP_VAR(beresp) /*--------------------------------------------------------------------*/ -#define set_noop(sp, d) (void)0 - -#ifdef SO_SNDTIMEO_WORKS static inline void -set_idle_send_timeout(struct sess *sp, VCL_DURATION d) +set_idle_send_timeout(const struct sess *sp, VCL_DURATION d) { +#ifdef SO_SNDTIMEO_WORKS struct timeval tv = VTIM_timeval(d); VTCP_Assert(setsockopt(sp->fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof tv)); -} #else -#define set_idle_send_timeout(sp, d) set_noop(sp, d) + (void)sp; + (void)d; #endif +} #define SESS_VAR_DUR(x, setter) \ VCL_VOID \ @@ -972,7 +971,7 @@ VRT_l_sess_##x(VRT_CTX, VCL_DURATION d) \ CHECK_OBJ_NOTNULL(ctx->sp, SESS_MAGIC); \ if (d < 0.0) \ d = 0.0; \ - setter(ctx->sp, d); \ + setter; \ ctx->sp->x = d; \ } \ \ @@ -984,7 +983,7 @@ VRT_r_sess_##x(VRT_CTX) \ return (SESS_TMO(ctx->sp, x)); \ } -SESS_VAR_DUR(timeout_idle, set_noop) -SESS_VAR_DUR(timeout_linger, set_noop) -SESS_VAR_DUR(send_timeout, set_noop) -SESS_VAR_DUR(idle_send_timeout, set_idle_send_timeout) +SESS_VAR_DUR(timeout_idle, ) +SESS_VAR_DUR(timeout_linger, ) +SESS_VAR_DUR(send_timeout, ) +SESS_VAR_DUR(idle_send_timeout, set_idle_send_timeout(ctx->sp, d)) From phk at FreeBSD.org Mon Jan 27 21:45:10 2020 From: phk at FreeBSD.org (Poul-Henning Kamp) Date: Mon, 27 Jan 2020 21:45:10 +0000 (UTC) Subject: [master] cb023d702 Flexelinting. Message-ID: <20200127214510.B9B7D9D89@lists.varnish-cache.org> commit cb023d702c1e1d0556f137086fb9fe9ffe57b98f Author: Poul-Henning Kamp Date: Mon Jan 27 21:43:39 2020 +0000 Flexelinting. (I'm assuming these two were typos, if they were intentional, I would have expected explanatory comments.) diff --git a/lib/libvmod_vtc/vmod_vtc.c b/lib/libvmod_vtc/vmod_vtc.c index 6b8c7bcf9..499b611aa 100644 --- a/lib/libvmod_vtc/vmod_vtc.c +++ b/lib/libvmod_vtc/vmod_vtc.c @@ -118,7 +118,7 @@ VCL_VOID v_matchproto_(td_vtc_sleep) vmod_sleep(VRT_CTX, VCL_DURATION t) { - CHECK_OBJ_ORNULL(ctx, VRT_CTX_MAGIC); + CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC); VTIM_sleep(t); } @@ -348,7 +348,7 @@ vmod_proxy_header(VRT_CTX, VCL_ENUM venum, VCL_IP client, VCL_IP server, int version; size_t l; - CHECK_OBJ_ORNULL(ctx, VRT_CTX_MAGIC); + CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC); if (venum == VENUM(v1)) version = 1; From nils.goroll at uplex.de Tue Jan 28 07:46:06 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Tue, 28 Jan 2020 07:46:06 +0000 (UTC) Subject: [master] 9711183db the governance page has moved Message-ID: <20200128074606.E7BEA97499@lists.varnish-cache.org> commit 9711183db3024d0b86f72fc977f133945157d424 Author: Nils Goroll Date: Tue Jan 28 08:43:45 2020 +0100 the governance page has moved I would have wanted to use a protocol agnostic URL, but it seems sphinx does not support them (//varnish-cache.org/... is interpreted as a URL). If anyone knows better, please improve. diff --git a/doc/sphinx/dev-guide/index.rst b/doc/sphinx/dev-guide/index.rst index 7d361024d..85bfbea7d 100644 --- a/doc/sphinx/dev-guide/index.rst +++ b/doc/sphinx/dev-guide/index.rst @@ -87,7 +87,7 @@ Various policies .. toctree:: :maxdepth: 1 - policy_governance + Varnish Cache organization and day-to-day operation policy_vmods The varnish-cache.org homepage diff --git a/doc/sphinx/dev-guide/policy_governance.rst b/doc/sphinx/dev-guide/policy_governance.rst deleted file mode 100644 index 70250ad97..000000000 --- a/doc/sphinx/dev-guide/policy_governance.rst +++ /dev/null @@ -1,28 +0,0 @@ -.. _policy-governance: - -Project Truck Factor and Governance ------------------------------------ - -We recognize that the Truck Factor of the Varnish Cache project is low. - -As mitigation we have created a Varnish Governance Board (VGB) -and implemented procedures so no project asset have a Truck Factor -less than 3. - -The Varnish Governance Board is the ultimate authority in the -project, but does little to nothing on a daily basis. - -The important thing is that there is agreement beforehand about who -has the authority to step in, if need be. - -Appointment to the VGB is by acclamation, and we prefer the members -to have enough distance and neutrality to be able to resolve -conflicts, should it ever become necessary. - -Current members of the VGB: - -* Rogier Mulhuijzen -* Lasse Karstensen -* Poul-Henning Kamp - - From nils.goroll at uplex.de Tue Jan 28 07:48:07 2020 From: nils.goroll at uplex.de (Nils Goroll) Date: Tue, 28 Jan 2020 08:48:07 +0100 Subject: [master] 9711183db the governance page has moved In-Reply-To: <20200128074606.E7BEA97499@lists.varnish-cache.org> References: <20200128074606.E7BEA97499@lists.varnish-cache.org> Message-ID: On 28/01/2020 08:46, Nils Goroll wrote: > (//varnish-cache.org/... is interpreted as a URL). as a *file* rather. Sorry for the typo. -- ** * * UPLEX - Nils Goroll Systemoptimierung Scheffelstra?e 32 22301 Hamburg tel +49 40 28805731 mob +49 170 2723133 fax +49 40 42949753 xmpp://slink at jabber.int.uplex.de/ http://uplex.de/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: From guillaume at varnish-software.com Thu Jan 30 23:10:10 2020 From: guillaume at varnish-software.com (Guillaume Quintard) Date: Thu, 30 Jan 2020 23:10:10 +0000 (UTC) Subject: [master] 3ec9b582c fix typo Message-ID: <20200130231010.1B590AED01@lists.varnish-cache.org> commit 3ec9b582cc2be3fac03555e85417a7d9b593af4d Author: Guillaume Quintard Date: Thu Jan 30 15:08:41 2020 -0800 fix typo diff --git a/include/tbl/cli_cmds.h b/include/tbl/cli_cmds.h index 41c0569a1..438019f43 100644 --- a/include/tbl/cli_cmds.h +++ b/include/tbl/cli_cmds.h @@ -331,7 +331,7 @@ CLI_CMD(DEBUG_REQPOOLFAIL, "Schedule req-pool failures.", "The argument is read L-R and 'f' means fail:\n\n" "\tparam.set debug.reqpoolfail F__F\n\n" - "Means that the frist and the third attempted allocation will fail", + "Means that the first and the third attempted allocation will fail", 1, 1 ) CLI_CMD(DEBUG_XID, From guillaume at varnish-software.com Thu Jan 30 23:14:06 2020 From: guillaume at varnish-software.com (Guillaume Quintard) Date: Thu, 30 Jan 2020 23:14:06 +0000 (UTC) Subject: [master] 30453b949 [cci] centos:8 support Message-ID: <20200130231406.97006AEF78@lists.varnish-cache.org> commit 30453b94901d3ccaa2230dc0a9a477fbcb7c92af Author: Guillaume Quintard Date: Wed Jan 29 16:07:19 2020 -0800 [cci] centos:8 support diff --git a/.circleci/config.yml b/.circleci/config.yml index 81253d7cd..de6444d6a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,38 +7,13 @@ parameters: pkg-commit: type: string default: "weekly" -commands: - debian_install_build_deps: - description: Install build dependencies - steps: - - run: - name: Install build dependencies - command: | - export DEBIAN_FRONTEND=noninteractive - export DEBCONF_NONINTERACTIVE_SEEN=true - apt-get update - apt-get install -y \ - autoconf \ - automake \ - build-essential \ - ca-certificates \ - git \ - graphviz \ - libconfig-dev \ - libedit-dev \ - libjemalloc-dev \ - libncurses-dev \ - libpcre3-dev \ - libtool \ - libunwind-dev \ - pkg-config \ - python3-sphinx \ - sudo - centos_install_build_deps: - description: Install build dependencies +jobs: + dist: + docker: + - image: centos:7 steps: - run: - name: Install build dependencies + name: Install deps command: | yum install -y epel-release yum install -y \ @@ -56,35 +31,6 @@ commands: python3 \ python-sphinx \ sudo - alpine_install_build_deps: - description: Install build dependencies - steps: - - run: - name: Install build dependencies - command: | - apk update - apk add -q \ - autoconf \ - automake \ - build-base \ - ca-certificates \ - gzip \ - libconfig-dev \ - libedit-dev \ - libtool \ - libunwind-dev \ - linux-headers \ - pcre-dev \ - py-docutils \ - py3-sphinx \ - tar \ - sudo -jobs: - dist: - docker: - - image: centos:7 - steps: - - centos_install_build_deps - checkout - run: name: Create the dist tarball @@ -146,7 +92,70 @@ jobs: - image: << parameters.dist >>:<< parameters.release >> working_directory: /workspace steps: - - << parameters.dist >>_install_build_deps + - run: + name: Possibly activate centos:8 extra repos + command: | + if [ << parameters.dist >> = centos ]; then + if [ << parameters.release >> = 8 ]; then + dnf install -y 'dnf-command(config-manager)' + yum config-manager --set-enabled PowerTools + yum install -y diffutils python3-sphinx + else + yum install -y python-sphinx + fi + yum install -y epel-release + yum install -y \ + automake \ + jemalloc-devel \ + libconfig-devel \ + libcurl-devel \ + libedit-devel \ + libtool \ + libunwind-devel \ + make \ + openssh-clients \ + pcre-devel \ + python3 \ + sudo + elif [ << parameters.dist >> = debian -o << parameters.dist >> = ubuntu ]; then + export DEBIAN_FRONTEND=noninteractive + export DEBCONF_NONINTERACTIVE_SEEN=true + apt-get update + apt-get install -y \ + autoconf \ + automake \ + build-essential \ + ca-certificates \ + graphviz \ + libconfig-dev \ + libedit-dev \ + libjemalloc-dev \ + libncurses-dev \ + libpcre3-dev \ + libtool \ + libunwind-dev \ + pkg-config \ + python3-sphinx \ + sudo + elif [ << parameters.dist >> = alpine ]; then + apk update + apk add -q \ + autoconf \ + automake \ + build-base \ + ca-certificates \ + gzip \ + libconfig-dev \ + libedit-dev \ + libtool \ + libunwind-dev \ + linux-headers \ + pcre-dev \ + py-docutils \ + py3-sphinx \ + tar \ + sudo + fi - attach_workspace: at: /workspace - run: @@ -285,9 +294,14 @@ jobs: paths: - debs/varnish*.deb - debs/varnish*.dsc - build_centos_7: + build_rpms: + parameters: + release: + description: the Centos version (7|8) + type: string + description: Build Centos << parameters.release >> rpms docker: - - image: centos:7 + - image: centos:<< parameters.release >> environment: DIST_DIR: build DIST: el7 @@ -318,6 +332,9 @@ jobs: set -e set -u + if [ << parameters.release >> = 8 ]; then + yum config-manager --set-enabled PowerTools + fi # use python3 sed -i '1 i\%global __python %{__python3}' "$DIST_DIR"/redhat/varnish.spec if [ -e .is_weekly ]; then @@ -399,7 +416,13 @@ workflows: dist: ubuntu release: bionic <<: *pkg_req - - build_centos_7: + - build_rpms: + name: build_centos_7 + release: "7" + <<: *pkg_req + - build_rpms: + name: build_centos_8 + release: "8" <<: *pkg_req - build_apks: name: build_alpine @@ -411,6 +434,7 @@ workflows: - build_ubuntu_xenial - build_ubuntu_bionic - build_centos_7 + - build_centos_8 - build_alpine - distcheck: name: distcheck_centos_7 @@ -418,6 +442,12 @@ workflows: release: "7" requires: - dist + - distcheck: + name: distcheck_centos_8 + dist: centos + release: "8" + requires: + - dist - distcheck: name: distcheck_debian_buster dist: debian From dridi.boukelmoune at gmail.com Fri Jan 31 15:55:06 2020 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Fri, 31 Jan 2020 15:55:06 +0000 (UTC) Subject: [master] 31252f808 Typo followup Message-ID: <20200131155506.8F9609B09D@lists.varnish-cache.org> commit 31252f808c58b6d18e34f05e3c33957ac064b210 Author: Dridi Boukelmoune Date: Fri Jan 31 16:50:39 2020 +0100 Typo followup Looking at 3ec9b582cc2b I realized that this single sentence was packed with mistakes: allocation should also have been plural and it wasn't the third but fourth allocation that would fail (and of course the frist typo). diff --git a/include/tbl/cli_cmds.h b/include/tbl/cli_cmds.h index 438019f43..84b600f80 100644 --- a/include/tbl/cli_cmds.h +++ b/include/tbl/cli_cmds.h @@ -330,8 +330,9 @@ CLI_CMD(DEBUG_REQPOOLFAIL, "debug.reqpool.fail", "Schedule req-pool failures.", "The argument is read L-R and 'f' means fail:\n\n" - "\tparam.set debug.reqpoolfail F__F\n\n" - "Means that the first and the third attempted allocation will fail", + "\tparam.set debug.reqpoolfail F__F_F\n\n" + "In the example above the first, fourth and sixth attempted\n" + "allocations will fail.", 1, 1 ) CLI_CMD(DEBUG_XID,