-
Notifications
You must be signed in to change notification settings - Fork 592
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
Regression in 6.2.3: Semaphore Disposed Exception thrown in AsyncConsumerWorkService #1153
Milestone
Comments
ashneilson
added a commit
to ricado-group/dotnet-rabbitmq
that referenced
this issue
Feb 23, 2022
@ashneilson please submit a PR if you understand what needs to be done (not just a revert). |
ashneilson
added a commit
to ricado-group/rabbitmq-dotnet-client
that referenced
this issue
Feb 23, 2022
11 tasks
@michaelklishin Thanks for the quick reply! PR submitted as requested |
Thanks I'll get to this today. |
michaelklishin
added a commit
that referenced
this issue
Feb 23, 2022
…ception Fix for #1153 - Semaphore disposed before discarded tasks have finished
Fixed by #1154 and will ship in 6.2.4. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Refer to the original issue for context #1014
Problem
When under load, stopping the
AsyncConsumerWorkService
can result inSystem.ObjectDisposedException
being thrown due to a Disposed_limiter
.The Discarded Tasks
HandleConcurrent
started inLoopWithConcurrency
may still be running after the finally block disposes of the_limiter
Semaphore.rabbitmq-dotnet-client/projects/RabbitMQ.Client/client/impl/AsyncConsumerWorkService.cs
Lines 125 to 151 in 4628927
When the
HandleConcurrent
Tasks attempt to Release the Semaphore, theSystem.ObjectDisposedException
is thrown.rabbitmq-dotnet-client/projects/RabbitMQ.Client/client/impl/AsyncConsumerWorkService.cs
Lines 181 to 186 in 4628927
The issue doesn't occur in
6.2.2
but does in6.2.3
. It appears the PR #1113 might be the culprit.Recommended Fix
I'd be more than happy to submit a PR with a fix if that's the desired approach.
The text was updated successfully, but these errors were encountered: