runtime: System.Text.Json.SourceGeneration.UnitTests.GeneratorTests failing with OutOfMemoryException on net7.0-windows-Release-x86-CoreCLR_checked-Windows.10.Amd64.Open

Affects:

  • System.Text.Json.SourceGeneration.UnitTests.GeneratorTests
  • System.Text.Json.SourceGeneration.UnitTests.JsonSourceGeneratorDiagnosticsTests

Official run failures are typically on net7.0-windows-Release-x86-CoreCLR_checked-Windows.10.Amd64.Open

Frequency 4/20-8/5 (incl. PRs from Kusto):

Day Run Notes
7/31 JIT stress 28x failures
7/30 Rolling run 2x failures
7/30 JIT stress 96x failures
7/28 JIT stress 1x failure
7/28 JIT stress 42x failures
7/27 Rolling run 20x failures
7/12 JIT stress 12x failures
7/11 Rolling run 18x failures – (12x at 9:08am + 6x at 3:48am)
7/11 JIT stress 18x failures
7/10 JIT stress 36x failures
7/9 JIT stress 12x failures
7/8 Rolling run 12x failures
7/8 JIT stress 24x failures
7/8 JIT stress - PR #71707 36x failures
7/7 JIT stress 24x failures
7/7 JIT stress - PR #71455 24x failures
let failedTests = (testNameSubstring : string, methodName : string, includePR : bool, messageSubstr: string, includePassedOnRerun : bool) {
cluster('engsrvprod.kusto.windows.net').database('engineeringdata').AzureDevOpsTests
    | where TestName contains testNameSubstring
    | where includePassedOnRerun or (Outcome == 'Failed')
    | extend startOfTestName = indexof_regex(TestName, @"[^.]+$")
    | extend Method = substring(TestName, startOfTestName)
    | extend Type = substring(TestName, 0, startOfTestName - 1)
    | project-away startOfTestName
    | where (methodName == '') or (Method == methodName)
    | where Message contains messageSubstr
    | distinct JobId, WorkItemId, Message, StackTrace, Method, Type, Arguments, Outcome
    | join kind=inner (cluster('engsrvprod.kusto.windows.net').database('engineeringdata').Jobs
        | where ((Branch == 'refs/heads/main') or (Branch == 'refs/heads/master') or (includePR and (Source startswith "pr/")))
        | where Type startswith "test/functional/cli/"
            and not(Properties contains "runtime-staging")
        | summarize arg_max(Finished, Properties, Type, Branch, Source, Started, QueueName) by JobId
        | project-rename JobType = Type) on JobId
    | extend PropertiesJson = parse_json(Properties)
    | extend OS = replace_regex(tostring(PropertiesJson.operatingSystem), @'\((.*)\).*|([^\(].*)', @'\1\2')
    | extend Runtime = iif(PropertiesJson.runtimeFlavor == "mono", "Mono", iif(PropertiesJson.DefinitionName contains "coreclr", "CoreCLR", ""))
    | extend TargetBranch = extractjson("$.['System.PullRequest.TargetBranch']", Properties)
    | extend Architecture = PropertiesJson.architecture
    | extend Scenario = iif(isempty(PropertiesJson.scenario), "--", PropertiesJson.scenario)
    //| extend DefinitionName = PropertiesJson.DefinitionName
    | project-away PropertiesJson
};
failedTests('System.Text.Json.SourceGeneration.UnitTests', '', true, 'OutOfMemoryException', true);
  • 7/22 Runfo report - only 3 builds affected in last 60 days (incl. PRs), with total of 30 test failures (2 failures are dupes):

Query, Log

