1. 26 Nov, 2018 2 commits
    • Dag Haavi Finstad's avatar
      Add VSL rate limiting · b2b04a61
      Dag Haavi Finstad authored
      This adds rate limiting to varnishncsa and varnishlog.
      
      Rate limiting is done on a per-transaction basis, respective to the
      grouping mode selected. I.e. for -g request the limit will apply on a
      per-request basis, -g raw on a per-record basis, etc.
      
      Rate limit is specified as -R <limit>[/duration]. Default period if not
      specified is seconds ('s').
      b2b04a61
    • Dag Haavi Finstad's avatar
      Fix VRT_fail for 'if'/'elseif' conditional expressions · 05f3ee5e
      Dag Haavi Finstad authored
      This adds a ctx->handling test at the beginning of any compound
      statement, to catch the cases where VRT_fail was invoked as part of an
      if test condition.
      
      Fixes: #2840
      05f3ee5e
  2. 24 Nov, 2018 1 commit
    • Dridi Boukelmoune's avatar
      More double to vtim_* conversions · 2bd3cea0
      Dridi Boukelmoune authored
      This may break out of tree code not respecting include order of vdef.h
      first (or via cache/cache.h). It's trivial to fix and forces consumers
      to follow the tracks.
      
      Refs #2791
      2bd3cea0
  3. 22 Nov, 2018 5 commits
    • Nils Goroll's avatar
      Fix regression from 6bead571 · f3e9c54c
      Nils Goroll authored
      Seen once, and failed to reprocuce (yet), needs to be understood
      better
      
      from vmod_blobdigest tests/usage.vtc:
      
      **** v1    1.8 CLI RX|No panic to clear
      ***  v1    1.8 debug|Info: manager stopping child
      ***  v1    1.8 debug|Debug: Stopping Child
      **** v1    1.9 vsl|          0 CLI             - EOF on CLI connection, worker stops
      ***  v1    2.8 debug|Info: Child (174227) ended
      ***  v1    2.8 debug|Info: Child (174227) said Child dies
      ***  v1    2.8 debug|Debug: Child cleanup complete
      ***  v1    2.8 debug|Assert error in MCH_TrackHighFd(), mgt/mgt_child.c line 203:
      ***  v1    2.8 debug|  Condition(fd > 0) not true.
      **** v1    2.9 STDOUT poll 0x10
      **   v1    2.9 WAIT4 pid=174215 status=0x0086 (user 0.914949 sys 0.567445)
      *    v1    2.9 Expected exit: 0x0 signal: 0 core: 0
      ---- v1    2.9 Bad exit status: 0x0086 exit 0x0 signal 6 core 128
      *    top   2.9 failure during reset
      f3e9c54c
    • Nils Goroll's avatar
      fix the missing high fd tracking · 6bead571
      Nils Goroll authored
      6bead571
    • Nils Goroll's avatar
      Gain more confidence that our file descriptor tracking works · 1be6ad1d
      Nils Goroll authored
      Side note
      
      	#define CLOSE_FD_UP_TO	mgt_max_fd
      
      exposes that we are currently missing to track some fds.
      1be6ad1d
    • Nils Goroll's avatar
      fix insignificant off-by-one in child file descriptor close code · 76773e7c
      Nils Goroll authored
      The name CLOSE_FD_UP_TO implies that the value is included.
      
      Also this is the semantics of MCH_TrackHighFd() and relevant for
       #define CLOSE_FD_UP_TO mgt_max_fd
      76773e7c
    • Nils Goroll's avatar
  4. 21 Nov, 2018 1 commit
  5. 19 Nov, 2018 11 commits
  6. 17 Nov, 2018 6 commits
  7. 15 Nov, 2018 1 commit
    • Nils Goroll's avatar
      work around older libedit which fails to append rl_completion_append_character · 5765c9f8
      Nils Goroll authored
      I failed to find any issue in varnish and failed to find a
      workaround for the code, so change the test to add an additional
      space after the tab-completion.
      
      If anyone has a better solution, please go head. Otherwise I feel
      this is not worth any more time.
      
      The test change, though not being ideal, should not cause any
      harm at least.
      
      Closes #2833
      5765c9f8
  8. 14 Nov, 2018 4 commits
  9. 13 Nov, 2018 4 commits
    • Federico G. Schwindt's avatar
      Add missing include · 3e3990d7
      Federico G. Schwindt authored
      3e3990d7
    • Federico G. Schwindt's avatar
      Make VSM_Attach interruptible · 1d327ef3
      Federico G. Schwindt authored
      Fixes #2657.
      1d327ef3
    • Nils Goroll's avatar
      improve busyobj panic · a50d90d5
      Nils Goroll authored
      For backend requests, we do not have the thread local storage of the
      client thread available, so trq.req will normally be (nil).
      
      Dump the busyobj back pointers to req/sess/wrk to maximize the
      usefulness of panics.
      
      Also reorder the panic by struct busyobj and add some more members
      which may or may not be useful (but when we find out, it is likely
      too late).
      
      Also move the vmod list dump to the top level.
      
      Noticed when trying to understand if #2667 was also a stack overflow
      in the context of #2817
      a50d90d5
    • Nils Goroll's avatar
      Improve argstruct test coverage · c59c73b1
      Nils Goroll authored
      Related to #2810
      c59c73b1
  10. 12 Nov, 2018 3 commits
    • Nils Goroll's avatar
      polish blob.same and blob.equal · 01198002
      Nils Goroll authored
      If two blob pointers compare equal, the blobs are both the same and
      equal - both being NULL is implied.
      01198002
    • Nils Goroll's avatar
      polish: avoid duplicate zero initialization · 1babec2d
      Nils Goroll authored
      ALLOC_OBJ calls memset(0) already
      1babec2d
    • Poul-Henning Kamp's avatar
      Renovate libvarnisapi signal handling. · 55995ab0
      Poul-Henning Kamp authored
      Introduce VSIG which simply counts number of signals, which everybody
      else can then look at.
      
      If you use libvarnishapi and want your own signal handler, you must
      increment these VSIG_{int|hup|term|usr1} counters yourself, for
      libvarnishapi to work correctly.
      
      The old VUT_Signal()/VUT_Signaled() API is retained and should be
      deprecated in a future version.
      
      Inspired by:	#2818
      55995ab0
  11. 07 Nov, 2018 2 commits