Skip to content

Bump SDK to recent alpha #111311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Bump SDK to recent alpha #111311

wants to merge 1 commit into from

Conversation

am11
Copy link
Member

@am11 am11 commented Jan 11, 2025

No description provided.

@ghost ghost added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jan 11, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jan 11, 2025
@am11 am11 added area-Infrastructure and removed community-contribution Indicates that the PR has been added by a community member needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jan 11, 2025
@am11 am11 requested a review from ViktorHofer January 11, 2025 19:56
@ViktorHofer
Copy link
Member

I think at this point we should be consistent with the rest of the repos. Can you please submit this change into Arcade?

@am11
Copy link
Member Author

am11 commented Jan 14, 2025

Matched version used by dotnet/arcade#15404.

@ViktorHofer
Copy link
Member

ViktorHofer commented Jan 15, 2025

    System.Text.RegularExpressions.Tests.RegexMatchTests.Match_ExcessPrefix(engine: SourceGenerated) [FAIL]
      Microsoft.DotNet.RemoteExecutor.RemoteExecutionException : Exit code was 134 but it should have been 42
      Stack Trace:
        /_/src/Microsoft.DotNet.RemoteExecutor/src/RemoteInvokeHandle.cs(242,0): at Microsoft.DotNet.RemoteExecutor.RemoteInvokeHandle.Dispose(Boolean disposing)
        /_/src/Microsoft.DotNet.RemoteExecutor/src/RemoteInvokeHandle.cs(55,0): at Microsoft.DotNet.RemoteExecutor.RemoteInvokeHandle.Dispose()
        /_/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/Regex.Match.Tests.cs(1969,0): at System.Text.RegularExpressions.Tests.RegexMatchTests.Match_ExcessPrefix(RegexEngine engine)
           at InvokeStub_RegexMatchTests.Match_ExcessPrefix(Object, Span`1)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs(95,0): at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
  Finished:    System.Text.RegularExpressions.Tests
=== TEST EXECUTION SUMMARY ===
   System.Text.RegularExpressions.Tests  Total: 29013, Errors: 0, Failed: 1, Skipped: 0, Time: 83.844s

https://helixr1107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-111311-merge-8bee200551434f28b9/System.Text.RegularExpressions.Tests/1/console.4c97394a.log?helixlogtype=result

I see the test failure in multiple legs. Exit code 134 means out of memory. I'm slightly concerned about this as it happens even after a retry.

@ViktorHofer
Copy link
Member

ViktorHofer commented Jan 15, 2025

Happened again after a retry and the failure is isolated to this PR. Maybe a GC hole?

@stephentoub for regex, any ideas?

@ViktorHofer
Copy link
Member

From @jkotas offline:

It looks like a functional bug to me. Not a GC hole.

@jkotas
Copy link
Member

jkotas commented Jan 15, 2025

This is the stacktrace that's pointing to the problem:

Unhandled exception. System.InvalidCastException: Unable to cast object of type 'System.Attribute[]' to type 'System.Runtime.CompilerServices.StateMachineAttribute[]'.
   at System.Diagnostics.StackTrace.TryResolveStateMachineMethod(MethodBase& method, Type& declaringType) in /_/src/libraries/System.Private.CoreLib/src/System/Diagnostics/StackTrace.cs:line 462
   at System.Diagnostics.StackTrace.ToString(TraceFormat traceFormat, StringBuilder sb) in /_/src/libraries/System.Private.CoreLib/src/System/Diagnostics/StackTrace.cs:line 249
   at System.Diagnostics.StackTrace.ToString(TraceFormat traceFormat) in /_/src/libraries/System.Private.CoreLib/src/System/Diagnostics/StackTrace.cs:line 209
   at System.Exception.GetStackTrace() in /_/src/libraries/System.Private.CoreLib/src/System/Exception.cs:line 232
   at System.Exception.get_StackTrace() in /_/src/libraries/System.Private.CoreLib/src/System/Exception.cs:line 225
   at System.IO.FileNotFoundException.ToString() in /_/src/libraries/System.Private.CoreLib/src/System/IO/FileNotFoundException.cs:line 83
   at Microsoft.DotNet.RemoteExecutor.Program.Main(String[] args) in /_/src/Microsoft.DotNet.RemoteExecutor/src/Program.cs:line 83

There are 2 issues:

  • The remote executor failing with: System.IO.FileNotFoundException Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp, Version=4.13.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.. The assembly does not seem to be getting deployed correctly with the test.
  • Regression in stacktrace pretty printing that results into InvalidCastException when there are missing dependencies. I am going to submit a fix for this issue and then we can rerun.

@ViktorHofer
Copy link
Member

ViktorHofer commented Jan 16, 2025

Blocked on getting a new SDK out with the error printing fix: #111476 EDIT: Ok looks like the error printing issue only affects the failure state so we should investigate why M.CA.CSharp isn't getting deployed correctly.

@am11
Copy link
Member Author

am11 commented Jan 16, 2025

That is only fixing the error printing. First one is the real issue:

  • The remote executor failing with: System.IO.FileNotFoundException Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp, Version=4.13.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.. The assembly does not seem to be getting deployed correctly with the test.

@jkotas
Copy link
Member

jkotas commented Jan 16, 2025

Also, the fix for the second issue is in the live test runtime, so you do not need to wait for updated SDK to pick it up.

@jkotas
Copy link
Member

jkotas commented Jan 16, 2025

The tests are failing with the FileNotFoundException now:

Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp, Version=4.13.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.

File name: 'Microsoft.CodeAnalysis.CSharp, Version=4.13.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at System.Text.RegularExpressions.Tests.RegexGeneratorHelper.SourceGenRegexAsync(ValueTuple`4[] regexes, CancellationToken cancellationToken)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at System.Text.RegularExpressions.Tests.RegexGeneratorHelper.SourceGenRegexAsync(ValueTuple`4[] regexes, CancellationToken cancellationToken)
   at System.Text.RegularExpressions.Tests.RegexGeneratorHelper.SourceGenRegexAsync(String pattern, CultureInfo culture, Nullable`1 options, Nullable`1 matchTimeout, CancellationToken cancellationToken) in /_/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/RegexGeneratorHelper.netcoreapp.cs:line 133
   at System.Text.RegularExpressions.Tests.RegexHelpers.GetRegexAsync(RegexEngine engine, String pattern, Nullable`1 options, Nullable`1 matchTimeout) in /_/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/Regex.Tests.Common.cs:line 118
   at System.Text.RegularExpressions.Tests.RegexMatchTests.<>c.<<Match_ExcessPrefix>b__30_0>d.MoveNext() in /_/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/Regex.Match.Tests.cs:line 1976

You should be able to take it from here. I do not plan to investigate this one.

@ViktorHofer
Copy link
Member

ViktorHofer commented Jan 16, 2025

@am11 gently asking whether you can further investigate? I'm currently quite stretched for time.

@am11
Copy link
Member Author

am11 commented Jan 17, 2025

@ViktorHofer you asked this question two years ago dotnet/sdk#32598 (comment). Sounds like you had a good hunch that this day is coming. It's the same dependency causing issue. The future is now! 😅

@ViktorHofer
Copy link
Member

Interesting. Are you saying that we have torn state in the SDK that should get fixed? Which component brings an out-of-sync version of CodeAnalysis in?

@am11
Copy link
Member Author

am11 commented Jan 17, 2025

I was searching in SDK issue tracker and found that previous discussion about Microsoft.CodeAnalysis.CSharp FileNotFoundException. I tried matching analyzer versions with compiler in the last few commits but it didn't help.

@am11
Copy link
Member Author

am11 commented Jan 20, 2025

Lets wait for preview 1 then.

@am11 am11 closed this Jan 20, 2025
@am11 am11 deleted the patch-31 branch January 20, 2025 13:14
@ViktorHofer
Copy link
Member

I wonder if dotnet/arcade#15455 will fix the CodeAnalysis issues when running tests. We reverted a deps.json change which excluded too many assets from getting added to it.

@am11 am11 restored the patch-31 branch January 27, 2025 18:10
@am11
Copy link
Member Author

am11 commented Jan 27, 2025

We can try.

@am11 am11 reopened this Jan 27, 2025
@am11
Copy link
Member Author

am11 commented Jan 28, 2025

There are wasm test failures

error NETSDK1147: To build this project, the following workloads must be installed: wasm-tools
error NETSDK1147: To install these workloads, run the following command: dotnet workload restore

@ViktorHofer
Copy link
Member

@am11 we are currently trying to update the SDK in #111852 as well. Just wanted to let you know so that you don't spend too many cycles on this PR.

@am11
Copy link
Member Author

am11 commented Jan 28, 2025

ok, your previous comment sounded like you want me to reopen try again.

@am11 am11 closed this Jan 28, 2025
@am11 am11 deleted the patch-31 branch January 28, 2025 20:38
@github-actions github-actions bot locked and limited conversation to collaborators Feb 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants