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

[WebToolsE2E][Aspire] Installing Aspire 8.0.1 throws an exception: Cannot access a disposed object System.Collections.Concurrent.BlockingCollection. #41836

Open
v-elenafeng opened this issue Jun 26, 2024 · 7 comments
Assignees
Labels
Area-Workloads untriaged Request triage from a team member

Comments

@v-elenafeng
Copy link

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)

image

@v-elenafeng
Copy link
Author

This issue rarely occurs, reporting it in case we miss something.

@balachir
Copy link

Adding @marcpopMSFT @joperezr for awareness.

@joperezr
Copy link
Member

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.

@marcpopMSFT
Copy link
Member

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?

@dsplaisted
Copy link
Member

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

@balachir balachir transferred this issue from dotnet/aspire Jun 28, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Workloads untriaged Request triage from a team member labels Jun 28, 2024
@balachir
Copy link

@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?

@v-elenafeng
Copy link
Author

@balachir @marcpopMSFT This issue is difficult to reproduce and we have not seen it in SDK 8.0.300 or SDK 8.0.303.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Workloads untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

6 participants