1. 17 Aug, 2021 12 commits
    • Dridi Boukelmoune's avatar
      req: Prevent early rollback · 0632b846
      Dridi Boukelmoune authored
      After a cleanup we may still use the request's workspace, so the final
      rollback should instead happen at release time before we give the memory
      back to the pool.
      0632b846
    • Dridi Boukelmoune's avatar
      panic: Optionally track miniobjs · 0b32af6d
      Dridi Boukelmoune authored
      PAN_dump_struct2() is now renamed to PAN__DumpStruct() following the
      guidelines from apispaces.rst in addition to growing a track argument.
      This should allow dumping structures that we know ought to be dumped
      only once, in case they would be numerous.
      
      There seems to be no good reason to expose it to VMODs yet since they
      have no integration point with the panic output, so those definitions
      can be confined in cache_varnishd.h for now.
      
      Better diff with the --ignore-all-space option.
      0b32af6d
    • Dridi Boukelmoune's avatar
      wrk: Track workers to dump them during a panic · 3fc78478
      Dridi Boukelmoune authored
      In the most common case of a VCL transaction panicking this should only
      result in an extra "Already dumped, see above" message, but it may give
      more insights for other kinds of tasks.
      3fc78478
    • Dridi Boukelmoune's avatar
      ws: New WS_Dump() facility · 343e680a
      Dridi Boukelmoune authored
      Getting rid of the very last direct access inside struct ws from
      vmod_vtc.
      343e680a
    • Dridi Boukelmoune's avatar
      vca: Prevent conceptual workspace use-after-release · 1d140b1a
      Dridi Boukelmoune authored
      Releasing a reservation or rolling back too early is harmless as long as
      nothing is allocated on the workspace that could overwrite its contents.
      
      Once you swap the workspace in its current form with a different kind of
      allocator it can turn into effective use-after-free, if rolled back or
      released state doesn't linger.
      1d140b1a
    • Dridi Boukelmoune's avatar
      ws: Reserve the requested size · 94337ba5
      Dridi Boukelmoune authored
      Instead of guaranteeing the pointer alignment of ws->r at the expense of
      sometimes reserving more than requested, we can instead drop the pointer
      alignment requirement since that does not refer to the beginning of the
      allocation.
      
      Instead, it is in WS_Release() that we guarantee that the ws->f remains
      aligned for the next allocation. And WS_Release() already did that so we
      might as well avoid the potential overcommit from WS_ReserveSize().
      
      This is going to be helpful for a workspace emulator, to make sure that
      the alignment overhead wouldn't allow off-by-little overflows to sneak
      past the address sanitizer. This very change was initially made for a
      workspace sanitizer.
      
      It is also a good occasion to make the relevant checks around the ws->r
      pointer in WS_Assert().
      
      This change is visible in r03131.vtc that now exhibits this behavior.
      
      Refs #3320
      94337ba5
    • Dridi Boukelmoune's avatar
      ws: Forbid zero-length allocations · 4c9e068d
      Dridi Boukelmoune authored
      Not even failing to allocate, but outright panicking.
      4c9e068d
    • Dridi Boukelmoune's avatar
      ws: Remove deprecated WS_Front() · 46d9e79e
      Dridi Boukelmoune authored
      46d9e79e
    • Dridi Boukelmoune's avatar
      ws: Replace WS_Inside() with WS_Allocated() · fd72157c
      Dridi Boukelmoune authored
      It was unfit for purpose anyway, since it would allow contents past the
      front pointer to be referenced. What we are really looking for where
      WS_Inside() was used is actual allocations. WS_Assert_Allocated() was
      made redundant by this change.
      
      Refs #3320
      fd72157c
    • Poul-Henning Kamp's avatar
      Keep FlexeLint happy · 40471b96
      Poul-Henning Kamp authored
      40471b96
    • Poul-Henning Kamp's avatar
    • Asad Sajjad Ahmed's avatar
      328540c6
  2. 16 Aug, 2021 3 commits
  3. 12 Aug, 2021 6 commits
  4. 10 Aug, 2021 7 commits
  5. 09 Aug, 2021 3 commits
    • Dridi Boukelmoune's avatar
      waiter: Adjust assertion based on usage · a33ea401
      Dridi Boukelmoune authored
      This looks like a copy-pasta or autocomplete mistake.
      a33ea401
    • Pål Hermunn Johansen's avatar
      Increase vsl_buffer and workspaces · 88698015
      Pål Hermunn Johansen authored
      On many busy production systems, the VSL buffer for transactions often
      fills up, triggering a flush to the VSM. If such a transaction takes a
      long time, it can happen that the flushed data is overwritten before
      the whole transaction completes. The result is that these transactions
      are missed by varnishncsa and other tools. Increasing the vsl_buffer
      does the trick, at some cost in workspace usage.
      
      The cost implies that one should increase the workspaces, too. Since
      the old defaults of 64k each are too low for many common use cases
      today, it is natural to increse everything in one patch.
      
      Some test cases have been updated. These are all cases where the
      workspaces have been set very low, and to make sure we are still
      testing the same regression, the vsl_buffer has been set to the old
      default instead of increasing the workspace.
      88698015
    • Dridi Boukelmoune's avatar
      vrt: Missing assertion · 1e190348
      Dridi Boukelmoune authored
      Spotted by flexelint.
      1e190348
  6. 06 Aug, 2021 4 commits
  7. 04 Aug, 2021 2 commits
  8. 03 Aug, 2021 3 commits