dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.73k stars 1.07k forks source link

[NETSDKE2E][Intermittent]With NET8 preview 1 SDK installed, "Unhandled exception. System.ObjectDisposedException: Cannot access a disposed object." happens when installing Android workload in CLI #30545

Open vdanche opened 1 year ago

vdanche commented 1 year ago

Repro steps:

1.Install .NET 8 SDK ( 8.0.100-preview.1.23108.10) from Pipelines - Run 20230209.1-8.0.100-preview.1.23108.10-166172 artifacts (azure.com) 2.Install workload in CLI dotnet workload install android --skip-manifest-update

Expected Result: Android workload Install successfully and the output shows correctly.

Actual Result: Install Android workload successfully, but below message displayed.

image

Unhandled exception. System.ObjectDisposedException: Cannot access a disposed object. Object name: 'System.Collections.Concurrent.BlockingCollection`1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'. at Microsoft.DotNet.Installer.Windows.TimestampedFileLogger.WriteMessage(String message) at Microsoft.DotNet.Installer.Windows.TimestampedFileLogger.ProcessLogRequests(Object logPipeName)

install log in temp folder.zip dotnet --info: .NET SDK: Version: 8.0.100-preview.1.23108.10 Commit: 5725657a6b

Runtime Environment: OS Name: Windows OS Version: 10.0.22621 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\8.0.100-preview.1.23108.10\

Host: Version: 8.0.0-preview.1.23106.5 Architecture: x64 Commit: 9f654effb1

.NET SDKs installed: 8.0.100-preview.1.23108.10 [C:\Program Files\dotnet\sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 8.0.0-preview.1.23107.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 8.0.0-preview.1.23106.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 8.0.0-preview.1.23107.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found: None

Environment variables: Not set

global.json file: Not found

Learn more: https://aka.ms/dotnet/info

Download .NET:

https://aka.ms/dotnet/download

dsplaisted commented 1 year ago

@joeloff Looks like TimestampedFileLogger is trying to log after it's been disposed. Not sure what's going on, I didn't see anything that might have changed with this recently.

joeloff commented 1 year ago

I'll take a look.

vdanche commented 1 year ago

We met it again in NET8 preview 2(8.0.100-preview.2.23151.8) image

joeloff commented 1 year ago

Hmm, this is definitely some sort of race condition.

v-ainigao commented 1 year ago

Also repro on .net8.0.100-preview.4.23206.10 (runtime-8.0.0-preview.4.23181.2) SDK image

vdanche commented 1 year ago

Also met it on net8 preview 5 SDK image

WenJunJi01 commented 1 year ago

We met this issue with .NET 8 RC1 SDK: 8.0.100-rc.1.23423.3 (runtime-8.0.0-rc.1.23419.4) installed on Windows Server 2022(ARM64). image

v-ainigao commented 1 year ago

We met this issue with .NET 8.0.100 SDK installed on Windows Server 2022(ARM64). image

WenJunJi01 commented 1 year ago

Repro with .NET SDK 9.0.100-alpha.1.23564.26 (runtime-9.0.0-alpha.1.23558.17) installed. image

v-ainigao commented 11 months ago

We met this issue with .NET 9.0.100-alpha.1.23618.4(runtime-9.0.0-alpha.1.23617.4) SDK installed on ARM64 OS. image

vdanche commented 3 months ago

Also meet it on 6.0.425 image