1. 01 Mar, 2024 13 commits
  2. 28 Feb, 2024 1 commit
    • Dridi Boukelmoune's avatar
      vtc: Coverage for withdrawn bgfetch · 3eeb8c4f
      Dridi Boukelmoune authored
      This adds coverage for a non-delivery transition from vcl_hit, where the
      busy objcore would drop its sole reference in the event of a grace hit.
      The lack of coverage was visible in the gcov dashboard:
      
          669   580   if (busy != NULL) {
          670   0     	(void)HSH_DerefObjCore(wrk, &busy, 0);
          671   0     	VRY_Clear(req);
          672   0     }
      
      There should now be at least one pass inside this block.
      
      Refs #4032
      3eeb8c4f
  3. 26 Feb, 2024 3 commits
  4. 19 Feb, 2024 3 commits
    • Nils Goroll's avatar
      Move decision on fetch_chunksize to the storage engine · d77da13b
      Nils Goroll authored
      For chunked encoding, we do not know how big the object is ultimately
      going to be, so VFP_GetStorage() called ObjGetSpace() with the
      fetch_chunksize parameter in this case.
      
      Yet which size is best might differ for different storage engines, and
      having the information that the caller does not know the final size
      might be relevant. Storage engines could guess that if a request came
      in for fetch_chunksize that this _might_ be the "chunked" case, but
      that heuristic would be wrong for Objects of just that size advertised
      via Content-Length.
      
      So this patch takes the guesswork out of the game by just passing the
      magic 0 value down to the storage engine to mean "give me some good
      chunk of bytes, I do not know how much I am going to need".
      d77da13b
    • Asad Sajjad Ahmed's avatar
      varnishd: kill the killlist · 8cbb4d1e
      Asad Sajjad Ahmed authored
      Since, we seems to not use it at all.
      Signed-off-by: 's avatarAsad Sajjad Ahmed <asadsa@varnish-software.com>
      8cbb4d1e
    • Poul-Henning Kamp's avatar
      Flexelinting · 2921ac50
      Poul-Henning Kamp authored
      2921ac50
  5. 15 Feb, 2024 1 commit
  6. 14 Feb, 2024 1 commit
  7. 13 Feb, 2024 3 commits
    • Dridi Boukelmoune's avatar
      v1f: Log a useful HTC status · 223847ea
      Dridi Boukelmoune authored
      Instead of adding hoops to the documentation, in particular to keep it
      in sync, improve the only location where we emit HTC status logs.
      
      We could also consider replacing the HTC enum with a struct, similar to
      what we did in other places. The struct symbols would be named after the
      UPPER name from the table, have a name and description fields, possibly
      replace the error number with a simple is_err field.
      
      Capturing the long description like this is less intrusive.
      
      Refs #4042
      223847ea
    • Dridi Boukelmoune's avatar
      7536a402
    • Dridi Boukelmoune's avatar
      v1l: restore errno on error · f364fa30
      Dridi Boukelmoune authored
      Spotted by Darryl Rodden.
      f364fa30
  8. 07 Feb, 2024 2 commits
  9. 05 Feb, 2024 6 commits
    • Nils Goroll's avatar
      Avoid deadlock in VRT_AddDirector() when VCL is going cold · f3575e38
      Nils Goroll authored
      If VRT_AddDirector() was called from handling a VCL_COLD event or,
      indirectly, from another thread which the VCL_COLD event handler was
      waiting for, varnishd would deadlock and prevent any CLI or director
      changes, because VRT_AddDirector() requires the vcl_mtx, which is held
      during vcl_BackendEvent() to ensure a consistent view of the director
      list. Because of the early return from VRT_AddDirector() this likely
      only happened in VTC mode, but the underlying race existed
      nevertheless.
      
      This patch _almost_ fixes the issue with the intend of making it
      highly unlikely to occur without getting too involved with the vcl
      temperature controls: We now check the same conditions under which
      vcl_set_state() would transition the temperature to COOLING and, if
      they apply, use Lck_Trylock() in a try/wait loop instead of
      Lck_Lock(), avoiding the deadlock.
      
      The patch presumably still does not fix the problem entirely, because
      the reads of vcl->busy and vcl->temp before the Lck_Trylock() could
      still be outdated. With the temperature controls otherwise unchanged,
      the only alternative idea I could come up with was to always use a
      try/wait loop, which I dismissed due to the performance impact
      (overhead and added latency).
      
      Ref https://github.com/nigoroll/libvmod-dynamic/issues/110
      f3575e38
    • Dridi Boukelmoune's avatar
      v1p: Use VTIM_poll_tmo() · 17fa3865
      Dridi Boukelmoune authored
      Otherwise poll(2) returns EINVAL on FreeBSD when both pipe_timeout and
      pipe_task_deadline are disabled.
      
      Fixes #4043
      17fa3865
    • Dridi Boukelmoune's avatar
      33e69f02
    • Dridi Boukelmoune's avatar
      vtim: New VTIM_poll_tmo() converter · f383b5c3
      Dridi Boukelmoune authored
      It takes a vtim_dur and returns a number of milliseconds. NAN means no
      timeout and negative values are considered expired deadlines and get a
      chance to succeed a non-blocking poll.
      f383b5c3
    • Dridi Boukelmoune's avatar
      vtc: Increase stack size for 32bit systems in e29 · 8d956aec
      Dridi Boukelmoune authored
      This test case has been failing for a while in continuous integration
      and trying to bisect the change that triggered a stack overflow for our
      Ubuntu 18.04 job I wasn't able to make it pass, even for the commit
      where it first landed.
      
      Something must have happened outside of Varnish to consume more stack.
      8d956aec
    • Dridi Boukelmoune's avatar
      vrt_var: Make bereq.task_deadline unset-able · 1ff0c0f4
      Dridi Boukelmoune authored
      The other timeouts should eventually become unset-able as well, where
      an unset variable falls back to a parameter and zero means no timeout,
      overriding the fallback parameter.
      
      Refs #4043
      1ff0c0f4
  10. 01 Feb, 2024 1 commit
  11. 31 Jan, 2024 6 commits