Skip to content

Test failure: ConsoleEncoding.TestEncoding - NotSupportedException : Memory stream is not expandable #73534

@karelz

Description

@karelz

Test affected:

  • ConsoleEncoding.TestEncoding

Occurrences 4/5-8/7 (incl. PRs) from Kusto (see query below) or Runfo last 30 days: (average 1 failure per week)

Day Run OS
9/7 Rolling run 7799 Debian.10.Amd64 - Mono Interpreter
9/1 PR #74883 Debian.10.Amd64.Open - Mono Interpreter - release/7.0
8/25 PR #74570 Debian.10.Amd64.Open - Mono Interpreter - release/7.0
8/22 PR #74358 Debian.10.Amd64.Open - Mono Interpreter
8/7 Rolling run 1928257 Debian.10.Amd64 - Mono Interpreter
8/5 PR #73482 Debian.10.Amd64 - Mono Interpreter
7/26 PR #72817 Debian.10.Amd64 - Mono Interpreter
7/26 PR #72865 Debian.10.Amd64 - Mono Interpreter
7/20 PR #72154 Debian.10.Amd64 - Mono Interpreter
7/19 PR #72416 Debian.10.Amd64 - Mono Interpreter
7/14 PR #72126 Debian.10.Amd64 - Mono Interpreter
6/14 PR #70731 Debian.10.Amd64 - Mono Interpreter
6/14 PR #70705 Debian.10.Amd64 - Mono Interpreter
5/30 Rolling run Debian.10.Amd64 - Mono Interpreter

Test output: (fails on different strings in different runs)

    ConsoleEncoding.TestEncoding(inputString: "This is Ascii string") [FAIL]
      System.NotSupportedException : Memory stream is not expandable.
      Stack Trace:
        /_/src/libraries/System.Private.CoreLib/src/System/IO/MemoryStream.cs(272,0): at System.IO.MemoryStream.set_Capacity(Int32 value)
        /_/src/libraries/System.Private.CoreLib/src/System/IO/MemoryStream.cs(156,0): at System.IO.MemoryStream.EnsureCapacity(Int32 value)
        /_/src/libraries/System.Private.CoreLib/src/System/IO/MemoryStream.cs(665,0): at System.IO.MemoryStream.Write(ReadOnlySpan`1 buffer)
        /_/src/libraries/System.Private.CoreLib/src/System/IO/StreamWriter.cs(315,0): at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
        /_/src/libraries/System.Private.CoreLib/src/System/IO/StreamWriter.cs(208,0): at System.IO.StreamWriter.Dispose(Boolean disposing)
        /_/src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.cs(65,0): at System.IO.TextWriter.Dispose()
        /_/src/libraries/System.Console/tests/ConsoleEncoding.cs(55,0): at ConsoleEncoding.TestEncoding(String inputString)
        /_/src/mono/System.Private.CoreLib/src/System/Reflection/MethodInvoker.Mono.cs(33,0): at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, Span`1 args, BindingFlags invokeAttr)
let failedTests = (testNameSubstring : string, methodName : string, messageSubstr: string, includePR : bool, 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(
    '', //testNameSubstring
    'TestEncoding', //methodName
    'Memory stream is not expandable', //messageSubstr
    true,  //includePR
    true); //includePassedOnRerun

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions