Skip to content

Regex outer loop tests running out of memory on Ubuntu 1804 #46516

@danmoseley

Description

@danmoseley

The outerloop System.Text.RegularExpressions.Tests fail about 2x a day almost every day only on ubuntu.1804.amd64.open.rt only in Outer Loop always with SIGKILL. This is presumably due to OOM killer.

In the last 3 months, no other libraries test suite has had this problem.

Eg., https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-master-36e21453dd484dfca1/System.Text.RegularExpressions.Tests/console.de8aa6f6.log?sv=2019-07-07&se=2021-01-03T12%3A37%3A33Z&sr=c&sp=rl&sig=O1WTjavaLor8rdY2flH%2Fx4t07lueHX%2F0JICO5fQ1s3I%3D

  Discovering: System.Text.RegularExpressions.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Text.RegularExpressions.Tests (found 17 of 217 test cases)
  Starting:    System.Text.RegularExpressions.Tests (parallel test collections = on, max threads = 2)
./RunTests.sh: line 161: 16354 Killed                  "$RUNTIME_PATH/dotnet" exec --runtimeconfig System.Text.RegularExpressions.Tests.runtimeconfig.json --depsfile System.Text.RegularExpressions.Tests.deps.json xunit.console.dll System.Text.RegularExpressions.Tests.dll -xml testResults.xml -nologo -nocolor -trait category=OuterLoop -notrait category=IgnoreForCI -notrait category=failing $RSP_FILE
~/work/AA590988/w/B89A0948/e
----- end Mon Dec 14 12:40:34 UTC 2020 ----- exit code 137 ----------------------------------------------------------
exit code 137 means SIGKILL Killed eg by kill
Waiting a few seconds for any dump to be written..
Looking around for any Linux dump..
... found no dump in /home/helixbot/work/AA590988/w/B89A0948/e
+ export _commandExitCode=137

There are 4 regex tests that are outer loop (outer loop runs do not any inner loop tests) and only 2 of them look likely to use much memory, and they are both already 64 bit only:

        // On 32-bit we can't test these high inputs as they cause OutOfMemoryExceptions.
        [OuterLoop("Can take several seconds")]
        [ConditionalTheory(typeof(Environment), nameof(Environment.Is64BitProcess))]

I am guessing that ubuntu.1804.amd64.open.rt machines / containers are configured to have less memory (?). I will make a change to log /proc/meminfo and /etc/sysctl.conf in Helix to see.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions