1. 03 Jul, 2023 12 commits
    • Nils Goroll's avatar
      r3940: wait for varnish instances · 49d2b99d
      Nils Goroll authored
      Hopefully this should fix vtest errors on bsd/arm
      
      Thank you to phk for the quick help!
      49d2b99d
    • Nils Goroll's avatar
      Fix previous :/ · 0c29ad8d
      Nils Goroll authored
      0c29ad8d
    • Nils Goroll's avatar
      Stabilize r03940.vtc · 6b7f6329
      Nils Goroll authored
      I do not understand how to avoid the child panicking while it is being
      killed for timeout. And removing the AZ() for this case only is not
      a good idea.
      
      ***  v1    debug|Error: Child (36277) not dying (waitpid = 0), killing
      ***  v1    debug|Child (36277) died signal=6
      ***  v1    debug|Error: Child (36277) Panic at: Mon, 03 Jul 2023 15:18:50 GMT
      ***  v1    debug|Assert error in CLI_Run(), cache/cache_cli.c line 102:
      ***  v1    debug|  Condition((VCLI_WriteResult(heritage.cli_out, CLIS_OK, \"Ready\")) == 0) not true.
      6b7f6329
    • Nils Goroll's avatar
      Listen to dying child · 60e16f2f
      Nils Goroll authored
      An r3940 vtest failure on freebsd seems to suggest that the child
      does not terminate while blocking in a write.
      
      ***  v1    debug|Error: Child (74042) Panic at: Mon, 03 Jul 2023 13:40:40 GMT
      ***  v1    debug|Assert error in CLI_Run(), cache/cache_cli.c line 102:
      ***  v1    debug|  Condition((VCLI_WriteResult(heritage.cli_out, CLIS_OK, \"Ready\")) == 0) not true.
      
      This might need another iteration.
      60e16f2f
    • Nils Goroll's avatar
      Polish confusing output · c0962378
      Nils Goroll authored
      as seen in varnishtest:
      
      ***  v1    debug|Error: Child (0) not dying, killingChild (74042) died signal=6
      c0962378
    • Dridi Boukelmoune's avatar
      pool: Safely update pool statistics · bd443dd5
      Dridi Boukelmoune authored
      bd443dd5
    • Dridi Boukelmoune's avatar
      wrk: Simplify condition · ae300347
      Dridi Boukelmoune authored
      ae300347
    • Dridi Boukelmoune's avatar
      wrk: Track pool statistics separately · c6c4915a
      Dridi Boukelmoune authored
      This makes obvious what is used for statistics purposes and what is used
      to maintain the pool queue. In particular, the pool::nqueued field has
      nothing to do with pool::ndequeued.
      c6c4915a
    • Dridi Boukelmoune's avatar
      180cacf1
    • Nils Goroll's avatar
      Polish: Move heritage.proc_vsmw initialization a bit · 07b079a7
      Nils Goroll authored
      printf debugging showed that the initial VSMW_New() call did not go
      through vsm_vsmw_lock() / vsm_vsmw_unlock() simply because the
      function pointers were not initialized yet.
      
      This patch moves the init just after their initialization.
      
      child_main() was previously called right after VSMW_New(), and
      VSM_Init() is almost the first thing which child_main() calls, so
      this move is mostly cosmetic.
      
      Seen staring at #3948
      07b079a7
    • Nils Goroll's avatar
      SQUASHME: Address Dridis nitpicks · aa23821f
      Nils Goroll authored
      aa23821f
    • Nils Goroll's avatar
      Avoid hang when child does not come up, add startup_timeout · bada81bf
      Nils Goroll authored
      When a child did not come up within cli_timeout, varnishd startup
      would hang indefinitely.
      
      We add startup_timeout specifically for child startup.
      
      To facilitate the transition, we use the maximum of cli_timeout and
      start_timeout (suggested by Dridi, thank you) and add a tip if
      startup_timeout is not used.
      
      We avoid the previous harsh exit(1), primarily to make the vtc_varnish
      facility work.
      
      The test case uses both vtc_varnish and vtc_process to exercise the
      different code paths for implicit startup vs. cli "start".
      
      Fixes #3940
      bada81bf
  2. 29 Jun, 2023 2 commits
    • Dridi Boukelmoune's avatar
      vtc: Polish r3159 · 1c4506bd
      Dridi Boukelmoune authored
      For both processes, dump the screen before checking expectations. For
      p1, we make sure we have something to show before proceeding, and can
      abuse CLI serialization for that. Since p2 was already waited for, the
      screen dump was already guaranteed to succeed, on the other hand the
      superfluous p2 -wait can go away.
      1c4506bd
    • Nils Goroll's avatar
      Spray vsmw_assert_lock() · 05810d09
      Nils Goroll authored
      Motivated by #3948
      05810d09
  3. 28 Jun, 2023 1 commit
    • Dridi Boukelmoune's avatar
      vcc: Plug inconsequential leak · 9755dc71
      Dridi Boukelmoune authored
      The VCC_GlobalSymbol() function might be called twice for the same
      symbol. For example a subroutine symbol may be created when the sub
      keyword is first encountered, but it was referenced by a call action
      before the subroutine definition.
      
      The main problem the leak is causing is lsan's output polluting test
      cases looking at the screen output of varnishd, making the lines we
      care about scroll out to oblivion. To remedy this, VCC_GlobalSymbol()
      idempotence becomes free of side effects.
      9755dc71
  4. 26 Jun, 2023 12 commits
  5. 23 Jun, 2023 3 commits
    • Nils Goroll's avatar
      Make c121.vtc robust against concurrent execution · baf60b4d
      Nils Goroll authored
      this happened on one of the uplex linux vtesters which runs
      gcc and clang in parallel un-namespaced
      
      *    top   VTEST Abstract UDS backend: change path, drop poll
      **   top   === feature abstract_uds
      **** dT    0.004
      **   top   === server s1 -listen "@vtc.s1.sock" {
      **   s1    Starting server
      ---- s1    Server listen address (@vtc.s1.sock) cannot be resolved: bind(2)
      baf60b4d
    • Nils Goroll's avatar
      vtest: make the basename of the test directory available as vtcid · d208f376
      Nils Goroll authored
      to have available a unique string for concurrently running tests
      which is not a path.
      d208f376
    • Nils Goroll's avatar
      Try to stabilize m0.vtc on arm vtester · 0c2599e7
      Nils Goroll authored
      from the log:
      
      **   top   === shell -exit 1 -expect {failing as requested} {
      **** top   shell_cmd|exec 2>&1 ;
      **** top   shell_cmd|\tvarnishadm -n /root/VT/_vtest_tmp/vtc.37277.0dc3c11b/v1 vcl.load f1 /root/VT/_vtest_tmp/vtc.37277.0dc3c11b/f1
      **** dT    27.789
      **** v1    vsl|          0 CLI             - Rd vcl.load f1 vcl_f1.1686893821.277415/vgc.so 1auto
      **** v1    vsl|          0 CLI             - Wr 300 62 VCL "f1" Failed initialization
      Message:
      	failing as requested
      
      **** dT    27.893
      **** v1    vsl|          0 CLI             - Rd ping
      **** v1    vsl|          0 CLI             - Wr 200 19 PONG 1686893826 1.0
      **** dT    32.987
      **** top   shell_out|CLI communication error (hdr)
      **** top   shell_status = 0x0002
      ---- top   shell_exit not as expected: got 0x0002 wanted 0x0001
      *    top   RESETTING after ../../../../bin/varnishtest/tests/m00000.vtc
      **** dT    32.988
      0c2599e7
  6. 22 Jun, 2023 1 commit
  7. 20 Jun, 2023 1 commit
  8. 16 Jun, 2023 6 commits
    • Nils Goroll's avatar
      doc polish: cli_timeout · 185e73a1
      Nils Goroll authored
      Varnish historians claim to have evidence that the odd wording "from
      mgt_param" could have been an unintended side effect of a struct
      rename in ancient times at around 2011. (82411494)
      185e73a1
    • Nils Goroll's avatar
      Add init and open delays to the debug stevedore · 6efc2d55
      Nils Goroll authored
      To keep things simple, the open delay is global - the delay of
      the last debug stevedore applies to all of them.
      6efc2d55
    • Nils Goroll's avatar
      Trivial refactor of the debug stevedore · 10c606d3
      Nils Goroll authored
      10c606d3
    • Dridi Boukelmoune's avatar
      vtc_varnish: Log h2 frames · dff75480
      Dridi Boukelmoune authored
      dff75480
    • Dridi Boukelmoune's avatar
      vtc: Polish t02019 · 5a7b42e5
      Dridi Boukelmoune authored
      5a7b42e5
    • Dridi Boukelmoune's avatar
      vtc: Stabilize h2 req.body tests · 620740db
      Dridi Boukelmoune authored
      With the recent change to stream the request body to the backend like
      chunked encoding does, even when we know the content length, two test
      cases became sensitive to the timing of window updates. The data frames
      contain for the most part a 16kB payload, which happens to be the same
      as fetch_chunksize's default value.
      
      With a value of 64kB, corresponding to one more byte than the default h2
      initial window, we are garanteed to never risk a race between the VFP
      consuming the h2_rxbuf and the h2_sess task monitoring it to send window
      updates.
      
      This is also a good occasion to exercise stream.peer_window in t02019.
      
      Refs #3878
      Refs #3934
      620740db
  9. 14 Jun, 2023 1 commit
  10. 13 Jun, 2023 1 commit