mirror of
https://github.com/vacp2p/dst-libp2p-test-node.git
synced 2026-08-27 12:51:12 +00:00
regression: document the Shadow lsquic tick-floor patch
Add a README covering why quic needs the tick-floor patch under Shadow (zero-delay tick re-arm livelocks a discrete-event simulator), how the LSQUIC_TICK_FLOOR_US gate works, which lsquic version the patch targets, and how the build guards against a silent stock compile. Point the Dockerfile comment at it.
This commit is contained in:
@@ -34,9 +34,8 @@ COPY . .
|
||||
RUN nimble refresh
|
||||
RUN nimble install -dy --verbose
|
||||
|
||||
# Floor lsquic's engine tick re-arms, switched at runtime by LSQUIC_TICK_FLOOR_US
|
||||
# (unset/0 = stock). Shadow livelocks on lsquic's diff=0 "tick now" re-arm.
|
||||
# Patch the package cache: `nimble c` re-resolves and reinstalls over pkgs2.
|
||||
# Floor lsquic's engine tick re-arms so Shadow can advance simulated time.
|
||||
# Gated by LSQUIC_TICK_FLOOR_US (unset/0 = stock). See README.md.
|
||||
COPY lsquic-tick-floor.patch /tmp/lsquic-tick-floor.patch
|
||||
RUN set -eu; \
|
||||
patched=0; \
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
# Regression test node
|
||||
|
||||
Node for nim-libp2p regression campaigns. `Dockerfile_amd64` builds the static
|
||||
cluster binary; `Dockerfile_amd64_shadow` builds the dynamic one for Shadow
|
||||
(its syscall interposer only hooks dynamically linked ELFs).
|
||||
|
||||
## The lsquic tick-floor patch (Shadow + quic only)
|
||||
|
||||
`lsquic-tick-floor.patch`, applied by `Dockerfile_amd64_shadow`, is the reason
|
||||
quic runs under Shadow at all. lsquic re-arms its engine tick with a zero delay;
|
||||
in a discrete-event simulator that self-rescheduling timer never lets simulated
|
||||
time advance, so the run livelocks at one instant. mplex and yamux are fine.
|
||||
|
||||
The patch floors the re-arm interval, gated by `LSQUIC_TICK_FLOOR_US` (unset/0 =
|
||||
stock, so the image is safe on the cluster too; campaigns use `10000`, 10 ms).
|
||||
`es_clock_granularity` is a real lsquic setting, but the essential change floors
|
||||
nim-lsquic's own chronos re-arm, which has no upstream knob; the durable fix is
|
||||
exposing both upstream in nim-lsquic.
|
||||
|
||||
## Maintaining the patch
|
||||
|
||||
It targets lsquic 0.5.4's layout, pinned in `test_node.nimble`. `nimble c`
|
||||
re-resolves deps before compiling, so the Dockerfile patches the package cache
|
||||
(`~/.nimble/pkgcache`, what nimble copies from) rather than the installed copy.
|
||||
The build asserts it patched something and greps the binary for
|
||||
`LSQUIC_TICK_FLOOR_US`, so a stock build or a stale pin fails loudly.
|
||||
Reference in New Issue
Block a user