Skip to content

Test failure: System.Security.Cryptography.Xml.Tests.XmlDsigExcC14NTransformTest.ExcC14NSpecExample5 #113049

Closed

Description

@v-wenyuxu

Failed in: runtime-coreclr libraries-jitstress-random 20250301.1

Failed tests:

net10.0-linux-Release-arm64-jitstress_random_1-(Ubuntu.2404.Arm64.Open)Ubuntu.2204.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-24.04-helix-arm64v8
    - System.Security.Cryptography.Xml.Tests.XmlDsigExcC14NTransformTest.ExcC14NSpecExample5
    - System.Security.Cryptography.Xml.Tests.XmlDsigExcC14NTransformTest.ExcC14NSpecExample1
    - System.Security.Cryptography.Xml.Tests.XmlDsigC14NTransformTest.C14NSpecExample1
    - System.Security.Cryptography.Xml.Tests.XmlDsigC14NTransformTest.C14NSpecExample5
    - System.Security.Cryptography.Xml.Tests.XmlDsigC14NWithCommentsTransformTest.C14NSpecExample1
    - System.Security.Cryptography.Xml.Tests.XmlDsigC14NWithCommentsTransformTest.C14NSpecExample5

Error message:

 System.ArgumentOutOfRangeException : Specified argument was out of the range of valid values. (Parameter 'start')

Stack trace:

   at System.Uri.ParseSchemeCheckImplicitFile(String uriString, ParsingError& err, Flags& flags, UriParser& syntax) in /_/src/libraries/System.Private.Uri/src/System/Uri.cs:line 3706
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions) in /_/src/libraries/System.Private.Uri/src/System/UriExt.cs:line 39
   at System.Xml.Resolvers.XmlPreloadedResolver..ctor(XmlResolver fallbackResolver, XmlKnownDtds preloadedDtds, IEqualityComparer`1 uriComparer) in /_/src/libraries/System.Private.Xml/src/System/Xml/Resolvers/XmlPreloadedResolver.cs:line 182
   at System.Security.Cryptography.Xml.Tests.XmlDsigExcC14NTransformTest.ExcC14NSpecExample5() in /_/src/libraries/System.Security.Cryptography.Xml/tests/XmlDsigExcC14NTransformTest.cs:line 328
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 57

Activity

  1. dotnet-policy-service commented on Mar 3, 2025

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones
    See info in area-owners.md if you want to be subscribed.

  2. vcsjones commented on Mar 3, 2025

    @vcsjones
    Member

    This test passes locally for me, even with DOTNET_TieredCompilation=0 DOTNET_JitStress=5e. As another observation, this failure looks deeper inside System.Uri.

    Either the underlying problem is due to JIT stress, or an issue in System.Uri, so I don't think there is much do be done for System.Security.

  3. added
    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
    and removed on Mar 3, 2025
  4. dotnet-policy-service commented on Mar 3, 2025

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
    See info in area-owners.md if you want to be subscribed.

  5. removed
    untriagedNew issue has not been triaged by the area owner
    on Mar 6, 2025
  6. added this to the 10.0.0 milestone on Mar 6, 2025
  7. JulieLeeMSFT commented on Mar 6, 2025

    @JulieLeeMSFT
    Member

    @kunalspathak, please check the JIT stress failure on Arm64.

  8. kunalspathak commented on Mar 6, 2025

    @kunalspathak
    Contributor

    The repro is not consistent but I can see the failure once in every 3-4 runs. The reason of inconsistency is timing of tiering of methods that may get inlined in the problematic method that has bad code gen.
    When there is no repro, I see the method System.Uri:ParseSchemeCheckImplicitFile is jitted with this information:

    ; 3 inlinees with PGO data; 13 single block inlinees; 2 inlinees without PGO data
    

    But when it repros, I see it is jitted with:

    ; 6 inlinees with PGO data; 24 single block inlinees; 5 inlinees without PGO data
    

    When I see the difference between repro and non-repro, it seems that we are missing tbnz instruction. Left is no-repro case, right is repro case. The hightlighted labels in each of them goes to throw ArgumentOutOfRangeException()

    Image

  9. kunalspathak commented on Mar 6, 2025

    @kunalspathak
    Contributor

    Most likely coming from #112411

  10. kunalspathak commented on Mar 7, 2025

    @kunalspathak
    Contributor

    git bisect is pointing to #112766, and I can see it repros starting 12bf864 (after you reapplied your proper fix), this might be a different issue related to bounds check. Here are the superpmi collections (based on 12bf864 ). You should see in bad case, [000098] is eliminated.

    good_linux.arm64.Checked.3.mch.zip
    bad_linux.arm64.Checked.4.mch.zip

    Method name of interest: ParseSchemeCheckImplicitFile

    superpmi.exe -c 3441 clrjit_universal_arm64_x64.dll bad.mch
    superpmi.exe -c 1667 clrjit_universal_arm64_x64.dll good.mch
    

    cc: @EgorBo

  11. kunalspathak commented on Mar 7, 2025

    @kunalspathak
    Contributor

    Yep, just double confirmed on main that the patch added in #112766 around optAssertionProp_RangeProperties makes it add constant assertion and eliminate the branch. @EgorBo , since you have touched this lately, i will let you investigate further.

    Image

  12. amanasifkhalid commented on Mar 17, 2025

    @amanasifkhalid
    Contributor

    #113052 looks like the same issue

  13. added
    in-prThere is an active PR which will close this issue when it is merged
    on Mar 18, 2025
  14. locked and limited conversation to collaborators on Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

JitStressCLR JIT issues involving JIT internal stress modesarch-arm64area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIblocking-clean-ci-optionalBlocking optional rolling runsin-prThere is an active PR which will close this issue when it is mergedos-linuxLinux OS (any supported distro)

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions