1. 18 Jan, 2021 20 commits
    • Dridi Boukelmoune's avatar
      vut: Whitespace OCD · d85bd6fc
      Dridi Boukelmoune authored
      d85bd6fc
    • Dridi Boukelmoune's avatar
      vsm: Remove stale comment · d054a37a
      Dridi Boukelmoune authored
      d054a37a
    • Dridi Boukelmoune's avatar
      vut: Print the diagnostics of VSL cursor failures · 28eaeb90
      Dridi Boukelmoune authored
      But paced, because they may repeat in a semi-tight loop.
      28eaeb90
    • Dridi Boukelmoune's avatar
      cea4eb2d
    • Dridi Boukelmoune's avatar
      vsl: Only collect candidate transactions · 8a9610c8
      Dridi Boukelmoune authored
      For high-throughput scenarios we might be collecting irrelevant
      transactions, especially sessions that are never buffered, and
      drastically increase the risk of overruns with long-running
      sessions (typically when varnishd is behind a load balancer or
      a TLS terminator that we can entrust with high client connection
      reuse).
      
      The -b and -c options have an effect on the output, which is way
      too late for such a setup. These options primarily work with the
      MSB backend and client markers but that is not enough to rule out
      sessions since they are marked as client transactions. The same
      goes for incomplete transactions for which we are lacking a Begin
      tag, that would still be ruled out at the output stage.
      
      We also need to collect irrelevant transactions for the sake of
      grouping, because even when we do not wish to output them we have
      to maintain the hierarchy.
      
      Therefore, we can identify candidate transactions early and not
      waste memory footprint and churn keeping track of transactions
      that would have no effect besides increasing the risk of overruns.
      8a9610c8
    • Dridi Boukelmoune's avatar
      ae72e904
    • Dridi Boukelmoune's avatar
      varnishncsa: -E implies -c · 1000b772
      Dridi Boukelmoune authored
      Otherwise the combination of -E and -b only outputs backend requests.
      1000b772
    • Nils Goroll's avatar
    • Nils Goroll's avatar
      add a VRT_CTX argument to the vmod_priv fini function · 43d9e5fb
      Nils Goroll authored
      we take the chance of the breaking change in
      681c1199 to also add a VRT_CTX
      argument to vmod_priv_fini_f. This allows a vmod_priv fini function,
      for example, access to the request or simpler and better logging
      (because the task's vsl buffer can be used where otherwise only
      unbuffered vsl was possible).
      
          Implementation:
      
      The meat of this commit really only is the change to the
      vmod_priv_fini_f typedef and VRT_priv_fini().
      
      All other changes are either to bundled vmods or the straight forward
      infrastructure to make available a ctx to VRT_priv_fini(), which, for
      client and backend context, is called via VCL_TaskLeave().
      
      Consequently, it made sense to also change the signature
      Req_Rollback() and Bereq_Rollback().
      43d9e5fb
    • Nils Goroll's avatar
      Avoid panic with PRIV_TOP arguments · d0db4c97
      Nils Goroll authored
      Instead of triggering a WRONG() panic, we now fail the VCL when any vmod
      function with PRIV_TOP argument(s) is present in a sub called from
      outside client context.
      
      Note that the VCL failure happens not when the vmod function with the
      PRIV_TOP argument is called, but rather when the containing SUB is
      called. This is because we prepare PRIV_TOP arguments in the function
      preamble.
      
      Fixes #3498
      d0db4c97
    • Nils Goroll's avatar
      s:NULL backend:None backend: · 35cadf11
      Nils Goroll authored
      35cadf11
    • Nils Goroll's avatar
      shard director: coverage · 59d4d33f
      Nils Goroll authored
      59d4d33f
    • Nils Goroll's avatar
      shard director: Use VRT_priv_task_get() properly · e7b720ea
      Nils Goroll authored
      This is how 08b642d7 should have looked
      like.
      e7b720ea
    • Nils Goroll's avatar
      shard director: Fix regression from 08b642d7 · d1ef9b9b
      Nils Goroll authored
      and add vtc code to avoid it from happening again.
      
      The mentioned commit lead to resolve=NOW modify the shard's parameter
      PRIV_TASK when only parameters on the stack should have been modified.
      
      We will adjust this to use shard_param_task_r() in a follow-up
      
      Spotted thanks to Coverity, ref CID 1472212
      d1ef9b9b
    • Nils Goroll's avatar
      shard director: handle nested workspace overflow · c2beacdf
      Nils Goroll authored
      Propagate upwards any workspace allocation failure of the
      recursive shard_param_task_l() case.
      c2beacdf
    • Nils Goroll's avatar
      shard director: improve assertions on parameters · 33ceb67d
      Nils Goroll authored
      We use shard_param_task_{r,l} on (struct sharddir *) and (struct
      vmod_directors_shard_param *), so the id parameter is (const void *).
      Yet we still want to make sure that we always retrieve the intended
      PRIV_TASK, and we can by simply asserting that the vcl_name attribute
      matches.
      
      Note that a simple pointer comparison is sufficient here because,
      unltimately, the PRIV_TASK vcl_name is always that of a vmod object,
      assigned by the constructor.
      
      This brings back the "who" parameter from
      9ea2f29f, but used differently.
      33ceb67d
    • Nils Goroll's avatar
      cc42bac5
    • Dridi Boukelmoune's avatar
      vsl: Give up when it's too late to buffer records · 729e69be
      Dridi Boukelmoune authored
      When a VUT is slow enough, it might very well be overrun while it is
      scanning logs. For our built-in VUTs like varnishncsa or varnishlog
      this can happen if writing the output can block waiting for IO ops
      or when the output is piped to a slow consumer.
      729e69be
    • Dridi Boukelmoune's avatar
      vsl: Kill dead check · eba8c51d
      Dridi Boukelmoune authored
      There's only one call site for vtx_dispatch() and it guarantees that len
      is greater than zero.
      eba8c51d
    • Asad Sajjad Ahmed's avatar
      varnishncsa: log request time in milliseconds · 23693c4c
      Asad Sajjad Ahmed authored
      Allow the user to log the request time in milliseconds through the new
      format specifier: %{ms}T .
      Signed-off-by: 's avatarAsad Sajjad Ahmed <asadsa@varnish-software.com>
      23693c4c
  2. 17 Jan, 2021 1 commit
  3. 16 Jan, 2021 6 commits
  4. 15 Jan, 2021 10 commits
  5. 14 Jan, 2021 3 commits