Repository navigation
docs(moq-uring): the shared locked-memory budget is mostly other programs' rings - #8051
Conversation
Quest-Claim: 273274b425d0ea00
… on the host limit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 1 minute. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed head f0b7075980a63b4f530550e5ff5407b3cd1e46cd against base fe5a6fa7aecb437328a36360da272574f4a68d5c.
No actionable findings in the three changed documentation files. The documented ring geometry and four-test group match rs/moq-uring/src/worker.rs and .config/nextest.toml; sh/rs/nextest.sh already raises the local soft limit to the inherited hard limit and uses 64 MiB on hosted CI. The linked libuv source also confirms that its non-SQPOLL path does not consult UV_USE_IO_URING.
Direction: keeping the measured host-limit change as an explicit maintainer-owned Waiting item is consistent with this docs-only scope. This PR does not itself fix the host or prove that parallel tests pass after the limit change.
Verification limits: GitHub-only static review. I did not run quest check, just ci, host measurements, or a concurrent-test reproduction, and did not change host settings. At inspection, the Quest check passed and the Check job was still running. The timings and memory measurements remain author-reported; this is a COMMENT review, not a merge approval.
There was a problem hiding this comment.
ℹ️ No critical issues — one factual precision fix on the libuv claim, inline.
Reviewed changes
Read the full three-file diff at f0b7075 and checked its claims against the tree and upstream sources.
rs/moq-uring/README.md: the "Parallel test runs" section now says other programs share the user's locked-memory budget, giving per-ring costs, the libuv ring behavior, a ring-count command, and auser@.serviceLimitMEMLOCK=64Mdrop-in.quest/m0/test-flakes-2/uring-memlock.md: rewritten from "fix the tests" into[XS] The dev host's locked-memory limit fits parallel sessions, recording the 2026-11-06 measurement, the options measured and set aside, and aMaintainer:Waiting item.quest/m0/test-flakes-2/README.md: the child line follows the new title.
The rest holds up: .config/nextest.toml still puts the group at max-threads = 4; all three named endpoint tests exist and wait out the 10 s handshake_timeout (rs/moq-quic/src/config/transport/mod.rs:296) while the worker's ring is live; sh/rs/nextest.sh raises to 64 MiB with sudo prlimit on hosted CI only and otherwise lifts the soft limit to the hard limit, so ulimit -Hl printing 65536 is the right Done check; and #7313's body does record the eleven ENOMEM moq-uring failures in one --no-fail-fast workspace run, so the "baseline above 7 MiB" inference is grounded.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
| 256-entry ring of 28 KiB, and it creates these without checking | ||
| `UV_USE_IO_URING`. A desktop running nine agent sessions held 4 to 5 MiB of an | ||
| 8 MiB limit before any test started, mostly in Node.js tool servers. A |
There was a problem hiding this comment.
UV_USE_IO_URING=0 does drop this ring on released libuv below 1.50: uv__use_io_uring() consults the env var for every ring and uv__iou_init returns before io_uring_setup, so Node 20 (libuv 1.46) creates none of these rings when it is set. The unconditional return 1 for non-SQPOLL rings is only on v1.50.0 and later (the body links v1.x), so as written the sentence is false for anyone on that boundary and hides a remedy that still works there. The same sentence appears in quest/m0/test-flakes-2/uring-memlock.md:22-24.
| 256-entry ring of 28 KiB, and it creates these without checking | |
| `UV_USE_IO_URING`. A desktop running nine agent sessions held 4 to 5 MiB of an | |
| 8 MiB limit before any test started, mostly in Node.js tool servers. A | |
| 256-entry ring of 28 KiB, and libuv 1.50 and later creates these without checking | |
| `UV_USE_IO_URING`; earlier versions let `UV_USE_IO_URING=0` turn it off. A desktop | |
| running nine agent sessions held 4 to 5 MiB of an |

Problem
The quest asked for a test-side fix to io_uring ring setup failing with
ENOMEMon the user's shared 8 MiBRLIMIT_MEMLOCKwhen parallel sessions run tests. Measurement shows the tests are a small share of that budget. The rest is held by other processes, and it grows with the number of agent sessions.Measured 2026-11-06 on the maintainer's host (kernel 7.0,
ulimit -Hl= 8192). Each ring's cost came from callingio_uring_setupuntilENOMEM; holdings came from/proc/*/fdinfoSQ/CQ masks.closeon an idle hostUV_USE_IO_URINGdoes not disable it (linux.cuv__use_io_uring: non-SQPOLL ringsreturn 1)just rs test -p moq-uring -p moq-relay --features moq-relay/io-uringApproach
No code change. The PR records the measurement and rewrites the quest into what remains: a host-limit change only the maintainer can make (see Waiting).
rs/moq-uring/README.md: says that other programs (libuv rings) share the budget, gives the measured costs and a way to count rings, and names theuser@.serviceLimitMEMLOCKdrop-in.quest/m0/test-flakes-2/uring-memlock.md: rewritten to[XS] The dev host's locked-memory limit fits parallel sessions, with the measurement, the options set aside, and aWaitingitem for the maintainer.Alternatives
Each one was measured and set aside:
io-uringnextest group at 1 thread (one-line change). A single run then passed with 512 KiB of headroom, where it had failed 113 tests. Butjust rs test --workspace --features moq-relay/io-uringwent from 101 / 108 s to 153 / 149 s, because the group became the tail.max-threads = 2still failed with 512 KiB, in one of two tries. Most of the group's ~45 s of serial time is threeendpoint.rstests that each wait out moq-quic's real 10 s handshake timeout.wrapper-scriptsor a hook in every ring test, and plaincargo testwould still bypass it.moq_uring::Configplus relay plumbing, and the tests would stop exercising production geometry.cargo testis not covered. rs/AGENTS.md says to run tests through nextest, and none of this repo's recipes runs ring tests that way.Impact
Follow-ups
moq-uringendpoint tests (an_unanswered_dial_times_out,the_backlog_bounds_pending_handshakes,the_backlog_bounds_queued_connections) could set a shorthandshake_timeoutin their test config. That would make them fast, and would make a smallerio-uringgroup cheap if one is still wanted after the host change.Decision
Decided 2026-11-06 (maintainer, /quest-complete): ✅ raise the host limit and keep the quest as a host action (64 MiB hard
RLIMIT_MEMLOCKvia auser@.service.dLimitMEMLOCK=64Mdrop-in pluslimits.d). Not chosen: cap theio-uringgroup at 1 thread (about +45 s per workspace check), or first make the 10 s endpoint tests fast; add a public ring-geometry knob. Recorded in the quest file. The host change needs root, so it stays there as aMaintainer:Waiting item, checked withulimit -Hlin a fresh session.Validation
quest check: 606 documents ok, after merging origin/main.quest gate just ci origin/mainon the merged head: every module passed excepttest rs, where io_uring tests in moq-relay failed ring setup withENOMEMagainst this host's 8 MiBRLIMIT_MEMLOCK. That is the host problem this quest tracks. The PR changes only docs.Review
quest reviewround 1 (Codex gpt-6.1-sol, medium) onf0b7075: no findings.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code