Starting:    System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests (parallel test collections = on, max threads = 4)
    System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.TestMultipleDefinitions [FAIL]
      System.OutOfMemoryException : Insufficient memory to continue the execution of the program.
      Stack Trace:
        /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Windows.cs(135,0): at System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Internal/MemoryBlocks/StreamMemoryBlockProvider.cs(94,0): at System.Reflection.Internal.StreamMemoryBlockProvider.ReadMemoryBlockNoLock(Stream stream, Int64 start, Int32 size)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEReader.cs(167,0): at System.Reflection.PortableExecutable.PEReader..ctor(Stream peStream, PEStreamOptions options, Int32 size)
           at Microsoft.CodeAnalysis.ModuleMetadata.CreateFromStream(Stream peStream, PEStreamOptions options)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs(37,0): at System.Text.Json.SourceGeneration.UnitTests.CompilationHelper.CreateCompilation(String source, MetadataReference[] additionalReferences, String assemblyName, Boolean includeSTJ)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs(705,0): at System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.TestMultipleDefinitions()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs(74,0): at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
    System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.TypeDiscoveryWithRenamedAttribute [FAIL]
      System.OutOfMemoryException : Insufficient memory to continue the execution of the program.
      Stack Trace:
        /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Windows.cs(135,0): at System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Internal/MemoryBlocks/StreamMemoryBlockProvider.cs(94,0): at System.Reflection.Internal.StreamMemoryBlockProvider.ReadMemoryBlockNoLock(Stream stream, Int64 start, Int32 size)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEReader.cs(167,0): at System.Reflection.PortableExecutable.PEReader..ctor(Stream peStream, PEStreamOptions options, Int32 size)
           at Microsoft.CodeAnalysis.ModuleMetadata.CreateFromStream(Stream peStream, PEStreamOptions options)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs(37,0): at System.Text.Json.SourceGeneration.UnitTests.CompilationHelper.CreateCompilation(String source, MetadataReference[] additionalReferences, String assemblyName, Boolean includeSTJ)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs(125,0): at System.Text.Json.SourceGeneration.UnitTests.CompilationHelper.CreateReferencedLocationCompilation()
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs(166,0): at System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.TypeDiscoveryWithRenamedAttribute()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs(74,0): at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
    System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.RecordInExternalAssembly [FAIL]
      System.OutOfMemoryException : Insufficient memory to continue the execution of the program.
      Stack Trace:
        /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Windows.cs(135,0): at System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Internal/MemoryBlocks/StreamMemoryBlockProvider.cs(94,0): at System.Reflection.Internal.StreamMemoryBlockProvider.ReadMemoryBlockNoLock(Stream stream, Int64 start, Int32 size)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEReader.cs(167,0): at System.Reflection.PortableExecutable.PEReader..ctor(Stream peStream, PEStreamOptions options, Int32 size)
           at Microsoft.CodeAnalysis.ModuleMetadata.CreateFromStream(Stream peStream, PEStreamOptions options)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs(37,0): at System.Text.Json.SourceGeneration.UnitTests.CompilationHelper.CreateCompilation(String source, MetadataReference[] additionalReferences, String assemblyName, Boolean includeSTJ)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs(451,0): at System.Text.Json.SourceGeneration.UnitTests.CompilationHelper.CreateReferencedLibRecordCompilation()
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs(519,0): at System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.RecordInExternalAssembly()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs(74,0): at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
    System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.NoWarningsDueToObsoleteMembers [FAIL]
      System.OutOfMemoryException : Insufficient memory to continue the execution of the program.
      Stack Trace:
        /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Windows.cs(135,0): at System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Internal/MemoryBlocks/StreamMemoryBlockProvider.cs(94,0): at System.Reflection.Internal.StreamMemoryBlockProvider.ReadMemoryBlockNoLock(Stream stream, Int64 start, Int32 size)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEReader.cs(167,0): at System.Reflection.PortableExecutable.PEReader..ctor(Stream peStream, PEStreamOptions options, Int32 size)
           at Microsoft.CodeAnalysis.ModuleMetadata.CreateFromStream(Stream peStream, PEStreamOptions options)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs(37,0): at System.Text.Json.SourceGeneration.UnitTests.CompilationHelper.CreateCompilation(String source, MetadataReference[] additionalReferences, String assemblyName, Boolean includeSTJ)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs(741,0): at System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.NoWarningsDueToObsoleteMembers()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs(74,0): at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
    System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.RecordDerivedFromRecordInExternalAssembly [FAIL]
      System.OutOfMemoryException : Insufficient memory to continue the execution of the program.
      Stack Trace:
        /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Windows.cs(135,0): at System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Internal/MemoryBlocks/StreamMemoryBlockProvider.cs(94,0): at System.Reflection.Internal.StreamMemoryBlockProvider.ReadMemoryBlockNoLock(Stream stream, Int64 start, Int32 size)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEReader.cs(167,0): at System.Reflection.PortableExecutable.PEReader..ctor(Stream peStream, PEStreamOptions options, Int32 size)
           at Microsoft.CodeAnalysis.ModuleMetadata.CreateFromStream(Stream peStream, PEStreamOptions options)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs(37,0): at System.Text.Json.SourceGeneration.UnitTests.CompilationHelper.CreateCompilation(String source, MetadataReference[] additionalReferences, String assemblyName, Boolean includeSTJ)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs(478,0): at System.Text.Json.SourceGeneration.UnitTests.CompilationHelper.CreateReferencedSimpleLibRecordCompilation()
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs(565,0): at System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.RecordDerivedFromRecordInExternalAssembly()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs(74,0): at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
    System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.CollectionDictionarySourceGeneration [FAIL]
      System.OutOfMemoryException : Insufficient memory to continue the execution of the program.
      Stack Trace:
        /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Windows.cs(135,0): at System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Internal/MemoryBlocks/StreamMemoryBlockProvider.cs(94,0): at System.Reflection.Internal.StreamMemoryBlockProvider.ReadMemoryBlockNoLock(Stream stream, Int64 start, Int32 size)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEReader.cs(167,0): at System.Reflection.PortableExecutable.PEReader..ctor(Stream peStream, PEStreamOptions options, Int32 size)
           at Microsoft.CodeAnalysis.ModuleMetadata.CreateFromStream(Stream peStream, PEStreamOptions options)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs(37,0): at System.Text.Json.SourceGeneration.UnitTests.CompilationHelper.CreateCompilation(String source, MetadataReference[] additionalReferences, String assemblyName, Boolean includeSTJ)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs(181,0): at System.Text.Json.SourceGeneration.UnitTests.CompilationHelper.CreateReferencedHighLowTempsCompilation()
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs(348,0): at System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.CollectionDictionarySourceGeneration()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs(74,0): at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
    System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.NoErrorsWhenUsingIgnoredReservedCSharpKeywords [FAIL]
      System.OutOfMemoryException : Insufficient memory to continue the execution of the program.
      Stack Trace:
        /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Windows.cs(135,0): at System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Internal/MemoryBlocks/StreamMemoryBlockProvider.cs(94,0): at System.Reflection.Internal.StreamMemoryBlockProvider.ReadMemoryBlockNoLock(Stream stream, Int64 start, Int32 size)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEReader.cs(167,0): at System.Reflection.PortableExecutable.PEReader..ctor(Stream peStream, PEStreamOptions options, Int32 size)
           at Microsoft.CodeAnalysis.ModuleMetadata.CreateFromStream(Stream peStream, PEStreamOptions options)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs(37,0): at System.Text.Json.SourceGeneration.UnitTests.CompilationHelper.CreateCompilation(String source, MetadataReference[] additionalReferences, String assemblyName, Boolean includeSTJ)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs(801,0): at System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.NoErrorsWhenUsingIgnoredReservedCSharpKeywords()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs(74,0): at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
    System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.LocalJsonSerializableAttributeExpectedShape(assemblyName: "System.Text.Json", includeSTJ: True) [FAIL]
      System.OutOfMemoryException : Insufficient memory to continue the execution of the program.
      Stack Trace:
        /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Windows.cs(135,0): at System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Internal/MemoryBlocks/StreamMemoryBlockProvider.cs(94,0): at System.Reflection.Internal.StreamMemoryBlockProvider.ReadMemoryBlockNoLock(Stream stream, Int64 start, Int32 size)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEReader.cs(167,0): at System.Reflection.PortableExecutable.PEReader..ctor(Stream peStream, PEStreamOptions options, Int32 size)
           at Microsoft.CodeAnalysis.ModuleMetadata.CreateFromStream(Stream peStream, PEStreamOptions options)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs(37,0): at System.Text.Json.SourceGeneration.UnitTests.CompilationHelper.CreateCompilation(String source, MetadataReference[] additionalReferences, String assemblyName, Boolean includeSTJ)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs(277,0): at System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.LocalJsonSerializableAttributeExpectedShape(String assemblyName, Boolean includeSTJ)
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs(74,0): at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
    System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.LocalJsonSerializableAttributeExpectedShape(assemblyName: "System.Text.Json.Not", includeSTJ: True) [FAIL]
      System.OutOfMemoryException : Insufficient memory to continue the execution of the program.
      Stack Trace:
        /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Windows.cs(135,0): at System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Internal/MemoryBlocks/StreamMemoryBlockProvider.cs(94,0): at System.Reflection.Internal.StreamMemoryBlockProvider.ReadMemoryBlockNoLock(Stream stream, Int64 start, Int32 size)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEReader.cs(167,0): at System.Reflection.PortableExecutable.PEReader..ctor(Stream peStream, PEStreamOptions options, Int32 size)
           at Microsoft.CodeAnalysis.ModuleMetadata.CreateFromStream(Stream peStream, PEStreamOptions options)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs(37,0): at System.Text.Json.SourceGeneration.UnitTests.CompilationHelper.CreateCompilation(String source, MetadataReference[] additionalReferences, String assemblyName, Boolean includeSTJ)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs(277,0): at System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.LocalJsonSerializableAttributeExpectedShape(String assemblyName, Boolean includeSTJ)
           at InvokeStub_GeneratorTests.LocalJsonSerializableAttributeExpectedShape(Object, Object, IntPtr*)
           at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
    System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.LocalJsonSerializableAttributeExpectedShape(assemblyName: "System.Text.Json", includeSTJ: False) [FAIL]
      System.OutOfMemoryException : Insufficient memory to continue the execution of the program.
      Stack Trace:
        /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Windows.cs(135,0): at System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Internal/MemoryBlocks/StreamMemoryBlockProvider.cs(94,0): at System.Reflection.Internal.StreamMemoryBlockProvider.ReadMemoryBlockNoLock(Stream stream, Int64 start, Int32 size)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEReader.cs(167,0): at System.Reflection.PortableExecutable.PEReader..ctor(Stream peStream, PEStreamOptions options, Int32 size)
           at Microsoft.CodeAnalysis.ModuleMetadata.CreateFromStream(Stream peStream, PEStreamOptions options)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs(37,0): at System.Text.Json.SourceGeneration.UnitTests.CompilationHelper.CreateCompilation(String source, MetadataReference[] additionalReferences, String assemblyName, Boolean includeSTJ)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs(277,0): at System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.LocalJsonSerializableAttributeExpectedShape(String assemblyName, Boolean includeSTJ)
           at InvokeStub_GeneratorTests.LocalJsonSerializableAttributeExpectedShape(Object, Object, IntPtr*)
           at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
    System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.LocalJsonSerializableAttributeExpectedShape(assemblyName: "System.Text.Json.Not", includeSTJ: False) [FAIL]
      System.OutOfMemoryException : Insufficient memory to continue the execution of the program.
      Stack Trace:
        /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Windows.cs(135,0): at System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Internal/MemoryBlocks/StreamMemoryBlockProvider.cs(94,0): at System.Reflection.Internal.StreamMemoryBlockProvider.ReadMemoryBlockNoLock(Stream stream, Int64 start, Int32 size)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEReader.cs(167,0): at System.Reflection.PortableExecutable.PEReader..ctor(Stream peStream, PEStreamOptions options, Int32 size)
           at Microsoft.CodeAnalysis.ModuleMetadata.CreateFromStream(Stream peStream, PEStreamOptions options)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs(37,0): at System.Text.Json.SourceGeneration.UnitTests.CompilationHelper.CreateCompilation(String source, MetadataReference[] additionalReferences, String assemblyName, Boolean includeSTJ)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs(277,0): at System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.LocalJsonSerializableAttributeExpectedShape(String assemblyName, Boolean includeSTJ)
           at InvokeStub_GeneratorTests.LocalJsonSerializableAttributeExpectedShape(Object, Object, IntPtr*)
           at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
    System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.ContextTypeNotInNamespace [FAIL]
      System.OutOfMemoryException : Insufficient memory to continue the execution of the program.
      Stack Trace:
        /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Windows.cs(135,0): at System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Internal/MemoryBlocks/StreamMemoryBlockProvider.cs(94,0): at System.Reflection.Internal.StreamMemoryBlockProvider.ReadMemoryBlockNoLock(Stream stream, Int64 start, Int32 size)
        /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEReader.cs(167,0): at System.Reflection.PortableExecutable.PEReader..ctor(Stream peStream, PEStreamOptions options, Int32 size)
           at Microsoft.CodeAnalysis.ModuleMetadata.CreateFromStream(Stream peStream, PEStreamOptions options)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs(37,0): at System.Text.Json.SourceGeneration.UnitTests.CompilationHelper.CreateCompilation(String source, MetadataReference[] additionalReferences, String assemblyName, Boolean includeSTJ)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs(428,0): at System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.ContextTypeNotInNamespace()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs(74,0): at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
  Finished:    System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 16 (15 by maintainers)

Most upvoted comments

Note: It has been problem only in 3 builds in last 60 days (see top post). Removing the blocking-clean-ci label for now.

I do see pretty significant memory usage in this test when running it locally: image