Skip to content

Test failure System.Text.Json.Serialization.Tests.ValueTests.VeryLongInputString(length: 1073741791) #63861

Open

Description

@VincentBu

Frequency:

Day Run
3/27-7/22
5/19 PR #69540
4/25 PR #66196
4/11 Official run
4/5 Official run
3/27 PR #65249
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('', 'VeryLongInputString', true, '', true);

Run: runtime-libraries-coreclr outerloop 20220116.5

Failed test:

net7.0-windows-Release-x64-CoreCLR_release-Windows.10.Amd64.ServerRS5.Open

- System.Text.Json.Serialization.Tests.ValueTests.VeryLongInputString(length: 1073741791)

Error message:

System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown.


Stack trace
   at System.Text.Json.JsonReaderHelper.TranscodeHelper(ReadOnlySpan`1 utf8Unescaped) in /_/src/libraries/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.Unescaping.cs:line 235
   at System.Text.Json.Utf8JsonReader.GetString() in /_/src/libraries/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs:line 36
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) in /_/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs:line 286
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) in /_/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.ReadCore.cs:line 114
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable`1 actualByteCount) in /_/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Helpers.cs:line 55
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo jsonTypeInfo) in /_/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.String.cs:line 398
   at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options) in /_/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.String.cs:line 53
   at System.Text.Json.Serialization.Tests.ValueTests.DeserializeLongJsonString(Int32 stringLength) in /_/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/Value.ReadTests.cs:line 479
   at System.Text.Json.Serialization.Tests.ValueTests.VeryLongInputString(Int32 length) in /_/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/Value.ReadTests.cs:line 458

Activity

  1. ghost added
    untriaged
    on Jan 17, 2022
  2. danmoseley commented on Jan 17, 2022

    @danmoseley
    Contributor

    curious, the OOM seems to have happened constructing the exception:

                catch (DecoderFallbackException ex)
                {
                    // We want to be consistent with the exception being thrown
                    // so the user only has to catch a single exception.
                    // Since we already throw InvalidOperationException for mismatch token type,
                    // and while unescaping, using that exception for failure to decode invalid UTF-8 bytes as well.
                    // Therefore, wrapping the DecoderFallbackException around an InvalidOperationException.
                    throw ThrowHelper.GetInvalidOperationException_ReadInvalidUTF8(ex); // <<<<<<<<<<<
                }
    
  3. added this to the 7.0.0 milestone on Jan 20, 2022
  4. self-assigned this
    on Jan 20, 2022
  5. removed
    untriaged
    on Jan 20, 2022
  6. VincentBu commented on Apr 6, 2022

    @VincentBu
    Author
  7. added
    blocking-outerloop
    on Apr 6, 2022
  8. krwq commented on Jul 12, 2022

    @krwq
    Member

    There two other OutOfMemory issues I've noticed:
    #71962
    #67943

    I'm not sure they're related but it might be useful hint for whoever is investigating

  9. karelz commented on Jul 22, 2022

    @karelz
    Member

    Didn't happen in 2+ months, removing blocking-outerloop label.

  10. removed
    blocking-outerloop
    on Jul 22, 2022
  11. modified the milestones: 7.0.0, Future on Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions