Repository navigation
Description
Consolidated on 2026-10-02 from the per-PR 'Follow-ups from #N' bundles, by maintainer decision. From now on, review nits are fixed inside the PR before it merges, so no new bundles are filed. Each line names the bundle and item it came from; the bundle's thread keeps the full context. Everything here stays in v1.6.0.
-
Make the adaptive dispatch never re-times a settled route: a store-backed handler that turns slow runs inline on the engine worker forever (#493 item 4, measured) #592 rig's io_uring half assert the stalled fraction it prints (it passes 3/3 with the io_uring: checkTimeouts locks cs.detachMu for every live conn while runAsyncHandler holds it across ProcessH1, so a slow async handler pins the whole worker #593 TryLock reverted: 0.327-0.340 vs 0.000); owner to set the bar given The #592 settled arm's absolute 5 ms latency bar measures the runner: a provably-free worker exceeds it #622's 0.145 outlier. Land with Follow-ups from #702: a raised-memlock CI step for the celeris#592 rig, with the io_uring stall assertion #739 item 1. (The ast-grep CWE-117 flag on its t.Fatal is a false positive, nothing to do.) (from Follow-ups from #702: a raised-memlock CI step for the celeris#592 rig, with the io_uring stall assertion #739 2) (done in v1.6.0 polish: adaptive tests: io_uring refusal seam, floor test on the probe's answer, early-return hold, standby-failure verdicts, io_uring stall bar #1027 [main]; maintainer to confirm, box left open)
-
TestAdaptiveStartOverrideBelowTheIOUringFloor (adaptive/iouring_floor_linux_test.go) decides by kernel version while the gate decides by the probe's answer; key the expectation on the probe's logged answer (rejection record / probe record / nothing), covering both mirror cases (pre-5.19 accepted, 5.19+ rejected). Test only; includes Follow-ups from #792: io_uring 5.19 floor — backport probe covers 1 of 4 cancel forms, floor test keyed on version, no CI seam for adaptive/Server, stale comments, SSE flake, docs pages #796 item 11(a). (from Follow-ups from #792: io_uring 5.19 floor — backport probe covers 1 of 4 cancel forms, floor test keyed on version, no CI seam for adaptive/Server, stale comments, SSE flake, docs pages #796 2) (Done: v1.6.0 polish: adaptive tests: io_uring refusal seam, floor test on the probe's answer, early-return hold, standby-failure verdicts, io_uring stall bar #1027 [main])
-
Add a seam adaptive can reach (e.g. a package var over iouring.New, like maxWorkersForMemlock) and add an adaptive test and a root Server test that force the async-cancel rejection, so CI on 6.17 can catch a regression in 'adaptive starts on epoll' and 'Engine: IOUring fails at Start' (reviewer overlays zz_review682_* discriminate). (from Follow-ups from #792: io_uring 5.19 floor — backport probe covers 1 of 4 cancel forms, floor test keyed on version, no CI seam for adaptive/Server, stale comments, SSE flake, docs pages #796 3) (Done: v1.6.0 polish: adaptive tests: io_uring refusal seam, floor test on the probe's answer, early-return hold, standby-failure verdicts, io_uring stall bar #1027 [main])
-
Test
adaptive.Engine.Listen's deferred port-hold release on an early return (defer e.releasePortHold(),adaptive/engine.go:494at fix(adaptive): hold the port New picks until the start engine has bound it (celeris#616) #897's head54a3708). No test reaches aListenthat returns before the explicit release at:587: the start engine fails, the context is cancelled, orShutdownruns during the bind wait. With only that defer removed, all 47 adaptive resolvePort hands two sub-engines a port it no longer holds #616 test lines still pass, and the hold would stay bound until GC finalization (celeris.Servernever callsShutdownafter a failedStart). A test is ready to copy:evidence/lanes-20261002/L616_543/review-correctness-r2/exp/adaptive_zz_review_r2_listen_return_releases_hold_linux_test.go.listenGapHookcancels the context, the test asserts the early return (e.Addr()==nil), then a bare socket must bind within 2 s with noShutdown. On the head it passes 9/0/0 over 3 runs on both start engines; with the defer removed it fails on both start engines (one run, 3 FAIL lines;hold_after=true,bare_bind_err=address already in useafter 2.0 s) (logs/exp616-head-m8,logs/exp616-mutB-m8,exp616.sh). Add its name to the ci.yml celeris#616 step. About 40 lines, more than the in-PR budget, so it goes here. (from fix(adaptive): hold the port New picks until the start engine has bound it (celeris#616) #897 review r2, correctness 1) (Done: v1.6.0 polish: adaptive tests: io_uring refusal seam, floor test on the probe's answer, early-return hold, standby-failure verdicts, io_uring stall bar #1027 [main]) -
Trivial: fix inside fix(adaptive): hold the port New picks until the start engine has bound it (celeris#616) #897 before it merges, then tick here. Done in fix(adaptive): hold the port New picks until the start engine has bound it (celeris#616) #897 (bee6b21, commits 12913e0 and 913ec27). Two comments are wrong when neither port hold binds:
adaptive/engine.go:319-320("the start engine's bind reports why") andadaptive/porthold.go:68-75("the port that is taken is reported by the start engine's own bind at Listen"). The sub-engines bind the literalConfig.Addr, and its family can differ from the one the holds andnet.Listentried::Pbecomes IPv40.0.0.0:P, while the holds try dual-stack[::]:P. So beside anIPV6_V6ONLYoccupant of[::]:Pwith no reuse flags,Newwarns, takes no hold, and the start engine binds and serves0.0.0.0:P(main does the same, minus the warning) (evidence/lanes-20261002/L616_543/review-api-perf-security-r2/logs/revexp2-v6only-pr897-b/test.logvsrevexp2-v6only-main-b/test.log,scripts/revexp2-serial.sh). fix(adaptive): hold the port New picks until the start engine has bound it (celeris#616) #897's body was corrected in round 2. (from fix(adaptive): hold the port New picks until the start engine has bound it (celeris#616) #897 review r2, API/docs 1) -
Trivial: fix inside fix(adaptive): hold the port New picks until the start engine has bound it (celeris#616) #897 before it merges, then tick here. Done in fix(adaptive): hold the port New picks until the start engine has bound it (celeris#616) #897 (bee6b21, commits 12913e0 and 913ec27).
ExampleNew(adaptive/example_test.go:31-38) is the pkg.go.dev example foradaptive.New. It builds an engine and drops it (_ = eng), which is the pattern fix(adaptive): hold the port New picks until the start engine has bound it (celeris#616) #897's new rule forbids: an engine built and not started must be shut down, or it holds its port until the descriptor is finalized. End it withdefer eng.Shutdown(context.Background())(or a bounded ctx). (from fix(adaptive): hold the port New picks until the start engine has bound it (celeris#616) #897 review r2, API/docs 2) -
Trivial: fix inside fix(adaptive): hold the port New picks until the start engine has bound it (celeris#616) #897 before it merges, then tick here. Done in fix(adaptive): hold the port New picks until the start engine has bound it (celeris#616) #897 (bee6b21, commits 12913e0 and 913ec27). Two test-gating gaps:
TestAdaptivePortHeldWildcard616(adaptive/port_hold_616_linux_test.go:368) and the[::]:Pforms ofTestAdaptivePortHeldBesideTimeWait616(throughnetListenAddr,:348) callt.Fatalfon a host without dual-stack IPv6. So the whole adaptive package fails on adisable_ipv6=1host because of a host property. Use the repo's env-gated pattern (CELERIS_REQUIRE_*: fail in CI, skip elsewhere).TestAdaptiveAddrMatchesNetListen616(six free-port forms; it cant.Skip) is not in the names list of the ci.yml celeris#616 step, so no step enforces its six PASS lines. Add it.
(from fix(adaptive): hold the port New picks until the start engine has bound it (celeris#616) #897 review r2, correctness 2)
Added 2026-10-03 (from #899, the last pre-rule bundle):
- RequestCount after an adoption differs by engine: io_uring's async replay counts its promotion (promoteConnToAsync does w.reqBatch++), epoll's does not, and neither sync replay counts. The adaptive controller divides by it (BytesPerReq). Pick one rule for all four replay paths and pin it with a test that reads RequestCount after one adoption on each engine (from Follow-ups from #898 (celeris#543): a promoting replay's RequestCount differs by engine; a replay parse error closes without the error response; a replayed h2c upgrade closes the conn #899 item 1). (done in epoll,iouring: one handling of an HTTP/1 verdict for the recv path and the transplant replay; a pipelined h2c upgrade behind a direct-body request #1015 [main]; maintainer to confirm, box left open)
Added 2026-10-09 (#908's lane E7, PR #958):
-
OnErrordelivery on a conn with nodetachMudiffers by engine, on the recv path and on the transplant replay alike (each replay matches its own engine's recv path, so fix(epoll, iouring): a transplant replay answers a carried parse error and switches an h2c upgrade as the recv path does; an epoll replay's partial flush arms EPOLLOUT (celeris#908) #958 leaves it): epoll callsH1State.OnErroron a processing error whenever one is registered, outside itsif mu := cs.detachMuguard (loop.godrainReaderror tail; adopt.goendCarriedReplay), io_uring only insideif mu := cs.detachMu; mu != nil(worker.gohandleRecverror tail; transplant.goendCarriedReplay). A sync conn with a registered callback and no detach therefore gets the callback on epoll and drops it on io_uring. Whether a production sync conn can hold a callback without adetachMuis not established here; if it cannot, state that in both engines, otherwise pick one rule. Pinned on epoll only:TestEpollAdoptCarriedOnErrorSync908sets up exactly that state (no io_uring twin exists). Code reading plus that test, not reproduced as a user-visible failure. (from epoll, io_uring: a transplant replay closes the conn on a parse error (no 400 sent) and on an h2c upgrade (no 101/switch), unlike the recv path it replaces #908 review) (open: WORDING)
Added 2026-10-09 (lane C1, ramp-quarantine lift, celeris#708 / PR #961):
- One
read: resetat the up-switch of the async ramp on a GitHub-hosted runner, after celeris#674. Run 37955998002 attempt 3 (job 113914665600, base 21d49ef, ubuntu-latest):TestRampH1Asyncphase 0 ended withepoll=0 io_uring=2047anderr=1, error censusread: reset:1, exemplarread tcp 127.0.0.1:45476->127.0.0.1:50065: read: connection reset by peer, over 501,605 requests of that ramp. The test passed (it tolerates a few errors), as did the other five attempts of the same bytes (0 errors in the other five async ramps and in all six sync ramps of that campaign; attempts 1-6 are listed inevidence/lanes-20261009/C1/RAMP-TABLE-9d0af62.md). celeris#686 attributed every earlierread: resetin these ramps to the accept hand-over that fix(engine): keep serving on a paused listener for 1.5 s with TCP_DEFER_ACCEPT cleared, so a switch or PauseAccept no longer resets clients that had not yet sent a request (celeris#662, #675) #674 removes, and fix(engine): keep serving on a paused listener for 1.5 s with TCP_DEFER_ACCEPT cleared, so a switch or PauseAccept no longer resets clients that had not yet sent a request (celeris#662, #675) #674's local gates saw 0 in 13.26M requests, so one on a hosted runner is either a residue of that class or a new one. Adial: resetin the sync ramp at the head before (f4b7487, run 37952397778) is the listener-close class CI: lift the adaptive job's quarantine of TestRampH1Sync and TestRampH1Async once #674 is on main (>= 6 green GitHub-hosted runs) #708 calls inherent. To decide: re-run the ramp pair on a hosted runner until it recurs (or 30 runs pass), and on a recurrence read whether the reset conn had ever been accepted (the adaptive ramp: the 'read: reset' losses are celeris#662's accept hand-over, not a hand-off — 14,554 of 14,554 never accepted; #674 is the fix #686 method). (open: MEASUREMENT)
Added 2026-10-09 (lane E8, PR #967):
-
The listener wait of adaptive: a revert can refuse dials — epoll ResumeAccept returns before any loop listens, then io_uring closes its listener (3.4% of reverts) #683 gives up at 250 ms, and io_uring's resume can lag by up to about 1 s when a worker has not parked (a resume that lands in its ring wait is seen only after it, epoll: PauseAccept silently drops connections already waiting in the accept queue — their requests get EOF (8/8, deterministic), and a promotion on a GitHub runner loses ~1/3 of 2048 connections #662). With
DisableDeferAcceptand a lag past the bound the listener-free gap is back (the wait warns and countslistenWait.timeouts, unexported). Needs a listening signal from io_uring (or a worker that sees the resume at once), then the bound can be dropped for the wait; the lane that ownsiouring/*decides. Related: a flap underDisableDeferAcceptinside the pause latency finds the incoming engine's listeners still open and waits the full bound before it goes on. (PARTIAL: iouring,epoll: ResumeAccept signals the wake eventfd so a worker that cannot park listens again at once #1013; open: NUMBERING: iouring,epoll: ResumeAccept signals the wake eventfd so a worker that cannot park listens again at once #1013 cites 'item 8' (U) = A11. The resume-lag root cause is fixed. Left: (a) t) -
A real send fault on a streaming workload (SSE, WebSocket hub) is still divided by the HTTP request count, which there is a handful of subscriptions, so the error-rate revert threshold (0.05) is not a rate on such a row. fix(adaptive): test crash on a missing io_uring standby, spurious error-rate reverts, listener gap at a switch #967 removes the two causes found (send_peer_gone, a stale standby window); a normaliser that counts streamed sends or connection-seconds is the open design question (from adaptive: the error-rate safety revert fires on SSE and WebSocket-hub traffic (error_rate 0.056-5.8 while the client saw 0 errors): io_uring send_peer_gone is divided by a handful of HTTP requests #856 ask 1). (Done: adaptive: error rate per connection-second; Shutdown returns ctx's error on both paths #1038 [main])
-
The cluster bench has no per-bucket error series, so a revert cannot be attributed to a bucket after the fact: the adaptive controller logs only
error_rate. Log the delta of each non-zero bucket with the "engine switch recommended" line (from adaptive: the error-rate safety revert fires on SSE and WebSocket-hub traffic (error_rate 0.056-5.8 while the client saw 0 errors): io_uring send_peer_gone is divided by a handful of HTTP requests #856). (Done: adaptive: log the per-bucket error delta with the engine switch line (v1.6.0 polish item) #1024 [main]) -
The controller-driven switch tests still give a false verdict when the io_uring standby cannot start at switch time (fix(adaptive): test crash on a missing io_uring standby, spurious error-rate reverts, listener gap at a switch #967 review r1; fix(adaptive): test crash on a missing io_uring standby, spurious error-rate reverts, listener gap at a switch #967 guards the forced switches, adaptive tests: TestIdleConnsFollowSwitchRevert{Sync,Async} panic on a nil e.secondary when the io_uring standby cannot start (ENOMEM); the engine correctly stays on epoll #804). With the standby build forced to fail,
TestRampH1Sync,TestRampH1Async,TestRampAutoMixedH1H2,TestRampAutoMixedAsyncreportconns not on io_uring after 20.03s: io_uring=0 epoll=2048andTestAdaptiveSwitchesWithPreBoundListenerreportsno engine switch after 30s ...: AdaptiveSwitches=0, each with the standby-abort WARN in its log; fix(adaptive): test crash on a missing io_uring standby, spurious error-rate reverts, listener gap at a switch #967 changed only their probe-time skip. Skip, or fail underCELERIS_REQUIRE_UPSWITCH=1, whenAdaptiveSwitches == 0ande.secondary == nilat the verdict. Not a crash (no nil dereference), only the wrong verdict. Same shape, not swept (outside./internal/adaptive):test/integration/adaptive_hybrid_test.goTestAdaptiveSwitchUnderLoadcalls a baree.ForceSwitch()and then reportsexpected engine type to changeif the standby could not start. (evidence:evidence/lanes-20261009/E8/review-r1-correctness/logs/failiou-pkg.log) (Done: v1.6.0 polish: adaptive tests: io_uring refusal seam, floor test on the probe's answer, early-return hold, standby-failure verdicts, io_uring stall bar #1027 [main]) -
The adaptive: a revert can refuse dials — epoll ResumeAccept returns before any loop listens, then io_uring closes its listener (3.4% of reverts) #683 listener wait holds the adaptive
e.mufor up to 250 ms (plus one 100 msSO_RCVTIMEO), soEngine.Metrics()(henceServer.EngineInfoand the observe collector),Shutdownand the next switch wait behind it; fix(adaptive): test crash on a missing io_uring standby, spurious error-rate reverts, listener gap at a switch #967 documents it. Measured 109 to 114 ms forMetrics()during a 150 ms-late resume against 375 to 833 ns idle (evidence/lanes-20261009/E8/review-r1-perf-api-security/logs/run2.log). Only aDisableDeferAccept/zero-linger switch whose standby was not freshly built pays it, and not on a request path. Drope.mufor the wait (it needs the next switch locked out some other way) or letMetrics()read the slots withoute.mu. Related, same function:listenWatch.waitreturns on ANY inode new since the snapshot and never checks that it belongs to the incoming engine, so back-to-back switches (a flap) can be satisfied by a late listener of the now-outgoing engine; unreachable from production while the controller's cooldown is a fixed 30 s, reachable byForceSwitch. Also,time.Sleep(50µs)sleeps about 1.4 ms here, so the wait's cost underDisableDeferAccept(revert median 3.6 ms vs 0.2 ms) is mostly poll quantization: a few immediate re-polls before the first sleep would remove most of it (needs theswitchwall683.pymeasurement redone). (PARTIAL: adaptive: Metrics no longer waits behind a switch's listener wait; the wait lists again at once #1012; open: NUMBERING: adaptive: Metrics no longer waits behind a switch's listener wait; the wait lists again at once #1012 cites 'item 12' (U) = A15 (the adaptive: error rate per connection-second; Shutdown returns ctx's error on both paths #1038 'all-box' guess of 15 is the same it) -
revertErrors(fix(adaptive): test crash on a missing io_uring standby, spurious error-rate reverts, listener gap at a switch #967) removes the send-side asymmetry between the engines' revert signal, not all of them: io_uring counts an accept that failed withECONNABORTED(a peer reset between SYN and accept, client abandonment) inAcceptCancelled, which stays inErrorCount, while epoll retries it in place and never counts it (internal/engine/internal/errclass/accept_linux.go,errclass.go:39-50). A connection-churn workload can feed that into the io_uring-only revert signal. Exclude it from the revert numerator too, or split the bucket, once a churn workload shows it (not reproduced). (Done: epoll,iouring: one handling of an HTTP/1 verdict for the recv path and the transplant replay; a pipelined h2c upgrade behind a direct-body request #1015 [main]) -
Trivial comment fix, one line: the
ioUringViablecomment ininternal/adaptive/engine.go(about:141-147at mainfe7600a) says "iouring.New also refuses a kernel that rejects the IORING_ASYNC_CANCEL flags (every one before 5.19, celeris#682)". Since fix(iouring): refuse io_uring below Linux 5.19 whatever the cancel probe answers #963 (celeris#872)iouring.Newalso refuses every kernel before 5.19 on the version alone, whatever the flags probe answers, accepted included (requireAsyncCancelFlags,internal/engine/iouring/engine.go). The comment's conclusion still holds; its stated reason is incomplete. Reword to "refuses every kernel before 5.19, and from 5.19 one that rejects the IORING_ASYNC_CANCEL flags (celeris#682, io_uring: below Linux 5.19 the engine is built after probing only one of the four async-cancel forms it uses #872)".internal/adaptivewas not in fix(iouring): refuse io_uring below Linux 5.19 whatever the cancel probe answers #963's lane, so it goes here. (from fix(iouring): refuse io_uring below Linux 5.19 whatever the cancel probe answers #963 review r1) (Done: adaptive: port hold until Listen returns, ctx-aware Shutdown lock, ioUringViable comment (v1.6.0 polish items) #1019 [main]) -
Shutdown's firste.mu.Lock()(internal/adaptive/engine.go) waits behind an in-progressperformSwitch, which holdse.mufor the lazy standby's bind wait (up to 5 s) plus theawaitIncomingListenerbound, and that wait does not honour theShutdownctx. AShutdown(ctx)with a short deadline can therefore overrun it. It predates celeris#877 (PR fix(adaptive): a switch that races Shutdown must not build a standby (#877) #982, which does not change this lock). Not reproduced with a timing test yet; a test needs a blocking standby factory and a deadline shorter than the bind wait. The adaptive: a performSwitch after Shutdown's snapshot builds an epoll sub-engine that never gets the drain budget #877 flag (PR fix(adaptive): a switch that races Shutdown must not build a standby (#877) #982) is set undere.mutogether with Shutdown's sub-engine snapshot, not before this lock. A switch that queues one.muduring the wait still runs first, and its standby is then in the snapshot and keeps its drain budget. An atomic set before the lock would skip that build, which is a behaviour change, so fix(adaptive): a switch that races Shutdown must not build a standby (#877) #982 does not make it. (done in adaptive: port hold until Listen returns, ctx-aware Shutdown lock, ioUringViable comment (v1.6.0 polish items) #1019, adaptive: error rate per connection-second; Shutdown returns ctx's error on both paths #1038 [main]; maintainer to confirm, box left open)
Added 2026-10-10 (lane E11, PR #982 advisor check):
- A
Listenstarted AFTERShutdownhas begun is not guarded: the eager start path (internal/adaptive/engine.go, theepoll.New/iouring.Newbuild andListenof the first sub-engine, ~L383-437) takes noshuttingDowncheck, so a Listen racing Shutdown can still bring up a sub-engine the snapshot does not hold. Not tested and not reproduced; adaptive: a performSwitch after Shutdown's snapshot builds an epoll sub-engine that never gets the drain budget #877 is only the standby build inperformSwitch(both build sites, L852/L870, are inside it and are now guarded). (open: OBSOLETE)
Added 2026-10-10 (lane ADDR, PR #986 review r1):
-
internal/adaptive/porthold.go(about lines 153-155) keeps its ownzoneNamecopy and builds its own bound string withnet.TCPAddr.bindiag.zoneNameandbindiag.BoundAddr(fix(engines): format IPv4-mapped peers and unscoped listeners as std does (#925) #986) do the same job, and the copy is correct today. Switch the port hold tobindiag.BoundAddrso the zone rule has one copy. Outside the engines: an IPv4 client of a dual-stack listener is reported as "[127.0.0.1]:port", and Server.Addr of an IPv6 listener as "[::%0]:port" (epoll, io_uring, adaptive) #925 file set, so not in fix(engines): format IPv4-mapped peers and unscoped listeners as std does (#925) #986. (from fix(engines): format IPv4-mapped peers and unscoped listeners as std does (#925) #986 review r1) (open: WORDING)
Added 2026-10-11 (lane DFAIR, PR #993; cross-reference):
- A driver conn pinned (internal/adaptive/provider.go,
driverWorkerLoop.pinned) to an epoll sub-engine's loop is never served once that sub-engine is paused and has no HTTP conns: the loop parks, and a parked epoll loop does not serve driver conns (the item on v1.6.0 polish: epoll engine #885, measured on main with an explicitPauseAccept,logs/parked-main-r1of lane DFAIR). Whether adaptive's demotion of epoll reaches this state with drivers still pinned to it is code reading only; it was not run through adaptive. Failing-first: a driver conn registered through the adaptive engine'sWorkerLoopwhile epoll is active, then a switch to io_uring and a byte to the conn's peer. (from epoll: a driver conn whose inflow never pauses holds the engine loop in driverRead, so every other conn on that loop waits (the engine twin of #881) #930 / PR fix(epoll,eventloop): spend at most 8 reads on an engine driver conn per turn, and never wait on a conn's recvMu in the standalone worker (celeris#930, celeris#931) #993) (Done: epoll: the first parked read-end error is kept andLoop.shutdowndelivers it; a loop does not park while it holds a driver conn, andRegisterConnwakes a parked one (v1.6.0 polish items) #1059 [main])
Added 2026-10-11 (lane E13, PR #992 review r1):
- The adaptive engine's port hold (
internal/adaptive/porthold.go) is closed once the start engine has published its address (Engine.Listen), so an adaptive engine on port 0 (or a port a connect(2) autobind can pick) has the port unbound while every worker is paused, and aResumeAcceptthat loses it ends increateListenSocketfailing,ListenerRecreatebumped andshutdown(): the sub-engine's workers are gone for good andResumeAcceptstill returns nil. Pre-existing since adaptive resolvePort hands two sub-engines a port it no longer holds #616. PR fix(epoll,iouring): a port 0 Addr is decided once, and Listen returns after its port is free (#895, #896) #992 closed the same window for the standalone epoll and io_uring engines by keeping their port-0 hold untilListenreturns (a never-listening SO_REUSEPORT socket takes no connection). Fix shape: keep adaptive's hold untilListenreturns too (the sub-engines bind beside it, as they do at start). Not reproduced through adaptive. RULE 92 search of the four repos (porthold, port hold, holdPort, ListenerRecreate, ResumeAccept port) found no tracker. (from PR fix(epoll,iouring): a port 0 Addr is decided once, and Listen returns after its port is free (#895, #896) #992 review r1) (PR fix(epoll,iouring): a port 0 Addr is decided once, and Listen returns after its port is free (#895, #896) #992 round 3:Config.AddrandServer.ResumeAcceptnow document that Adaptive does not hold the port while paused and that a resume that loses it fails per worker,ErrorListenerRecreate; the behaviour itself is unchanged.) (Done: adaptive: port hold until Listen returns, ctx-aware Shutdown lock, ioUringViable comment (v1.6.0 polish items) #1019 [main])
Added 2026-10-13 (lane ADOPT, PR #1015 review r1):
-
The request count of an h2c upgrade differs between the recv path and the transplant replay: both engines' recv paths (
drainRead,handleRecv) return on theErrUpgradeH2Cverdict beforereqBatch++, so a conn that upgraded on a recv has counted its upgrade request as none, while epoll,iouring: one handling of an HTTP/1 verdict for the recv path and the transplant replay; a pipelined h2c upgrade behind a direct-body request #1015's replay of a carry that is an upgrade request counts one (pinned byTest{Epoll,Iouring}AdoptRequestCountUpgradeCarry886). Direct-body recv events are uncounted on both engines too (the request is counted at its first recv). Pick one rule (count the upgrade request on the recv path as well, or have the replay count none for an upgrade carry) and change the pinned tests with it; the choice movesBytesPerReqby one request per upgraded conn. RULE 92: searched celeris, probatorium, docs and loadgen by mechanism (h2c upgrade RequestCount, reqBatch upgrade not counted): no tracker. (open: ENGINE-CODE) -
BeginPauseAccept(internal/engine/iouring/engine.go,internal/engine/epoll/engine.go) only storesacceptPausedand does not signal the wake eventfd: the pause-side sibling of what iouring,epoll: ResumeAccept signals the wake eventfd so a worker that cannot park listens again at once #1013 does at the resume. A worker or loop that is idle and still listening sees the pause only when its current wait ends (io_uringbaseTimeoutreaches 100 ms, 50 ms with detached conns, 25 ms with aReadHeaderTimeout; epoll on the same order), so its listener closes late. That is the pause latency the flap remainder of item 8 (DisableDeferAccept, a flap inside the pause latency waits the fulllistenWaitBound) depends on. Found by reading in the review of iouring,epoll: ResumeAccept signals the wake eventfd so a worker that cannot park listens again at once #1013, not measured. ASignalafter the store would end it, but it changes when a pause takes effect, so measure the pause-to-closed lag first (iouring,epoll: ResumeAccept signals the wake eventfd so a worker that cannot park listens again at once #1013's lag test, run the other way, is the template). RULE 92: searched celeris, probatorium, docs and loadgen by mechanism (BeginPauseAccept, pause latency): no tracker (Pause oracle fails ~4 runs in 24 on io_uring and never on epoll, and it just turned CI red #564 is the closed pause-oracle test flake). (open: ENGINE-CODE) Done for io_uring in engines: OnDetach rollback first, io_uring pause wake, zoned bind address, one-dump NIC table, MaxEvents by allowed nodes, upgrade-carry count, backlog hook (v1.6.0, Refs #885 #886 #889 #890) #1127; epoll declined with evidence (a listening epoll loop waits at most 4 ms; measured lag 0.8 to 5.9 ms). -
epoll
reclaimTransplantcounts a recv twice: it re-adopts onto the same loop a carry whose bytesdrainReadalready counted (reqBatch++at loop.go:1668 runs beforetryTransplantat :719), so a refused hand-off with a non-emptyBufferedadds a second count. io_uring's source never fillsBuffered. Rare failure path, approximate counter. (from PR epoll,iouring: one handling of an HTTP/1 verdict for the recv path and the transplant replay; a pipelined h2c upgrade behind a direct-body request #1015 review r2, nit) (open: ENGINE-CODE) -
adaptive
Metricsleaf lockslotsMu(PR adaptive: Metrics no longer waits behind a switch's listener wait; the wait lists again at once #1012 final review, minor): no test catches droppingslotsMufrom the PRIMARY slot-publish block inperformSwitch(the lazily built epoll standby on a server that starts on io_uring); dropping it from the SECONDARY block is caught. Add a write-side control/test for the primary block. (open: TEST-HYGIENE) -
adaptive tests (PR v1.6.0 polish: adaptive tests: io_uring refusal seam, floor test on the probe's answer, early-return hold, standby-failure verdicts, io_uring stall bar #1027 review r2, minor/nits): the doc above
assertSettledRetimed592still describes the replaced latency bar (the io_uring arms now assert the worker's own stack: no event-loop goroutine parked on a mutex in >= 25% of >= 3 captures); the post-promotion window and the reference window no longer sample the same way (the The #592 settled arm's absolute 5 ms latency bar measures the runner: a provably-free worker exceeds it #622 rule: the stack watch spawns a goroutine and atime.Afterper probe in one window only); the doc ofTestAdaptiveListenEarlyReturnReleasesHold616says three ways to return early but lists two bullets (the bind-deadline arm has none);stackTally589.capturepasses a fixed 1 MiB buffer toruntime.Stack(all)without checking truncation; the classifier counts onlysync.(*Mutex).Lockframes (a goroutine header wait reason[sync.RWMutex.Locketc. would be sturdier);listenBindDeadlineis a plain package variable written by the new bind-deadline arm and read byListen; most fixed-tree arms record 0 captures, so the observable bites only when a probe goes unanswered. (orchestrator, from the two reviews) (open: TEST-HYGIENE) -
docs repo
src/content/docs/engines.mdline 160 (signals table, Error rate row) says the error rate is "ErrorCountover time". Since adaptive: the error-rate safety revert fires on SSE and WebSocket-hub traffic (error_rate 0.056-5.8 while the client saw 0 errors): io_uring send_peer_gone is divided by a handful of HTTP requests #856 and PR adaptive: error rate per connection-second; Shutdown returns ctx's error on both paths #1038 the io_uring safety revert readsErrorCountlesssend_peer_gone, divided by max(requests, connection-seconds) per sampling interval (threshold 0.05, only while io_uring is active). Reword the row once adaptive: error rate per connection-second; Shutdown returns ctx's error on both paths #1038 is merged. RULE 92: searched celeris, probatorium, docs and loadgen by mechanism (ErrorCount over time, error rate revert 0.05, errorRevertRate, ErrorRate, engine switch recommended): the docs row is the only prose that states the rate; the probatorium hits are the EngineMetrics key lists, which adaptive: error rate per connection-second; Shutdown returns ctx's error on both paths #1038 does not change. (from PR adaptive: error rate per connection-second; Shutdown returns ctx's error on both paths #1038 review r1) (open: WORDING) -
(user decision, behaviour change) the io_uring error-rate revert has no floor on faults or on the divisor (PR adaptive: error rate per connection-second; Shutdown returns ctx's error on both paths #1038 review r1, minor): an interval with fewer than 20 connection-seconds and no request reverts on one accept error (
AcceptCancelledcounts ECONNABORTED, EINTR, ECANCELED, EBADF), and idle connections dilute a real rate (N idle connections make it N times less likely to cross 0.05). The old faults/requests rule reverted on 1 fault in 1 to 19 requests, and read 0 with no request. The revert is one-way only on the opt-in io_uring start (WorkloadHint=HighConcurrency or CELERIS_ADAPTIVE_START=iouring, whereconnSwitchEnabledis false); on the default epoll startevaluateUpcan promote again. Options: add a floor (a minimum fault count, or a minimum divisor), or keep as is. Also the choice of max(requests, connection-seconds) for decision 886.9 'divide error rate by connection-seconds' needs the user's confirmation: pure connection-seconds would make request/response workloads 12x more sensitive; max() makes a mostly idle pool whose sends all fail (10,000 connections, 100 requests, 100 send faults) read 0.01 (was 1.0). RULE 92: searched the four repos by mechanism (error rate floor, minimum sample revert, errorRevertRate): no tracker. (open: DECISION)
Added 2026-10-16 (lane PINPLAN, PR #1049, celeris#1036):
-
adaptive on an arm64 big.LITTLE host now sees 8 workers, not GOMAXPROCS (PR epoll, io_uring: on a big.LITTLE host one pinned loop per non-little CPU, none unpinned #1049 makes the sub-engines start one pinned loop per non-little CPU; msr1: 8 of 12). Two consumers still use the requested count: (1)
ioUringViable(internal/adaptive/engine.go,wantWorkers := cfg.Resources.Resolve().Workers) compares the requested 12 with the RLIMIT_MEMLOCK worker ceiling, so a ceiling of 8 to 11 workers keeps the engine off io_uring although the plan needs only 8; give it the count the engines will start (the same non-little count, or ask the platform plan), harmless on every host measured and wasteful only in that band; (2) the controller's conns-per-worker signal (ConnsPerWorker = ActiveConnections / max(Workers, 1), internal/adaptive/telemetry.go andcpwin engine.go) divides by 8 on such a host, 1.5x the value it had at 12 for the same load, so its thresholds act at 2/3 of the connection count there; the round-2 A/B of arm64 (msr1) loop engines lose 15-62% rps at 128c-256c and on post-4k since the bench on dbbaaee; #973's pin policy leaves 4 of 12 loops unpinned and is the lead suspect #1036 had adaptive 128c at 0.91 of the all-pinned arm with this change and no switch pathology noticed, but the thresholds were calibrated on hosts whose loop count equals GOMAXPROCS (not checked: whether the calibration depends on it). Not edited in PR epoll, io_uring: on a big.LITTLE host one pinned loop per non-little CPU, none unpinned #1049 (the adaptive package was owned by another lane in flight). RULE 92: searched the four repos by mechanism (ioUringViable memlock, conns-per-worker Workers adaptive, ConnsPerWorker threshold): no tracker. (from PR epoll, io_uring: on a big.LITTLE host one pinned loop per non-little CPU, none unpinned #1049, task PINPLAN) (open: ENGINE-CODE) -
adaptive:
Metrics.Workersis the sum of both sub-engines' loops and, from PR platform, epoll, io_uring: warn when a NIC interrupt vector is serviced by an allowed CPU that runs no loop and the rx-port rule did not free on purpose; README host-tuning note #1062 (NIC interrupt placement, celeris#1036), can include 1-2 extra pinned loops on a big.LITTLE host; no test ininternal/adaptiveasserts the sum with an extra loop, and the adaptive engine plans the active engine at Listen and the lazy standby at its first switch, so the interrupt detection can run twice, minutes apart, with plans that differ if a vector moved in between (each logs its own line; nothing de-duplicates the Warn). Not edited in PR platform, epoll, io_uring: warn when a NIC interrupt vector is serviced by an allowed CPU that runs no loop and the rx-port rule did not free on purpose; README host-tuning note #1062 (the adaptive package is another lane's). RULE 92: searched the four repos by mechanism (Metrics.Workers adaptive sum, nic irq, msi_irqs, effective_affinity): no tracker. (from PR platform, epoll, io_uring: warn when a NIC interrupt vector is serviced by an allowed CPU that runs no loop and the rx-port rule did not free on purpose; README host-tuning note #1062, task IRQPLACE) (open: TEST-HYGIENE)
Activity
FumingPower3925 commentedon Oct 2, 2026
A lead for this checklist, not an established defect: on adaptive, requests still in flight when other clients disconnect were answered 0.5-1.5 s after the stop instant. Seen in goceleris/probatorium#469's real-refapp check, not investigated.
The setup.
driveTier1drives it with 50 walkers: 35 Markov, 10 adversarial, 5 h2c.Stop instant to window opening, ms, 6 cells each (origin/main -> #469):
Not established.
Rerun (on the maintainer machine, under
evidence/lanes-20261002/LP465_466/):scripts/p465real/build.sh,scripts/p465real/run.sh r1 6, thenpython3 scripts/p465real/phase_end_times.py r1. That regenerateslogs/p465real/r1/phase_end_times.txtbyte-identical. A search of celeris, probatorium, loadgen and docs found no issue for this.FumingPower3925 commentedon Oct 3, 2026
One item from the round-2 review of #906 (celeris#893, lane F3, correctness lens). Found by reading the code; not measured:
With
AsyncHandlers: true, a peer that withholds HTTP/2 window can make the adaptive learner promote any adaptive route.handler.go:141-150(main1b78612) times an adaptive route's request aroundc.Next()and callspromoteRouteImmediatewhen it takes longer thanadaptiveBlockingThreshold(2 ms). With fix(h2): bound the response bytes a connection holds for the peer's window; over the budget, handlers run on the pool and send as the windows open (celeris#893) #906, a request that runs on the HTTP/2 worker pool because its connection is over the outbound budget blocks in its response write (internal/conn/response.gosendRest) until the peer grants window, for up toWriteTimeout. That wait is inside the timedc.Next(). So a peer that withholds window can switch an adaptive route to async dispatch for every connection foradaptivePromoteTTL(5 s), and again each time it expires. On main a write never blocks, so flow control could not do this. It costs performance only: the route runs on the slower async path.Fix direction: exclude the time a write waits for the peer's window from the learner's sample, or skip the sample for a stream on the pool only for the budget (
flagBudgetPool). Either needs a test that drives a waiting write through an adaptive route and checks the route is not promoted.FumingPower3925 commentedon Oct 3, 2026
Two items from the round-2 reviews of #916 (celeris#852, lane SW), on the dispatch of requests no route matches. Lines are at #916's head b4e7900. Neither is a regression against main, where an unmatched request ran no middleware. #916's godoc (
Config.AsyncHandlers,Server.Use) and goceleris/docs#90 (configuration.md, middleware.md) now describe the current behaviour. Update them with the fix. Evidence paths are relative toevidence/lanes-20261003/SW/.HandleStreamtimes an unmatched request only whileunmatchedAdaptiveKeyis learning (handler.go:236-243).routeAsyncanswersunmatchedPromoted()for a path no route matches (router.go:592-595,:624).Use-mounted healthcheck, the swagger page and its assets. A settled key is neither timed nor promoted..Async()opt-out. AUsemount has neither.review-correctness-r2/probes/linux/zz_r2_settled_key_linux_test.go: golang:1.27, Workers 2,AsyncHandlers, and a waiting unmatched request that holds for up to 3 s while 16 fresh connections askGET /ping. I reran it unchanged at b4e7900 (fix-r2/scripts/05-ctr-linux.sh,fix-r2/logs/05-ctr-b4e7900-53dff42/settled-{1,2,3}.log):review-correctness-r2/logs/ctr3-nosettle.out), on a tree whose key cannot settle: 16/16 in all 12 arm-runs.unmatchedAdaptiveKey, so it stays on the timed path. That costs about two clock reads per unmatched request underAsyncHandlerswith global middleware, so measure it.recordInlineRunfor fast unmatched runs (so the key never settles and the 300 µs-2 ms streak promotion is lost) passes all 37 of the Use-mounted swagger/pprof/debug answer 404 for their own paths: global middleware is skipped on unmatched routes unless a custom NotFound is set #852 tests (review-correctness-r2/logs/916-darwin.out, armm-settled-never)..Async()routes, the unmatched chain is never adaptive.buildUnmatchedChainssetsrouter.unmatchedAdaptiveonly when the server default is async (handler.go:72-75). SoRouteAsyncanswers false for every unmatched path, even after a run blocks, while async dispatch is up (HasAsyncRoutestrue)..Async(); the unmatched chain cannot.zz_r2_dispatch_decision_test.go, rerun at b4e7900 (fix-r2/scripts/02-verify-probes-darwin.sh→fix-r2/logs/02-verify/dispatch-h916.log):sync-default+async-routes: HasAsyncRoutes=true RouteAsync(GET /ping)=true RouteAsync(GET /nope) before=false after one 22ms blocking unmatched run=false.review-perf-api-security-r2/scripts/r2-06-inline-syncdefault-ctr.sh) is written but was not run.(defaultAsync || asyncRouteCount > 0) && (…). This changes which requests are timed under the sync default, so measure it.Server.AsyncHandlersreads it when no route is async (the data race fixed there;TestAsyncHandlersReadWhileStarting852).test(adaptive): the listener wait lists again at once before its firs…
fix(adaptive): Metrics reads the sub-engine slots under switchMu, and…
test(adaptive): the spin test fails instead of skipping when the wait…
test(epoll): the resume lag is 500 ms only without a header deadline …
fix(iouring,epoll): ResumeAccept signals the wake eventfd so a worker…
test(adaptive): Metrics() must not wait for the switch's listener wai…
test(adaptive): the listener wait lists again at once before its firs…
fix(adaptive): Metrics reads the sub-engine slots under switchMu, and…
test(adaptive): the spin test fails instead of skipping when the wait…
test(iouring,epoll): a resume straight after a pause reaches a worker…
68 remaining items
engines: an h2c upgrade carry counts no request on the transplant rep…
engines: tests for the cross-engine small fixes, red on main (v1.6.0,…
engines: cross-engine small fixes (v1.6.0, Refs #885 #886 #889 #890)
engines: comments for the items that need no code (v1.6.0, Refs #885 #…
engines: 886.23 test, red on main: an h2c upgrade carry counts no req…
engines: an h2c upgrade carry counts no request on the transplant rep…
engines: tests for the cross-engine small fixes, red on main (v1.6.0,…
engines: cross-engine small fixes (v1.6.0, Refs #885 #886 #889 #890)
engines: comments for the items that need no code (v1.6.0, Refs #885 #…
engines: 886.23 test, red on main: an h2c upgrade carry counts no req…
engines: an h2c upgrade carry counts no request on the transplant rep…
adaptive tests: pin that the 3-fault floor lets a low-traffic failing…
adaptive tests: review r1 minors and nits (v1.6.0, Refs #886, Refs #890)
engines: OnDetach rollback first, io_uring pause wake, zoned bind add…
FumingPower3925 commentedon Nov 1, 2026
Verified on main (2026-11-01) and confirmed by the maintainer; boxes ticked: 1 (the #592 rig now fails on a loop goroutine parked on a mutex instead of the stalled fraction: substitution accepted, #1027), 8 (RequestCount rule after adoption: a non-empty carry counts one, an h2c-upgrade carry none, #1015 then #1127; 16 tests pass across both engines), 18 (ctx-aware lockForShutdown cuts the bind wait, #1019 and #1038; the CI guard runs in the non-required adaptive job). Evidence: evidence/_loop/verify-polish-20261101.md.