Repository navigation
Conversation
…ver start A GPU ibv_reg_mr is charged against RLIMIT_MEMLOCK before the RDMA driver falls back to peer memory, so in a container without CAP_IPC_LOCK a soft limit below one KV chunk fails every Mooncake KV registration with ENOMEM. On the SemiAnalysis MI355X cluster Slurm sets that soft limit to 8 MiB (hard unlimited), which failed every ATOM P/D eval there. The server now raises the soft limit to the hard limit before it spawns the engine processes, which inherit it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🏷️ CI GuideRuns automatically on every eligible PR before approval:
Heavy model tests:
Path scope:
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the memlock-limit startup change.
No open issues 🎉
What changed in this PR
This PR addresses RDMA memory-registration failures in ATOM prefill/decode workers by raising the server’s RLIMIT_MEMLOCK soft limit to its hard limit before spawning engine processes.
Changes:
- Adds a helper that raises the limit, skips changes when already equal, and warns if the raise fails.
- Calls the helper at server startup so spawned workers inherit the limit.
- Adds unit tests for finite and unlimited hard limits, the no-op case, and failure handling.
| File | Description |
|---|---|
tests/test_raise_memlock_limit.py |
Tests limit raising, no-op behavior, and warning handling. |
atom/utils/__init__.py |
Adds the raise_memlock_limit utility. |
atom/entrypoints/openai_server.py |
Raises the memlock limit before starting the server. |
Review effort: Balanced
valar-cop
left a comment
There was a problem hiding this comment.
some changes needed..
e2e GLM-5.2 1P1D C112 eval on MI355X with the fix image?
ci green.
| if soft == hard: | ||
| return | ||
| try: | ||
| resource.setrlimit(resource.RLIMIT_MEMLOCK, (hard, hard)) |
There was a problem hiding this comment.
this raise is process-wide, so engram mlock2 also flips from refused to granted now. intended? if so please note it in docs..
Ready for review. No blocking issues; the SemiAnalysis validation run is pending.
Why
On the SemiAnalysis MI355X cluster, Slurm starts job steps with an 8 MiB RLIMIT_MEMLOCK soft limit, and the container's root has no CAP_IPC_LOCK. Every Mooncake KV registration of an ATOM P/D worker then fails with ENOMEM at startup, which has failed every P/D eval of SemiAnalysisAI/InferenceX#5120 since 2026-11-20.
What changed
raise_memlock_limitinatom.utils, called next toset_ulimitinatom.entrypoints.openai_server.Review focus
atom.entrypoints.openai_servercalls it. Every launch script, recipe and doc in the repo starts ATOM through that module.Testing
The unit test pins the raise and the no-op cases. A GPU run on an MI355X node with ionic NICs reproduces the ENOMEM at that soft limit and registers after the raise.
Jasen/raise-memlock-soft-limit @ 7dd01351a: tests/test_raise_memlock_limit.py 4 passed. ruff, black clean.Follow-ups
rocm/atom-dev:memlock-fix-5f3ae2b5b-20261123(5f3ae2b, the commit feat(agentx): add single-node TP8 mono points to the GLM-5.2 MI355X ATOM curve / feat(agentx):GLM-5.2 MI355X ATOM 曲线新增单机 TP8 mono 测试点 SemiAnalysisAI/InferenceX#5120's image was built from, plus this change) on the GLM-5.2 1P1D C112 eval. Results go here.Dev record
ib_umem_get, which charges RLIMIT_MEMLOCK before it pins. Only-EFAULTfalls through to the GPU peer path, so the limit check's ENOMEM is returned as is.peermem/peer_umem.cis identical in ionic-dkms 25.08.4.004 and 26.08.17.001.pd_slurm_job.shdoes.Evidence
MI355X node, ionic-dkms 26.03.3.001, image
rocm/atom-dev:nightly_202611200431with the host's ionic provider mounted, non-privileged container with--ulimit memlock=8388608:-1,MOONCAKE_DISABLE_HIP_DMABUF=1, a 1 GiB GPU buffer on rdma0:With
--cap-add IPC_LOCKthe same registration returns 0 before the raise.Cluster limits, read from the SGLang P/D setup script's log on the same two nodes:
RLIMIT_MEMLOCK of pid N: soft 4072153088 -> -1on 2026-11-19,soft 8388608 -> -1on 2026-11-21. Since 2026-11-20 every ATOM P/D eval log there shows each KV chunk failing withCannot allocate memory [12], thenMooncake register_memory failed.🤖 Generated with Claude Code