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
{{ message }}
Repository navigation
Flaky CI: x86 .NET Framework tests fail with memory exhaustion under heavy threading #3608
The x86 process has a ~2GB virtual address space limit. These tests create extreme parallel workloads:
ImageScalingMultipleThreadsTest(100, 1000): 100 threads × 1000 iterations of decode→scale→encode, plus a background GC.Collect() loop. The ComputeThumbnail helper doesn't dispose bitmaps/images/data, relying on GC which can't keep up.
EnsureMultithreadingDoesNotThrow(1000): 1000 concurrent tasks, each decoding a full JPEG to bitmap + allocating byte[height, width].
Impact
These failures cause the Tests stage to fail on every build of main, blocking merges via branch protection.
Recommendations
Add disposal in test loops — ComputeThumbnail leaks bitmap/image/data objects. Add using statements.
Reduce x86 parameters — The (10, 10) variant already tests thread-safety. Skip the stress variant on x86:
if(IntPtr.Size==4&&numThreads>10)thrownewSkipException("Stress test skipped on x86 (address space limit)");
Isolate stress tests — Run high-memory tests in separate processes to avoid address space poisoning for subsequent tests.
Data
Analyzed 10 recent main builds (156223–156430). These two tests account for 35 of ~46 total test failure instances.
Activity
Investigating #3608: Fix x86 .NET Framework threading test failures
[tests] Fix x86 .NET Framework threading test OOM failures
[tests] Skip x86 stress variants of threading/GC tests
[benchmarks] Add GC reclamation and native memory leak benchmarks
[benchmarks] Add GC reclamation and native memory leak benchmarks
[benchmarks] Add memory diagnostics benchmarks and CI stage (#3608)
[benchmarks] Add memory diagnostics benchmarks and CI stage (#3608)
[benchmarks] Add memory diagnostics benchmarks and CI stage (#3608)
[benchmarks] Add memory diagnostics benchmarks and CI stage (#3608)
[benchmarks] Add memory diagnostics benchmarks and CI stage (#3608)
[benchmarks] Add memory diagnostics benchmarks and CI stage (#3608)
[benchmarks] Add memory diagnostics benchmarks and CI stage (#3608)
[benchmarks] Add memory diagnostics benchmarks and CI stage (#3608)
Fix x86 .NET Framework threading test OOM failures (#3608)
Fix x86 .NET Framework threading test OOM failures (#3608)
Fix x86 .NET Framework threading test OOM failures (#3608) (#3674)
Fix x86 .NET Framework threading test OOM failures (#3608)
Fix x86 .NET Framework threading test OOM failures (#4105)
Skip the heavy bitmap-threading stress variant on musl (#4515)
[infra] Add containerized test legs: Azure Linux, Alpine/musl, Nano S…
[infra] Add containerized test legs: Azure Linux, Alpine/musl, Nano S…