Skip to content

Compile at most one heavy JSON sample at a time in a test shard - #591

Merged
jonathanperis merged 1 commit into
mainfrom
fix/one-heavy-sample-at-once
Dec 3, 2026
Merged

jonathanperis merged 1 commit into
mainfrom
fix/one-heavy-sample-at-once

Conversation

@jonathanperis

@jonathanperis jonathanperis commented Dec 3, 2026 •

Copy link
Copy Markdown
Owner

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_types 4.0 GiB, 317_json_deserialize 3.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.sh starts at most one of them at a time when CSHARPC_JOBS > 1; other samples run beside it. Output order and results are unchanged.

Tested by running run_pass with 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-based System.Text.Json samples that peak at ~3–4 GiB compile RAM on wasm) and updates tests/run.sh so when CSHARPC_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.md documents 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.

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.
@jonathanperis jonathanperis added this to the Drop-in for large apps milestone Dec 3, 2026
@jonathanperis jonathanperis added bug Something isn't working ci Continuous integration labels Dec 3, 2026
@jonathanperis jonathanperis self-assigned this Dec 3, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread tests/run.sh
if [[ "$HEAVY" == *" $name "* ]]; then
while [[ -n "$heavy" && ! -f "$res/$heavy.rc" && -d "$res/w$heavy" ]] && (( running > 0 )); do reap; done
heavy=$i
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 9262900. Configure here.

@jonathanperis
jonathanperis merged commit 930a4c9 into main Dec 3, 2026
29 checks passed
@jonathanperis
jonathanperis deleted the fix/one-heavy-sample-at-once branch December 3, 2026 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci Continuous integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant