1. 27 Jan, 2020 7 commits
    • Nils Goroll's avatar
      reduce workspace load on the parameter canary vtc · f47afac0
      Nils Goroll authored
      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.
      f47afac0
    • Nils Goroll's avatar
      Add a strands interface to VSL and use it for std.log · 598b13d7
      Nils Goroll authored
      Since 8baf4a69 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
      598b13d7
    • Nils Goroll's avatar
      rename vcl_get() -> VCL_Update() · d3c50d04
      Nils Goroll authored
      note: no change to vrt.h, this is a private interface between vcl and
      vrt_vcl/vpi.
      d3c50d04
    • Nils Goroll's avatar
      integrate the VCL_Rel() step into vcl_get() · 82eb7693
      Nils Goroll authored
      ... 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.
      82eb7693
    • Nils Goroll's avatar
      assert that the destination pointer for vcl_get be zero · 14ea7ff2
      Nils Goroll authored
      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)
      14ea7ff2
    • Nils Goroll's avatar
      attempt to stabilize c00040.vtc (for travis arm tests) · 0867bb1a
      Nils Goroll authored
      We should not consider an early close of the backend connection a
      failure of the test, this vtc is not concerned with bodies.
      0867bb1a
    • Poul-Henning Kamp's avatar
  2. 23 Jan, 2020 1 commit
  3. 21 Jan, 2020 5 commits
  4. 20 Jan, 2020 6 commits
  5. 18 Jan, 2020 2 commits
    • Nils Goroll's avatar
      fix missing initialization · b99c0bed
      Nils Goroll authored
      ... introduced with 3bb8b84c:
      
      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
      b99c0bed
    • Nils Goroll's avatar
      fix vcl temperature panic output · a06095da
      Nils Goroll authored
      When we turned the vcl temperatures into a struct, we overlooked this
      statement because of the cast.
      
      Noticed when staring at #3192
      a06095da
  6. 17 Jan, 2020 3 commits
    • Nils Goroll's avatar
      TAKE_OBJ_NOTNULLification: cases with the first AN(objp) missing · 65cd2e05
      Nils Goroll authored
      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
      65cd2e05
    • Nils Goroll's avatar
      more TAKE_OBJ_NOTNULLification · 7ce983ec
      Nils Goroll authored
      command:
      
      spatch -I include/ -I bin/varnishd/ --dir . --in-place \
      	--sp-file tools/coccinelle/take_obj_notnull.cocci
      7ce983ec
    • Dridi Boukelmoune's avatar
      Stabilize s10, again · 4fe88185
      Dridi Boukelmoune authored
      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.
      4fe88185
  7. 16 Jan, 2020 8 commits
    • Nils Goroll's avatar
      s00010: try a slight variation · 55ef8e00
      Nils Goroll authored
      when we stall sending on the backend side, we _have_ to run into a
      timeout on the client side, haven't we?
      55ef8e00
    • Nils Goroll's avatar
      even more session overflow test tweaking · f5985938
      Nils Goroll authored
      and enable debug output for better failure analysis
      f5985938
    • Nils Goroll's avatar
      even more s00010.vtc tweaking · 66b27ae1
      Nils Goroll authored
      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.
      66b27ae1
    • Nils Goroll's avatar
      more numbers fiddling · 3d4bb424
      Nils Goroll authored
      we need a way for vtc to reach into session setup I guess
      3d4bb424
    • Nils Goroll's avatar
      s00010.vtc: lower pressure from timeout handling · 5b90890f
      Nils Goroll authored
      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
      5b90890f
    • Nils Goroll's avatar
      83b238ed
    • Nils Goroll's avatar
      panic handling can take a couple seconds · e733fce8
      Nils Goroll authored
      e733fce8
    • Nils Goroll's avatar
      bump default workspace_session · 0f3bb354
      Nils Goroll authored
      02bc0a68 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.
      0f3bb354
  8. 15 Jan, 2020 8 commits