sdk
sdk copied to clipboard
[WebToolsE2E][Aspire] Installing Aspire 8.0.1 throws an exception: Cannot access a disposed object System.Collections.Concurrent.BlockingCollection.
REPRO STEPS
- Clean machine: Win11 x64 23h2 ENU
- Install SDK 8.0.302
- Install Aspire 8.0.1 using commands 'dotnet workload update' and 'dotnet workload install aspire'
ACTUAL The aspire workload installed successfully but encountered an error
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)
This issue rarely occurs, reporting it in case we miss something.
Adding @marcpopMSFT @joperezr for awareness.
This doesn't look to be anything aspire specific, so I think this should be transferred to the sdk repo and investigated there, as seems like something wrong with one of the workload commands.
cc @dsplaisted @Forgind to take a look. This is 8.0.302 which is the hotfix June release we did for Razor I believe. Did this repro with 8.0.300 (as we didn't make any changes in the SDK between those builds)? Does it repro with 8.0.302?
Looks like a race condition or similar in TimestampedFileLogger between disposing the object and writing out the messages. Since it's a timing issue, it could start occurring without any specific code changes in that area. Probably we need to add a lock in WriteMessage and Dispose. @joeloff
@v-elenafeng can you help answer Marc's questions if possible? That might be helpful for further investigation / triage.
Did this repro with 8.0.300 (as we didn't make any changes in the SDK between those builds)? Does it repro with 8.0.303?
@balachir @marcpopMSFT This issue is difficult to reproduce and we have not seen it in SDK 8.0.300 or SDK 8.0.303.
Aspire 8 has been deprecated. Closing.