Repository navigation
Compile at most one heavy JSON sample at a time in a test shard - #591
Merged
Merged
Conversation
CI runs three samples at once on 16 GB runners. The reflection-based JSON samples need 3 to 4 GiB each to compile for wasm32 at -O2 (325_json_types 4.0 GiB, 317_json_deserialize 3.1 GiB, both unfinished after 500 s on a loaded host), so three of them meeting in one shard can run the runner out of memory: wasm32 shard 0 lost its runner on two pull requests whose new sample had put them together (a rerun of each passed). Other samples still run beside a heavy one.
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9262900. Configure here.
| if [[ "$HEAVY" == *" $name "* ]]; then | ||
| while [[ -n "$heavy" && ! -f "$res/$heavy.rc" && -d "$res/w$heavy" ]] && (( running > 0 )); do reap; done | ||
| heavy=$i | ||
| fi |
Contributor
There was a problem hiding this comment.
Heavy gate skips serial samples
Medium Severity
The one-heavy gate sits in the non-serial branch. Every multi-gigabyte JSON sample except 1313_json_reflection_disabled is already in tests/serial-samples.txt, so those compiles still drain the queue and never update heavy. Ordinary samples still do not run beside them.
Reviewed by Cursor Bugbot for commit 9262900. Configure here.
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.


Part of #590
WebAssembly's differential shard 0 lost its runner on #581 and #582 (2026-12-03), about an hour in, with the same message; a rerun of each passed. Both PRs add one sample, which shifts the same heavy JSON samples into one shard.
Measured (linux-x64 host under load, wasm32-wasip1, -O2, peak of one compile, both stopped at 500 s unfinished):
325_json_types4.0 GiB,317_json_deserialize3.1 GiB. CI runs three samples at once on a 16 GB runner. That the runner died of memory is an inference: its logs are lost.Change.
tests/heavy-samples.txt(the 17 samples the Bootstrap job already treats as heavy):tests/run.shstarts at most one of them at a time whenCSHARPC_JOBS> 1; other samples run beside it. Output order and results are unchanged.Tested by running
run_passwith stand-in samples: at most 1 heavy and 3 jobs at once, serial samples alone, output in order. No compile was run locally for this; CI's shards on this PR are the check, including their durations.Note
Low Risk
Test-runner scheduling and documentation only; no compiler or production code paths.
Overview
Adds
tests/heavy-samples.txt(17 reflection-basedSystem.Text.Jsonsamples that peak at ~3–4 GiB compile RAM on wasm) and updatestests/run.shso whenCSHARPC_JOBS> 1, at most one listed heavy sample compiles concurrently—the scheduler waits for an in-flight heavy compile before starting another, while non-heavy samples still share the job pool. Output order and pass/fail semantics stay the same.docs/05-testing.mddocuments this alongside the existing serial-sample rules, tying it to CI OOM on 16 GB runners (#590).Reviewed by Cursor Bugbot for commit 9262900. Bugbot is set up for automated code reviews on this repo. Configure here.