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

ObjectDisposedException in Dcp.KubernetesService.EnsureKubernetesAsync #8028

Open
danmoseley opened this issue Mar 12, 2025 · 0 comments
Open
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

Comments

@danmoseley
Copy link
Member

Seen in a failing test log, this suggests perhaps a missing catch.

2025-03-12T01:16:46.6713435Z ##[error]System.TimeoutException : The operation at /_/tests/Aspire.Hosting.Tests/Health/ResourceHealthCheckServiceTests.cs:360 timed out after reaching the limit of 5000ms.
2025-03-12T01:16:46.6715294Z 
2025-03-12T01:16:46.6715493Z dbug: Aspire.Hosting.Dcp.KubernetesService[0]
2025-03-12T01:16:46.6716290Z       Successfully read Kubernetes configuration from '/tmp/aspire.FytYGX/kubeconfig' after 5009 milliseconds.
2025-03-12T01:16:46.6717292Z dbug: Aspire.Hosting.Dcp.DcpExecutor[0]
2025-03-12T01:16:46.6717888Z       Application orchestrator could not be stopped programmatically.
2025-03-12T01:16:46.6718606Z       System.ObjectDisposedException: Cannot access a disposed object.
2025-03-12T01:16:46.6719365Z       Object name: 'System.Threading.SemaphoreSlim'.
2025-03-12T01:16:46.6720065Z          at System.Threading.SemaphoreSlim.Release(Int32 releaseCount)
2025-03-12T01:16:46.6721384Z          at Aspire.Hosting.Dcp.KubernetesService.EnsureKubernetesAsync(CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Dcp/KubernetesService.cs:line 566
2025-03-12T01:16:46.6723194Z          at Aspire.Hosting.Dcp.KubernetesService.<>c__DisplayClass28_0`1.<<ExecuteWithRetry>b__0>d.MoveNext() in /_/src/Aspire.Hosting/Dcp/KubernetesService.cs:line 439
2025-03-12T01:16:46.6724335Z       --- End of stack trace from previous location ---
2025-03-12T01:16:46.6724998Z          at Polly.ResiliencePipeline.<>c__10`1.<<ExecuteAsync>b__10_0>d.MoveNext()
2025-03-12T01:16:46.6725692Z       --- End of stack trace from previous location ---
2025-03-12T01:16:46.6726204Z          at Polly.Outcome`1.GetResultOrRethrow()
2025-03-12T01:16:46.6727266Z          at Polly.ResiliencePipeline.ExecuteAsync[TResult](Func`2 callback, CancellationToken cancellationToken)
2025-03-12T01:16:46.6729402Z          at Aspire.Hosting.Dcp.KubernetesService.ExecuteWithRetry[TResult](DcpApiOperationType operationType, String resourceType, Func`2 operation, Func`2 isRetryable, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Dcp/KubernetesService.cs:line 437
2025-03-12T01:16:46.6731660Z          at Aspire.Hosting.Dcp.KubernetesService.CleanupResourcesAsync(CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Dcp/KubernetesService.cs:line 348
2025-03-12T01:16:46.6733232Z          at Aspire.Hosting.Dcp.DcpExecutor.StopAsync(CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Dcp/DcpExecutor.cs:line 180
@github-actions github-actions bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Mar 12, 2025
@danmoseley danmoseley added area-orchestrator and removed area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication labels Mar 12, 2025
@dbreshears dbreshears self-assigned this Mar 12, 2025
@dbreshears dbreshears added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Mar 12, 2025
@dbreshears dbreshears removed their assignment Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Projects
None yet
Development

No branches or pull requests

2 participants