Skip to content

[wasm] Linker crashing with System.NotImplementedException: switch #71848

Closed

Description

@radical

Failing on an unrelated #71821 build.

ILLink : error IL1012: IL Trimmer has encountered an unexpected error. Please report the issue at https://github.com/dotnet/linker/issues [/__w/1/s/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/System.Text.RegularExpressions.Tests.csproj]
##[error]ILLink(0,0): error IL1012: (NETCORE_ENGINEERING_TELEMETRY=Build) IL Trimmer has encountered an unexpected error. Please report the issue at https://github.com/dotnet/linker/issues
  Fatal error in IL Linker
  Unhandled exception. System.NotImplementedException: switch
     at Mono.Linker.Steps.UnreachableBlocksOptimizer.BodyReducer.IsConstantBranch(OpCode opCode, Int32 operand)
     at Mono.Linker.Steps.UnreachableBlocksOptimizer.BodyReducer.RemoveConditions()
     at Mono.Linker.Steps.UnreachableBlocksOptimizer.BodyReducer.RewriteBody()
     at Mono.Linker.Steps.UnreachableBlocksOptimizer.ProcessMethod(MethodDefinition method)
     at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method, DependencyInfo& reason, MessageOrigin& origin)
     at Mono.Linker.Steps.MarkStep.ProcessQueue()
     at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
     at Mono.Linker.Steps.MarkStep.Process()
     at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
     at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
     at Mono.Linker.Pipeline.Process(LinkContext context)
     at Mono.Linker.Driver.Run(ILogger customLogger)
     at Mono.Linker.Driver.Main(String[] args)
/__w/1/s/.dotnet/sdk/7.0.100-preview.5.22307.18/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ILLink.targets(110,5): error NETSDK1144: Optimizing assemblies for size failed. Optimization can be disabled by setting the PublishTrimmed property to false. [/__w/1/s/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/System.Text.RegularExpressions.Tests.csproj]
##[error].dotnet/sdk/7.0.100-preview.5.22307.18/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ILLink.targets(110,5): error NETSDK1144: (NETCORE_ENGINEERING_TELEMETRY=Build) Optimizing assemblies for size failed. Optimization can be disabled by setting the PublishTrimmed property to false.

Interestingly, this is failing only for the wasm/highresource_aot jobs, and not the regular AOT ones.

  • highresource_aot: runs some library tests, and run them on the build machine itself
  • regular EAT/AOT: runs the tests on helix

Could it be using an older linker?

cc @vitek-karas @sbomer @marek-safar

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Jul 8, 2022
  2. added
    arch-wasmWebAssembly architecture
    blocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
    linkable-frameworkIssues associated with delivering a linker friendly framework
    and removed
    untriagedNew issue has not been triaged by the area owner
    on Jul 8, 2022
  3. changed the title [-]Linker crashing with `System.NotImplementedException: switch`[/-] [+][wasm] Linker crashing with `System.NotImplementedException: switch`[/+] on Jul 8, 2022
  4. lewing commented on Jul 8, 2022

    @lewing
    Member

    System.Text.RegularExpressions.Tests is high resource so that makes sense

  5. radical commented on Jul 9, 2022

    @radical
    MemberAuthor

    System.Text.RegularExpressions.Tests isn't built in EAT, or AOT builds. Only in the highresource_aot .

  6. pavelsavara commented on Jul 9, 2022

    @pavelsavara
    Member
  7. added
    disabled-testThe test is disabled in source code against the issue
    and removed
    blocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
    on Jul 12, 2022
  8. vitek-karas commented on Jul 12, 2022

    @vitek-karas
    Member

    dotnet/linker#2889 has a fix to make linker not crash.

  9. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Jul 13, 2022
  10. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Jul 13, 2022
  11. ghost locked as resolved and limited conversation to collaborators on Aug 12, 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

    Labels

    arch-wasmWebAssembly architecturearea-AssemblyLoader-coreclronly use for closed issuesdisabled-testThe test is disabled in source code against the issuelinkable-frameworkIssues associated with delivering a linker friendly framework

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions