Repository navigation
Conversation
Each forked test process now caps its address space at the size it inherits plus ROUTERARENA_LCB_MEMORY_HEADROOM_BYTES (default 2 GiB, 0 disables). Generated code that allocates without bound raises MemoryError and fails the test, instead of exhausting the evaluation runner and ending the job with exit code 143. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Oct 24, 2026
Author
|
Verification on GitHub's standard runner: I ran this repository's own
The verification PR is wmlba/routerarena-verification#1. Once this is merged, I'll update #237 from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #238.
What
run_tests_for_one_examplenow caps the forked test process's address space before running generated code. The cap is the size inherited from the evaluator plusLCB_MEMORY_HEADROOM_BYTES:ROUTERARENA_LCB_MEMORY_HEADROOM_BYTES, where0disables it.It is applied with
resource.setrlimit(RLIMIT_AS, ...)beforereliability_guard()hides theresourcemodule. Generated code that allocates past the cap raisesMemoryError, which the existing per-testexcept Exceptionrecords as a failed test. On non-Linux systems, where/procis unavailable, the function does nothing.Why
Without a memory limit, one completion that allocates without bound grows until the wall-clock timeout. On the 16 GB
ubuntu-latestrunner, memory-pressure handling terminates the whole evaluation job first (exit code 143), so no results are posted. See the issue for details.Validation
mainKT-ModelRouterLiveCodeBench rows (385)For
cruq-routerandnadir-cascade-v2(385 LiveCodeBench rows each), 3 and 2 rows differed between runs with and without the fix:ruff check,ruff format --checkandmypy(Python 3.9 and 3.11, repository config) pass.