-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Deadlock in Microsoft.AspNetCore.Mvc.Testing on .NET 7 #45233
Comments
Thanks for contacting us. We're moving this issue to the |
I am getting the same error |
please help me |
1 similar comment
please help me |
Is there an existing issue for this?
Describe the bug
The following combination causes a deadlock when trying to read
HttpContext.Request.Body
:7.0.100
)Microsoft.AspNetCore.Mvc.Testing
(7.0.0
)Microsoft.AspNetCore.Hosting.HttpRequestIn.Start
DiagnosticListener
event.ReadToEnd()
).The code snippet below is from the linked reproducer sample.
The call to
ReadToEnd()
hangs forever.Running the same code with previous versions of .NET (Core) works without a problem.
Expected Behavior
The call should not hang as with previous versions.
Steps To Reproduce
Reproducer project: https://github.com/z1c0/Mvc.TestingHang
Run the unit test method
BasicTests.TestPost
.Exceptions (if any)
No response
.NET Version
7.0.100
Anything else?
I could reproduce the problem on Windows, Linux, and macOS.
The same code worked fine with previous versions (.NET Core 3.1, .NET 5.0, .NET 6.0 on all platforms).
The text was updated successfully, but these errors were encountered: