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
The device-emulator image's runtime memlock budget (default container value ulimit -l = 8192 KB on most hosts) is too small for the pinned buffer pools used by the proxy server and its zero-copy data path. This becomes a hard failure on any code path that allocates a non-trivial bucketed buffer; for example, the #55 4 MiB bandwidth probe throws:
exception caught in Thread proxy_listener0
reason: AlignedBufferPool: pin_fn_ failed
The fix on the operator side is docker run --ulimit memlock=-1 ..., and this is now documented in docs/deployment.md under "Quick start with --measurement" (commit 7077777). But:
The other Quick-start examples earlier in deployment.md don't include the flag.
Nothing in the Dockerfile or make docker-build / make docker-test Makefile targets sets it.
There's no runtime check that fails early with a friendlier error.
Suggested fix (one of, or any combination)
A — Update all documented docker run invocations in docs/deployment.md, docs/DOCKER.md, and docs/DEV_README.md to consistently include --ulimit memlock=-1.
B — Update Makefile targets (docker-test, docker-run, etc.) to pass --ulimit memlock=-1 so users using make don't hit this even once.
C — Add a runtime preflight check in ProxyEnvCfg::Initialize (or wherever the buffer pools are first allocated) that calls getrlimit(RLIMIT_MEMLOCK) and logs a LOG_WARN if it's below some sensible threshold (e.g. bandwidth_payload_bytes * 4), pointing at the deployment docs. Pure ergonomics — doesn't change behavior, just turns a cryptic pin_fn_ failed into a directed warning.
Why this matters
The current behavior (silent failure on the server listener thread mid-flight, no front-line error message) is exactly the kind of thing that costs a new contributor a half-day. Surfaced during #55 step 8; not a #55 bug but worth fixing once.
Fixed by commit fafc9f0 (option A + B from the issue). The --ulimit memlock=-1 flag is now consistently present in:
Makefile (docker-test target + help text, via $(DOCKER_RUN_FLAGS))
README.md Testing section
CONTRIBUTING.md Running tests block
tests/cpp/README.md individual-binary example
dev.sh (both quickstart and start_container_common)
Option (C) — runtime getrlimit preflight LOG_WARN — deliberately deferred; A+B addresses the contributor-friction path (copy-paste a README one-liner and get a confusing crash). If the cryptic pin_fn_ failed keeps surfacing in production after these doc fixes, open a follow-up for the preflight check.
Verified: make -n docker-test prints the expected command; docker run --rm --gpus all --ulimit memlock=-1 device-emulator:latest python3 -m pytest tests -v exits 0 (112 passed / 10 skipped, matching the post-#55 baseline).
Activity
drunkcoding commentedon May 31, 2026
Fixed by commit fafc9f0 (option A + B from the issue). The
--ulimit memlock=-1flag is now consistently present in:Makefile(docker-testtarget + help text, via$(DOCKER_RUN_FLAGS))README.mdTesting sectionCONTRIBUTING.mdRunning tests blocktests/cpp/README.mdindividual-binary exampledev.sh(bothquickstartandstart_container_common)Option (C) — runtime
getrlimitpreflightLOG_WARN— deliberately deferred; A+B addresses the contributor-friction path (copy-paste a README one-liner and get a confusing crash). If the crypticpin_fn_ failedkeeps surfacing in production after these doc fixes, open a follow-up for the preflight check.Verified:
make -n docker-testprints the expected command;docker run --rm --gpus all --ulimit memlock=-1 device-emulator:latest python3 -m pytest tests -vexits 0 (112 passed / 10 skipped, matching the post-#55 baseline).docs,infra: consistent --ulimit memlock=-1 on docker run (#59)
docs,infra: consistent --ulimit memlock=-1 on docker run (#59)