Skip to content

Conversation

@acooks
Copy link
Owner

@acooks acooks commented Dec 28, 2025

No description provided.

acooks and others added 18 commits December 28, 2025 10:41
Network pathology simulations for JitterTrap testing and educational
demonstrations. Uses Python 3.10 standard library only.

Infrastructure:
- 3-namespace topology with L2 bridging (pp-source, pp-observer, pp-dest)
- Test runner with browser auto-open and JitterTrap observation instructions
- Impairment profiles (wan, lossy, congested, reorder)

Implemented tests:
- tcp-timing/persist-timer: Zero-window condition and recovery
- tcp-timing/nagle-delayed-ack: Nagle/delayed ACK interaction
- tcp-flow-control/receiver-starvation: Slow receiver causing backpressure
- tcp-flow-control/silly-window-syndrome: Small window segments
- tcp-lifecycle/rst-storm: Abrupt connection termination with RST
- udp/bursty-sender: Bimodal IPG distribution
- rtp/rtp-jitter-spike: Periodic jitter spikes in media stream
- rtp/rtp-sequence-gap: Packet loss via sequence discontinuities

Each test includes:
- Self-checking assertions
- Detailed README with root cause explanation
- JitterTrap observation guidance

Also documents JitterTrap issues found during testing:
- Zero Window indicator not appearing
- TCP Window not visually recovering
- Histogram measurement window unclear

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add --capture-screenshots flag to run-test.sh that automatically captures
PNG screenshots of JitterTrap UI when tests detect network pathologies.

Features:
- Puppeteer-based screenshot controller runs headed browser
- Captures charts on [PASS] pattern detection
- Saves to timestamped directories with metadata.json
- Infers which views to capture from test README.md
- Cleans up stale jt-server processes before starting
- Tears down topology after successful tests by default

New files:
- screenshot-controller.js: Puppeteer browser automation
- get-screenshot-config.py: Extract view config from READMEs
- package.json: Node.js dependencies (puppeteer)

Usage:
  sudo ./infra/run-test.sh tcp-timing/persist-timer --auto --capture-screenshots

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Reduce browser console logging to errors/warnings only
- Remove sample period checks and page reload workaround
- Remove keep-alive mouse movement loop
- Simplify interface selection
- Add package-lock.json to .gitignore

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Disables IPv6 on all test namespace interfaces (pp-source, pp-dest,
pp-observer) during topology setup. This eliminates IPv6 neighbor
discovery and other background traffic that can interfere with
test observations in JitterTrap.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Changes default port from 9999 to 5004 (RFC 3551 standard RTP data
port) in all RTP test scripts. This may improve JitterTrap's RTP
detection which likely uses port-based heuristics.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Enhances the receiver-starvation test:
- Added self-check assertions with [PASS]/[FAIL] output
- Proper exit codes for test automation
- Better defaults: 16KB buffer, 10ms delay, 15s duration
- Changed host from localhost to 10.0.1.2 for namespace setup
- Clarified difference from persist-timer in README
- Added comparison table and variation examples

The test now validates:
- Data transferred (>100KB)
- Rate limited by receiver capacity
- Sender experienced flow control blocking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Updates test documentation with current RFC references:
- silly-window-syndrome: RFC 9293 SWS avoidance algorithms
- rst-storm: RFC 9293 RST generation/validation rules
- nagle-delayed-ack: RFC 9293 delayed ACK timing
- persist-timer: RFC 9293/6298 timing details, comparison table

Replaces older RFC references with RFC 9293 (the consolidated TCP
specification from 2022) for accuracy and consistency.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Adds documentation for two issues found while running tests:

1. RST-terminated flows missing from TCP charts
   - RST connections too short-lived for RTT/window metrics
   - Only observable via Top Flows table and throughput bursts

2. RTP detection requires standard ports
   - Port 9999 was classified as generic UDP
   - Changed tests to use port 5004 (RFC 3551)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add --pcap option to capture packets on the bridge interface during tests,
enabling comparison of JitterTrap measurements against trusted references
like Wireshark/tshark.

Features:
- --pcap [file]: capture packets via tcpdump on br0 in observer namespace
- Auto-generates timestamped output filename if not specified
- Reports file size and packet count after capture
- Fixes file ownership when running under sudo

Also adds robust process cleanup via trap handler:
- Properly stops tcpdump, jt-server, screenshot controller on exit/interrupt
- Handles Ctrl+C, errors, and normal exit paths
- Prevents orphaned background processes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add cleanup-processes.sh for manual cleanup of orphaned processes
- Fix topology_exists() regex to handle namespace metadata suffix
- Add kill_process() helper for reliable process termination with timeout
- Add namespace-aware cleanup functions for tcpdump, jt-server, python
- Fix bash arithmetic to work with set -e (use $((x+1)) not ((x++)))
- Ensure jt-server stops before topology teardown to avoid errors
- Add proactive cleanup of stale processes at test startup
- Optimize screenshot controller wait loop with fast initial checks
- Add 100ms delay before Node process.exit() for stdout flush
- Update README with troubleshooting section

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Without this, veth interfaces coalesce packets via TCP Segmentation
Offload, resulting in jumbo frames (5-20KB) in pcap files instead of
actual TCP segments (~1460 bytes).

Before: 1,870 packets for 11MB transfer (5.8KB avg)
After:  9,792 packets for 11MB transfer (1.3KB avg)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
When running screenshot capture under sudo, preserve DISPLAY,
XDG_RUNTIME_DIR, and XAUTHORITY so Puppeteer can launch Chrome
with GUI access.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add pgaps view for Inter-Packet Gap chart capture.
Add flowdetails view that expands a flow to show RTT distribution,
IPG histogram, and packets/second stats.

Key implementation details:
- Pause animation loop before expanding to prevent redraw from
  collapsing the expansion
- Call D3 click handler directly to avoid event bubbling issues
- Reorder captures to process flowdetails first

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Reduce receiver processing rate from ~800 KB/s to ~80 KB/s:
- Smaller recv buffer (8KB vs 16KB)
- Longer delay between reads (50ms vs 10ms)
- Smaller read size (4KB vs 8KB)

This makes zero-window events more visible in JitterTrap's
TCP Window chart.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
New test that shows application-level sender stalls creating
inter-packet gaps without TCP flow control signals.

Key features:
- Default "varying" pattern cycles through 5, 10, 20, 50, 100ms stalls
- Shows different gap sizes in JitterTrap's IPG chart
- Contrasts with receiver-starvation (healthy window vs zero-window)

Patterns available: varying, periodic, random, burst

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Restructure pathological-porcupines for clarity:
- tests/ contains verification tests that reproduce pathologies
  and verify JitterTrap correctly detects/displays them
- research/ (untracked) contains parameter sweep experiments

Update run-test.sh to look for tests in tests/ subdirectory.
Update Python imports to reflect new directory depth.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Update links and examples to use tests/ subdirectory paths.
Add sender-stall test to implemented pathologies table.
Update project structure diagram with tree format showing
tests/ and research/ layout.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Restructure research documentation into focused investigations:
- diagnostic-signatures: receiver vs network discrimination
- jitter-cliff: chaos zone and RTO bifurcation
- congestion-control: BBR vs CUBIC characterization
- loss-tolerance: BBR advantage under packet loss
- starlink-profiles: satellite network conditions
- ecn-discrimination: congestion vs random loss
- sender-stalls: IPG-based detection

Includes:
- Analysis scripts for each investigation
- Experiment runner scripts
- CSV results from experiments
- Practical guides (flowchart, video quality, CC selection)

Plots excluded via .gitignore (regenerable from scripts).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@acooks acooks merged commit 5a1600c into master Dec 28, 2025
1 of 3 checks passed
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.

2 participants