-
Notifications
You must be signed in to change notification settings - Fork 530
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
ConnectionClose sometimes hangs when called from different thread #1668
Comments
Are you calling close on an MsQuic thread, not owned/used by the connection you are closing? That could definitely cause a deadlock and is not allowed. |
Or, are you blocking the MsQuic thread in a callback, waiting for this thread? That can also cause a deadlock and is not allowed. |
I'm not sure what that reapply means. With .NET async lot of code runs on thread pool without us controlling it. |
AFAIK there is no concept of thread affinity or thread ownership for given connection. |
Most of the documentation related to this is found here. These are two rules to follow:
|
I just looked at the logs and I see the following (simply added a filter of
You will notice 3 different threads:
As you can see, the last event/log on the MsQuic worker was an indication of a |
I think you are right. I changed how ConnectionClose is invoked and the problem is gone. |
I run into this when working on dotnet/runtime#52048
I made fixes to keep the handle open to avoid crash. However sometimes when we try to close the connection the API calls hangs for > 15s and test fail with timeout. I collected traces and when looking at the api I only see
full trace attached. I can reproduce this semi-reliably on my Ubuntu machine.
quic.log.gz
The text was updated successfully, but these errors were encountered: