You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add configurable RLIMIT_MEMLOCK checks before torrent startup #175
Validate queue and buffer-ring sizes, then estimate their storage with checked arithmetic.
Warn when the estimated budget exceeds RLIMIT_MEMLOCK; allow startup rejection through memlock_strict = true.
Make headroom configurable through memlock_headroom_percent, defaulting to 100% extra.
Preserve OS errors from setup and registration, with recovery guidance that respects the hard limit.
On my machine, ring setup succeeded with MEMLOCK set to zero. I'm proposing advisory checks by default because kernel accounting varies. Actual allocation failures would still stop startup.
Testing
Cover policy boundaries, invalid sizes, overflow, and existing TOML compatibility. Use strace to test setup and registration failures without exhausting memory. Genuine kernel-enforced MEMLOCK exhaustion hasn't been reproduced locally.
Would you prefer advisory checks by default, or should an insufficient estimate stop startup?
Activity
4m1z commentedon Nov 21, 2026
PR for this issue: #176