Skip to content

test(golden): close the keepalive and netem flakes; a one-way sequence flow, checked exactly - #350

Merged
randomizedcoder merged 20 commits into
mainfrom
feat/ernic-verification-3
Nov 27, 2026
Merged

randomizedcoder merged 20 commits into
mainfrom
feat/ernic-verification-3

Conversation

@randomizedcoder

@randomizedcoder randomizedcoder commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Round 3 of the rocm-ernic verification (design): closes the keepalive flake, adds exact netem rows (the loss_seen flake stays open, 1 in 20) and makes the sequence flow exact.

  • Keepalive flake: idle golden sockets use -keepalive 1h, so no probe is in flight at a poll (a probe sets icsk_probes_out, which inet_diag reports as idiag_retrans). It also explains the old fixture's nonzero sk_mem_info_drops on idle rows: the peer drops each probe as an old sequence (tcp_input.c:4890, 5345). Fixture recaptured.
  • netem rows: new netem_retrans_a/_b (xtcp2's sum of total_retrans == the namespace's TcpRetransSegs) and netem_kernel_agrees (each client == ss). Exact in all 20 captures. Bulk clients use -dialTimeout 30s. loss_seen recurred once in 20: the kernel agreed (0 retransmits), so the flow saw no loss, apparently bypassing netem; cause not found, TODO. The row now prints RTT per client and server, plus netem's sent count, for next time.
  • dctcp ECN fallback: a SYN lost to netem was resent without ECN, turning dctcp into dctcp-reno (tcp_output.c:3698, tcp_dctcp.c:112), once in 20. golden-bulk-a sets tcp_ecn_fallback=0; new row bulk_dctcp_ecn.
  • One-way sequence flow: new tcp_server -discard and tcp_client -bulkOneWay. seq_retrans now requires exactly 12 retransmits for the 12 drops; new seq_server_no_retrans.
  • Strict diff: golden-ernic-c/d leave DefaultFaultNetns. Only tcp_info_rwnd_limited varied there (it follows the discarding reader's pace), so it is the one column in the new DefaultSeqNetns exemption.
  • Tests: table tests (red first) for -discard, -bulkOneWay and the diff exemptions.
  • Evidence: 20 captures. 18 passed all rows with the oracle exact, and seq_retrans was 12 in every one; the other two are the loss_seen and dctcp cases above. xtcp2-golden diff was clean except the dctcp case. A capture with the ECN fix passed all 53 rows. checks.vm-all passes. Of the nix checks, only deadnix and go-sec fail, and they fail on main too.
  • Uplinks (round 2 TODO) unchanged.

🤖 Generated with Claude Code

randomizedcoder and others added 20 commits November 26, 2026 16:16
…equence flow

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ht at a poll

Go's default 15 s keepalive sent a probe on idle sockets; a poll that caught
it before its ACK saw idiag_retrans 1 and tcp_info_probes 1, and the diff
flagged an idle golden-cc connection. The keepalive timer still shows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y bulk transfer

With a discarding server every frame the client sends is data, so a dropped
frame is always a segment TCP retransmits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the drops

The seq server discards and the client reads no echo; seq_retrans now
requires total_retrans == ERNIC_SEQ_DROPS, and seq_server_no_retrans the
server's 0. The wait requires the client's 4 MiB acknowledged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s; bulk clients wait 30 s to connect

netem_retrans_a/b require xtcp2's sum of total_retrans to equal each
namespace's TcpRetransSegs, and netem_kernel_agrees each client's
total_retrans to equal ss's. loss_seen's detail adds ss's per-client
retransmits, ECN flags and segs_out, and nstat's counters. A dropped SYN
with the 1 s dial timeout closed a socket and lost its counters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…trips spaces

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ted (red)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The discarding server's read pace decides whether its window ever held
the sender back: nonzero in two of four captures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…palive probes as drops, one-way sequence flow

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g failure

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A SYN netem drops is resent without ECE/CWR while tcp_ecn_fallback is
set (net/ipv4/tcp_output.c:3698-3705), and dctcp then falls back to
dctcp-reno (net/ipv4/tcp_dctcp.c:112-115): one capture in twenty. Turn
the fallback off in golden-bulk-a and add row bulk_dctcp_ecn.

loss_seen now prints each client's and server's RTT and netem's sent
count, to show whether a flow without retransmits went through netem.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ne investigable

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@randomizedcoder
randomizedcoder merged commit fee6097 into main Nov 27, 2026
1 check passed
@randomizedcoder
randomizedcoder deleted the feat/ernic-verification-3 branch November 27, 2026 06:16
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