Skip to content

physics_field_test: 3600 s for the packed-bodies wake test - #1557

Merged
transfix merged 1 commit into
masterfrom
fix/wake-test-timeout
Nov 26, 2026
Merged

transfix merged 1 commit into
masterfrom
fix/wake-test-timeout

Conversation

@transfix

Copy link
Copy Markdown
Owner

Gives PhysicsFieldWake.PackedBodiesStayBoundedAndSleep a 3600 s ctest timeout. The other physics_field tests keep 1200 s.

Why

How

physics_field_test's tests are discovered, so their names aren't known at configure time. A small generated file, appended to the directory's TEST_INCLUDE_FILES after gtest_discover_tests' own include, runs set_tests_properties(... TIMEOUT 3600) for that one test. 3600 s is the cap ci.yml gives the heavy Debug lanes. ctest skips the line if the test is filtered out or renamed.

Checked (ctest 3.31.7)

  • ctest --show-only=json-v1 over the real discovered physics_field_test file lists this test at 3600 and its 51 neighbours at 1200.
  • A name with no test behind it raises no error.
  • A minimal CMake 3.15-policy project confirms the generated CTestTestfile.cmake includes this file after the discovered tests' file.

Not run: a full configure of the repo with this change; CI covers it.

Making the test cheaper in Debug is separate work.

…edAndSleep

The packed-crates wake test took 747 s of physics_field_test's 1200 s
ctest budget on #1548's package-linux libcvc-debug run, and timed out at
1200 s on #1551's first run of that lane, on a runner about 2.9x slower
(the sibling wake test took 784 s there against 271 s on #1548). With
the lane's --repeat until-pass:3 that one timeout cost the job an hour.

A small file, appended to the directory's TEST_INCLUDE_FILES after the
discovered tests' own include, sets that one test's TIMEOUT to 3600 (the
cap ci.yml gives the heavy Debug lanes). The other physics_field tests
keep 1200. ctest skips the line if the test is filtered out or renamed.

Checked with ctest 3.31: --show-only=json-v1 over the real discovered
physics_field_test file lists the test at 3600 and its 51 neighbours at
1200; a name with no test behind it raises no error.
@transfix
transfix enabled auto-merge (squash) November 26, 2026 19:19
transfix pushed a commit that referenced this pull request Nov 26, 2026
@transfix
transfix merged commit 3a974fe into master Nov 26, 2026
30 checks passed
@transfix
transfix deleted the fix/wake-test-timeout branch November 26, 2026 21:35
transfix added a commit that referenced this pull request Nov 27, 2026
…cally, same bits) (#1562)

PhysicsFieldWake.PackedBodiesStayBoundedAndSleep took 581-747 s of its 1200 s ctest budget on
package-linux / libcvc-debug and timed out three times on a slow runner (#1550's). It took 269 s
there on #1344; #1532 made every wake test 2.5-2.8x slower in Debug (the ring 3.0 to 8.2 s, the
golden 2.4 to 5.8 s, this one 269 to 702 s). The test itself is as #1344 wrote it.

Profiled locally (Debug, MSVC /Od): the calm run with a wake is 62% of the test, and 87% of that
is the wake's wave step: deepen, the motion below the top that #1532 added (2 forward and ~3
inverse 64 x 64 FFTs a state a wave step), 51%; the ewave step 21%; sum, which now adds the
depths, 9%. In an unoptimized build std::vector's operator[] is a call per element, and these
passes made ~400k of them a state a wave step. And once every crate sleeps (~90 s into the calm
run) the wake made depths for ~30 s more, while its waves died away, with nothing reading them.

- fluid_wake::ready_depths: the depths are made at the first read after a wave step (in
  field_set::apply before the field workers' reads, when an awake body is in the wake's field,
  and in field_set::water_at), not at every wave step. The same inputs in the same order: the
  same bits. motion() reads only the layers that were made.
- The wake's per-cell passes (deepen, derive, sum, the wave step's dh/dt) and fft_plan::run_2d's
  gather and scatter index through raw pointers: the same operations in the same order. On their
  own, 28% off a 20 s calm run with a wake in Debug (37.5 s to 27.1 s, three interleaved runs,
  the same peaks to 17 digits).
- The test is two: the calm half keeps its name (and #1557's 3600 s), the swell's half is
  PackedBodiesStayBoundedInASwell, so each has its own ctest budget and ctest runs them side by
  side. What the comments claimed is now asserted too: every crate sleeps on calm water (9 of 9)
  and none in the swell (0 and 0). "Without one they sleep within 40" is 3 (2.55 s).

Measured locally, Debug, the old and new builds run side by side on one loaded box: 283.6 s
before; after, the calm half 72.5 s and the swell's 87.8 s (160.3 s). Every value the test prints
is the same to the digit. No pinned hash moves: the wake golden 0xc72e26b4ef0f764a, the shore
golden 0x89789ba92fbd1853, the swell and ocean scenes.
transfix added a commit that referenced this pull request Nov 27, 2026
* net: TLS in the connection engine (ARIADNE_NET_ENGINE N3)

Listener TLS for cvc::net's connection engine, through OpenSSL's libssl
(optional; Boost.Asio's ssl::context loads the files):

- listener_options.tls (tls_options): certificate and key files, TLS 1.2
  and 1.3 with the minimum as a setting, cipher lists, a client
  certificate asked for and accepted as sent, a handshake timeout, and a
  watch on the files' modification times.
- Each session runs over a BIO of the engine's own, inside N1's readiness
  loop: the queue still holds one refcounted buffer a broadcast, and each
  TLS connection encrypts as it writes, small sends packed into a record.
- accepted is posted after the handshake, with conn_info's tls_version,
  tls_cipher, tls_sni and the client certificate's SHA-256 and keyprint.
  A failed or timed-out handshake closes as tls_handshake, counted and
  never posted.
- listener_options.detect_tls: a plain port that also speaks TLS. The
  first byte decides (0x16 starts TLS), or the wait's end makes it plain;
  accepted comes after the decision, so NMDC's $Lock goes out on the
  right layer.
- reload_tls(listener[, tls]) serves new files to new connections and
  keeps open ones; tls_reloaded carries the new keyprint. The watch loads
  a change once both files have kept their times for one interval.
- tls_keyprint(listener): SHA256/ and the unpadded base32 of the DER's
  SHA-256 ([ADC-EXT] KEYP).
- pycvc: tls_options, tls_protocol_*, reload_tls, tls_keyprint,
  net_listener.keyprint, .reload_tls() and .on_tls_reload on the loop;
  pycvc.ariadne.net has the names, and arisrvx_net runs a TLS listener.

Tests: net_engine_test's TLS cases (handshakes on 1.2 and 1.3, a refused
version and a stalled handshake, the keyprint against the openssl
command, reloads with open connections, the watch, detection with TLS,
plain, slow and silent clients, TLS backpressure and writable, a
broadcast to a group mixing TLS and plain, a TLS fan-out measurement),
required in the sanitizer lanes; test_pycvc_net's TLS section.

* tests: physics_field_test's Debug budget, and the tvision file pick's Enter

Two package-linux / libcvc-debug failures on PRs this week, neither in
their changes:

- PhysicsFieldWake.PackedBodiesStayBoundedAndSleep ran 1059 s in that
  lane on master (c7b050f) and timed out at 1200 s on #1552's and
  #1553's runs, three tries each. physics_field_test gets 2400 s.
- ari_run_file_pick_upload_tvision failed three tries on both: the Open
  file window showed the typed name but never took the Enter (tvision
  reads keys that come in one burst as a paste). Enter now goes once the
  field shows the name, and again, up to three times, while the window
  stays open.

* tests: the wake test's timeout as #1557 sets it (3600 s for that one test)

---------

Co-authored-by: Joe Rivera <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant