Skip to content
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

[main] Update dependencies from dotnet/runtime #31178

Merged
merged 3 commits into from
Jul 18, 2023

Conversation

dotnet-maestro[bot]
Copy link
Contributor

@dotnet-maestro dotnet-maestro bot commented Jul 3, 2023

This pull request updates the following dependencies

From https://github.com/dotnet/runtime

  • Subscription: daf314a8-d8c8-4b54-8dcc-08d82e674dfc
  • Build: 20230714.11
  • Date Produced: July 14, 2023 11:22:24 PM UTC
  • Commit: bb38848e9877dc0b43860dc219ebe36fc04a6bb3
  • Branch: refs/heads/main

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approving dependency update.

@javiercn
Copy link
Member

javiercn commented Jul 7, 2023

@dotnet/efteam there seems to be some issues here with failing tests.

Can you take a look?

@bricelam
Copy link
Contributor

Test failures look like something has changed in DI.

@ajcvickers
Copy link
Contributor

@danmoseley Who do we reach out these days for regressions in the DI libraries?

@bricelam
Copy link
Contributor

bricelam commented Jul 10, 2023

Microsoft.EntityFrameworkCore.DbContextTest.Resolve_scoped_application_service passes on Windows; fails on Linux and macOS with:

Assert.Throws() Failure
Expected: typeof(System.InvalidOperationException)
Actual: (No exception was thrown)

@lewing
Copy link
Member

lewing commented Jul 11, 2023

@danmoseley Who do we reach out these days for regressions in the DI libraries?

I think @dotnet/area-extensions-dependencyinjection should work

@danmoseley
Copy link
Member

@lewing
Copy link
Member

lewing commented Jul 12, 2023

@dotnet/dnr-codeflow this one appears to be stalled

@eerhardt
Copy link
Member

@steveharter @mapogolions - was this failure caused by dotnet/runtime#87354?

@steveharter
Copy link
Member

@steveharter @mapogolions - was this failure caused by dotnet/runtime#87354?

I'm not sure although that supposed to only affect cases when ValidateOnBuild==true.

Microsoft.EntityFrameworkCore.DbContextTest.Resolve_scoped_application_service passes on Windows; fails on Linux and macOS with:

This is suspect. Is it possible there is a threading or some other concurrency or cleanup issue affecting non-Windows, such as the use of UseInMemoryDatabase()? If not, please create an issue with ideally a small repro. Thanks

@lewing
Copy link
Member

lewing commented Jul 18, 2023

@steveharter this definitely looks like a regression from changes in dotnet/runtime, are the failing unit tests not enough of a starting place?

@lewing
Copy link
Member

lewing commented Jul 18, 2023

@ajcvickers @bricelam is the exceptional case being tested here an important result or can we open an issue and skip the test for now? runtime branches tomorrow for p7 so if this needs to escalate now is the time.

@lewing
Copy link
Member

lewing commented Jul 18, 2023

it is failing on windows now too

@ajcvickers
Copy link
Contributor

@lewing Yes this needs to escalate. Per policy, runtime needs to revert unless the fix can be made quickly.

@danmoseley You asked me to ping you.

@lewing lewing added the blocked label Jul 18, 2023
@ericstj
Copy link
Member

ericstj commented Jul 18, 2023

@steveharter do we know what commit most likely caused this? Another option here would be to temporarily disable this one test to allow this to merge and file a release blocking bug to fix it.

@ajcvickers
Copy link
Contributor

@ericstj Happy to disable a test once a release-blocking issue exists.

@ericstj
Copy link
Member

ericstj commented Jul 18, 2023

I pulled out the test, ran it on net7.0 while only changing the Microsoft.Extensions.DependencyInjection reference and was able to isolate the failure.
8.0.0-preview.7.23328.1 -> succeeds 1815306c1b325a66189511f3ddecd45638c47681
8.0.0-preview.7.23328.6 -> fails
c06d77a74f64d6c5b0280db56fb0c6a43c0aa907

dotnet/runtime@1815306...c06d77a

This does seem to implicate dotnet/runtime@c06d77a

@ericstj
Copy link
Member

ericstj commented Jul 18, 2023

I filed the issue and disabled the test.

@ericstj
Copy link
Member

ericstj commented Jul 18, 2023

Seeing failures on mac and linux:

�[mUnhandled exception. System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.NullableContextAttribute' from assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
   at System.ModuleHandle.ResolveType(QCallModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
   at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
   at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(MetadataToken caCtorToken, MetadataImport& scope, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1& derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctorWithParameters, Boolean& isVarArg)
   at System.Reflection.CustomAttribute.IsCustomAttributeDefined(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Int32 attributeCtorToken, Boolean mustBeInheritable)
   at System.Reflection.CustomAttribute.IsDefined(RuntimeType type, RuntimeType caType, Boolean inherit)
   at System.Diagnostics.StackTrace.ToString(TraceFormat traceFormat, StringBuilder sb)
   at System.Diagnostics.StackTrace.ToString(TraceFormat traceFormat)
   at System.Exception.get_StackTrace()
   at Xunit.Sdk.ExceptionUtility.ConvertExceptionToFailureInformation(Exception ex, Int32 parentIndex, List`1 exceptionTypes, List`1 messages, List`1 stackTraces, List`1 indices) in /_/src/common/ExceptionUtility.cs:line 195
   at Xunit.Sdk.ExceptionUtility.ConvertExceptionToFailureInformation(Exception ex) in /_/src/common/ExceptionUtility.cs:line 178
   at Xunit.Sdk.TestFailed..ctor(ITest test, Decimal executionTime, String output, Exception ex) in /_/src/messages/TestFailed.cs:line 42
   at Xunit.Sdk.TestRunner`1.RunAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestRunner.cs:line 164
   at Xunit.Sdk.TestCaseRunner`1.RunAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestCaseRunner.cs:line 82
   at Microsoft.EntityFrameworkCore.TestUtilities.Xunit.ConditionalFactTestCase.RunAsync(IMessageSink diagnosticMessageSink, IMessageBus messageBus, Object[] constructorArguments, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource) in /_/test/EFCore.Specification.Tests/TestUtilities/Xunit/ConditionalFactTestCase.cs:line 31
   at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestMethodRunner.cs:line 136
   at Xunit.Sdk.TestMethodRunner`1.RunAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestMethodRunner.cs:line 106
   at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestClassRunner.cs:line 213
   at Xunit.Sdk.TestClassRunner`1.RunAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestClassRunner.cs:line 171
   at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestCollectionRunner.cs:line 130
   at Xunit.Sdk.TestCollectionRunner`1.RunAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestCollectionRunner.cs:line 101
   at Xunit.Sdk.XunitTestAssemblyRunner.RunTestCollectionsAsync(IMessageBus messageBus, CancellationTokenSource cancellationTokenSource) in /_/src/xunit.execution/Sdk/Frameworks/Runners/XunitTestAssemblyRunner.cs:line 205
   at Xunit.Sdk.TestAssemblyRunner`1.RunAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestAssemblyRunner.cs:line 196
   at Xunit.Sdk.XunitTestFrameworkExecutor.RunTestCases(IEnumerable`1 testCases, IMessageSink executionMessageSink, ITestFrameworkExecutionOptions executionOptions) in /_/src/xunit.execution/Sdk/Frameworks/XunitTestFrameworkExecutor.cs:line 95
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
Aborted (core dumped)

It looks to me like we're running new 8.0 assemblies on an older 8.0 runtime.

@lewing lewing closed this Jul 18, 2023
@lewing lewing reopened this Jul 18, 2023
@bricelam
Copy link
Contributor

we're running new 8.0 assemblies on an older 8.0 runtime

@AndriySvyryd Aren't we were currently flowing the latest runtime bits as part of the AoT work?

@lewing
Copy link
Member

lewing commented Jul 18, 2023

It looks to me like we're running new 8.0 assemblies on an older 8.0 runtime.

looks like that was fixed in #31270

@ericstj
Copy link
Member

ericstj commented Jul 18, 2023

looks like that was fixed in #31270

That didn't fix it -- that might make it fail on Windows too. We need a newer SDK to get the updates to runtime.

@bricelam bricelam requested a review from a team as a code owner July 18, 2023 18:37
@bricelam bricelam removed the blocked label Jul 18, 2023
@ericstj
Copy link
Member

ericstj commented Jul 18, 2023

@bricelam thank you for jumping on this. Your change should fix #31300

To double check that we can look at the test logs. We expect them to be running against a framework version 8.0.0-preview.7.23364.11.

The framework version we don't expect is 8.0.0-preview.7.23364.3 -- that's the one from the SDK build I updated. Both builds should pass - so inspecting the logs is necessary to determine that #31300 is fixed.

@bricelam
Copy link
Contributor

Confirmed. Test are running on .11

@ericstj
Copy link
Member

ericstj commented Jul 18, 2023

Mac build is failing during build to run the compiler from the SDK - looks to me like it's using the wrong dotnet.

It's using /Users/runner/.dotnet/ instead of /Users/runner/work/1/s/.dotnet.

/Users/runner/work/1/s/.dotnet/sdk/8.0.100-preview.7.23364.32/Roslyn/Microsoft.CSharp.Core.targets(80,5): error : You must install or update .NET to run this application. [/Users/runner/work/1/s/src/ef/ef.csproj::TargetFramework=net461]
/Users/runner/work/1/s/.dotnet/sdk/8.0.100-preview.7.23364.32/Roslyn/Microsoft.CSharp.Core.targets(80,5): error :  [/Users/runner/work/1/s/src/ef/ef.csproj::TargetFramework=net461]
/Users/runner/work/1/s/.dotnet/sdk/8.0.100-preview.7.23364.32/Roslyn/Microsoft.CSharp.Core.targets(80,5): error : App: /Users/runner/work/1/s/.dotnet/sdk/8.0.100-preview.7.23364.32/Roslyn/bincore/csc.dll [/Users/runner/work/1/s/src/ef/ef.csproj::TargetFramework=net461]
/Users/runner/work/1/s/.dotnet/sdk/8.0.100-preview.7.23364.32/Roslyn/Microsoft.CSharp.Core.targets(80,5): error : Architecture: x64 [/Users/runner/work/1/s/src/ef/ef.csproj::TargetFramework=net461]
/Users/runner/work/1/s/.dotnet/sdk/8.0.100-preview.7.23364.32/Roslyn/Microsoft.CSharp.Core.targets(80,5): error : Framework: 'Microsoft.NETCore.App', version '8.0.0-preview.7.23364.3' (x64) [/Users/runner/work/1/s/src/ef/ef.csproj::TargetFramework=net461]
/Users/runner/work/1/s/.dotnet/sdk/8.0.100-preview.7.23364.32/Roslyn/Microsoft.CSharp.Core.targets(80,5): error : .NET location: /Users/runner/.dotnet/ [/Users/runner/work/1/s/src/ef/ef.csproj::TargetFramework=net461]
/Users/runner/work/1/s/.dotnet/sdk/8.0.100-preview.7.23364.32/Roslyn/Microsoft.CSharp.Core.targets(80,5): error :  [/Users/runner/work/1/s/src/ef/ef.csproj::TargetFramework=net461]
/Users/runner/work/1/s/.dotnet/sdk/8.0.100-preview.7.23364.32/Roslyn/Microsoft.CSharp.Core.targets(80,5): error : The following frameworks were found: [/Users/runner/work/1/s/src/ef/ef.csproj::TargetFramework=net461]
/Users/runner/work/1/s/.dotnet/sdk/8.0.100-preview.7.23364.32/Roslyn/Microsoft.CSharp.Core.targets(80,5): error :   6.0.19 at [/Users/runner/.dotnet/shared/Microsoft.NETCore.App] [/Users/runner/work/1/s/src/ef/ef.csproj::TargetFramework=net461]
/Users/runner/work/1/s/.dotnet/sdk/8.0.100-preview.7.23364.32/Roslyn/Microsoft.CSharp.Core.targets(80,5): error :   7.0.2 at [/Users/runner/.dotnet/shared/Microsoft.NETCore.App] [/Users/runner/work/1/s/src/ef/ef.csproj::TargetFramework=net461]
/Users/runner/work/1/s/.dotnet/sdk/8.0.100-preview.7.23364.32/Roslyn/Microsoft.CSharp.Core.targets(80,5): error :   7.0.4 at [/Users/runner/.dotnet/shared/Microsoft.NETCore.App] [/Users/runner/work/1/s/src/ef/ef.csproj::TargetFramework=net461]
/Users/runner/work/1/s/.dotnet/sdk/8.0.100-preview.7.23364.32/Roslyn/Microsoft.CSharp.Core.targets(80,5): error :   7.0.8 at [/Users/runner/.dotnet/shared/Microsoft.NETCore.App] [/Users/runner/work/1/s/src/ef/ef.csproj::TargetFramework=net461]
/Users/runner/work/1/s/.dotnet/sdk/8.0.100-preview.7.23364.32/Roslyn/Microsoft.CSharp.Core.targets(80,5): error :  [/Users/runner/work/1/s/src/ef/ef.csproj::TargetFramework=net461]

@AndriySvyryd
Copy link
Member

@AndriySvyryd Aren't we were currently flowing the latest runtime bits as part of the AoT work?

Yes, but #31284 was blocked on the same issue this is hitting:

Mac build is failing during build to run the compiler from the SDK - looks to me like it's using the wrong dotnet.

It's using /Users/runner/.dotnet/ instead of /Users/runner/work/1/s/.dotnet.

@ericstj
Copy link
Member

ericstj commented Jul 18, 2023

I see, so we might need to undo the SDK update (since it's not needed now with @bricelam's changes) or figure out how to fix it.

@ericstj
Copy link
Member

ericstj commented Jul 18, 2023

Looks like this path is coming from environment:

DOTNET_ROOT = /Users/runner/.dotnet

Comparing this to linux to see if that's the difference.

@lewing
Copy link
Member

lewing commented Jul 18, 2023

There were some changes to how roslyn locates the dotnet to run the compiler etc.

see Write guidance on how to launch (non apphost) apps · Issue #88754 · dotnet/runtime (github.com) & dotnet/roslyn#68918 / dotnet/roslyn#69010

@ericstj
Copy link
Member

ericstj commented Jul 18, 2023

Yep that's what did it:
https://github.com/dotnet/roslyn/pull/68918/files#diff-ec99cd9453fe657dd1ea08e93e94b0bb51c51484b8ad25882d312564e5fe8e26R61

It's unusual that this Mac build is setting DOTNET_ROOT though -- I'm looking into why that is. The linux build doesn't set it.

@ericstj
Copy link
Member

ericstj commented Jul 18, 2023

I don't think this repo is setting the DOTNET_ROOT value. I think it's already set on the build machine, it's just not overridden by the build process.

@AndriySvyryd
Copy link
Member

I don't think this repo is setting the DOTNET_ROOT value. I think it's already set on the build machine, it's just not overridden by the build process.

Do other repos remove or override this during build normally?

dotnet-maestro bot and others added 3 commits July 18, 2023 13:26
…0714.11

Microsoft.Extensions.Caching.Memory , Microsoft.Extensions.Configuration , Microsoft.Extensions.Configuration.Abstractions , Microsoft.Extensions.Configuration.EnvironmentVariables , Microsoft.Extensions.Configuration.Json , Microsoft.Extensions.DependencyInjection , Microsoft.Extensions.DependencyModel , Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Extensions.Logging , System.Text.Json
 From Version 8.0.0-preview.7.23325.2 -> To Version 8.0.0-preview.7.23364.11
@bricelam bricelam force-pushed the darc-main-f7892795-76e4-42bd-9d37-64095d5f12f3 branch from a5a6476 to bdc0998 Compare July 18, 2023 20:27
@ericstj
Copy link
Member

ericstj commented Jul 18, 2023

I see -- dotnet/roslyn#69010 undid considering DOTNET_ROOT, but we must not yet have an SDK with that yet. We can undo the SDK change as @bricelam did until we get a new SDK with the revert.

@bricelam
Copy link
Contributor

Unblocked. Thank you, everyone!

@dotnet-maestro dotnet-maestro bot merged commit 41cc37c into main Jul 18, 2023
@dotnet-maestro dotnet-maestro bot deleted the darc-main-f7892795-76e4-42bd-9d37-64095d5f12f3 branch July 18, 2023 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants