- 02 Jul, 2018 5 commits
-
-
Pål Hermunn Johansen authored
-
Pål Hermunn Johansen authored
The main point is to clearly recomend using req.grace for the most common use case - using different grace time when the backend is healthy.
-
Pål Hermunn Johansen authored
Right now there are use cases that cannot be solved without req.ttl, so we undeprecate it.
-
Pål Hermunn Johansen authored
The req.grace variable can be set in vcl_recv to cap the grace of objects in the cache, in the same way as in 3.0.x The "keep" behavior changes with this patch. We now always go to vcl_miss when the expired object is out of grace, or we go to the waiting list. The result is that it is no longer possible to deliver a "keep" object in vcl_hit. Note that when we get to vcl_miss, we will still have the 304 candidate, but without the detour by vcl_hit. This commit changes VCL, but only slightly, so we aim to back port this to earlier versions of Varnish Cache. Refs: #1799 and #2519
-
Geoff Simmons authored
address family is neither of AF_INET or AF_INET6. This means that UNKNOWN is sent in probes to UDS backends when .proxy_header=1 is set. Also verify that a UDS backend receives PROXY LOCAL in a probe when .proxy_header=2 is set. Fixes #2702 Closes #2726
-
- 29 Jun, 2018 1 commit
-
-
Dag Haavi Finstad authored
Since we verify that header blocks are not interleaved, and we zero the struct h2h_decode on every new header block, there is no need to malloc a separate struct h2h_decode per stream.
-
- 28 Jun, 2018 5 commits
-
-
Nils Goroll authored
For (real) backends, we used to assign the probe after adding the director via VRT_AddDirector(). For an already warm vcl, this lead to a VCL_WARM event missed because the event was issued by VRT_AddDirector() when the probe did not exist yet. We fix this by preparing all of the backend before adding the director, undoing the work for a failure doing do. In addition, if adding a backend while the vcl is cold, we need to set the initial director state based on the probe configuration after adding the director. We avoid the overhead of the vcl temperature lock because no harm is done: If, after the director was added, the temperature goes cold, we just run an additional update, and if it goes warm, the update will already have happened. Likely related to https://github.com/nigoroll/libvmod-dynamic/issues/35
-
Nils Goroll authored
... to make the next commit more readable
-
Nils Goroll authored
To get out of a catch-22, see second next commit
-
Nils Goroll authored
... not in the caller
-
Nils Goroll authored
-
- 27 Jun, 2018 2 commits
-
-
Dag Haavi Finstad authored
Future-proofing to avoid mistakenly introducing another race down the line.
-
Dag Haavi Finstad authored
The current flow control code's use of h2->cond is racy. h2->cond is already used for handing over a DATA frame to a stream thread. In the event that we have both streams waiting on this condvar for window updates and at the same time the rxthread gets signaled for a DATA frame, we could end up waking up the wrong thread and the rxthread gets stuck forever. This commit addresses this by using a separate condvar for window updates. An alternative would be to always issue a broadcast on h2->cond instead of signal, but I found this approach much cleaner. Probably fixes: #2623
-
- 26 Jun, 2018 5 commits
-
-
Nils Goroll authored
Turn the director destruction inside-out: When the vmod object goes out of scope, we inform VRT that the director is to be destroyed. Actual destruction is moved to the respective director callback. This allows directors to outlast vmod objects. For vdir based directors, the director object is the vmod object; for shard, the two are different instances (we might want to reconsider changing this later).
-
Nils Goroll authored
-
Nils Goroll authored
-
Nils Goroll authored
Prepare for use of the shard director as a dynamic backend, where the VCL_BACKEND can outlast the vmod object: * the director priv now points to the struct sharddir instead of the vmod object * move the default parameters pointer to struct sharddir * index the PRIV_TASK by the struct sharddir pointer
-
Nils Goroll authored
-
- 25 Jun, 2018 1 commit
-
-
Nils Goroll authored
For ban statistics, we updated VSC_C_main directly, so if we raced Pool_Sumstat(), that could undo our changes. This patch fixes statistics by using the per-worker statistics cache except for the following remaining corner cases: * bans_persisted_* counters receive absolut updates, which does not seem to fit the incremental updates via the per-worker stats. I've kept these cases untouched and marked with comments. Worst that should happen here are temporary inconsistencies until the next absolute update. * For BAN_Reload(), my understanding is that it should only happen during init, so we continue to update VSC_C_main directly. * For bans via the cli, we would need to grab the wstat lock, which, at the moment, is private to the worker implementation. Until we make a change here, we could miss a ban increment from the cli. * for VCL bans from vcl_init / fini, we do not have access to the worker struct at the moment, so for now we also accept an inconsistency here. Fixes #2716 for relevant cases
-
- 23 Jun, 2018 1 commit
-
-
Federico G. Schwindt authored
A bound socket will timeout instead of refusing the connection. Should fix b00015.vtc under macos.
-
- 22 Jun, 2018 2 commits
-
-
Dag Haavi Finstad authored
The previous commit made the assumption that END_STREAM is in the last of the frames in a header block. This is not necessarily the case.
-
Dag Haavi Finstad authored
Previously we've been incorrectly transtitioning to CLOS_REM on END_HEADERS, which prevents us from seeing if a client incorrectly transmitted a DATA frame on a closed stream. This slightly complicates things in that we can now be in state OPEN with an inactive hpack decoding state, and we need to make sure on cleanup if that has already been finalized. This would be simpler if the h/2 spec had split the OPEN state in two parts, with an extra state transition on END_HEADERS. Again big thanks to @xcir for his help in diagnosing this. Fixes: #2623
-
- 21 Jun, 2018 1 commit
-
-
Dag Haavi Finstad authored
This approach opens up to a data race. This reverts commit c8bfae70.
-
- 20 Jun, 2018 1 commit
-
-
Federico G. Schwindt authored
Should help with the ASAN builds in travis.
-
- 19 Jun, 2018 1 commit
-
-
Dag Haavi Finstad authored
If a client mistakenly sent a DATA frame on a stream where it already transmitted an END_STREAM, it would lead to the rxthread sitting around indefinitely. Big thanks to @xcir for his help in diagnosing this. Fixes: #2623
-
- 18 Jun, 2018 2 commits
-
-
Federico G. Schwindt authored
Should address #2666 and #2711.
-
Poul-Henning Kamp authored
-
- 15 Jun, 2018 3 commits
-
-
Dag Haavi Finstad authored
Tune down h2_rx_window_low_water to make sure we don't get a window_update racing against the response frames. Fixes: #2709
-
Dag Haavi Finstad authored
-
Dag Haavi Finstad authored
If we failed to schedule a thread for a stream and it's not cleaned up prior to handling a request body, the rxthread would sit around waiting in h2_rx_data indefinitely.
-
- 14 Jun, 2018 3 commits
-
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
the backend might be going away, and since we cannot afford to hold the lock over VTP_Open(), we have to pull the VBE_vsc knowledge one level back up. Overlooked by: slink, phk Spotted by: Coverity
-
Poul-Henning Kamp authored
termination of the rxbuf. Found by: fgs
-
- 13 Jun, 2018 4 commits
-
-
Lucas Guardalben authored
This adds -j support to the command varnishadm ping -j Tested on RFC4627/RFC7159/ECMA404 standards (all valid JSON)
-
Poul-Henning Kamp authored
Found by: fgs & ASAN
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
-
- 12 Jun, 2018 2 commits
-
-
Poul-Henning Kamp authored
-
Dag Haavi Finstad authored
-
- 11 Jun, 2018 1 commit
-
-
Martin Blix Grydeland authored
Previous fix for #2285 (and the duplicate #2624) was missdiagnosed. The problem stems from a wrong assumption that the number of bytes already pipelined will be less than maxbytes, with maxbytes beeing the maximum number of bytes the HTC_RxStuff may need to get a full work unit. That assumption may fail during the H/1 to H/2 upgrade path where maxbytes change with the context, or during runtime changing of parameters. This patch makes HTC_RxStuff not assert if the pipelined data turned out to exceed maxbytes, but return overflow if we run out of workspace. (#2624 has received a workaround in the H/2 code that perhaps should be reverted).
-