You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I create a pact builder with multiple interaction and try to invoke the call via WebApplicationFactory in my API integration test, and some of my test run are getting stucked
and here's the problem I discovered during --blame
*notice the duplicate call of PactNet.Interop.NativeInterop.CleanupMockServer(Int32), this might cause pact_ffi mutex lock each other
Steps To Reproduce
Create PACT builder with 15 interaction
Create webServer via WebApplicationFactory and change the congfiguration to mockServercontext
run api test to get information until it failed, for instance
while true; do dotnet test MyApp.Integrationtest --blame-hang --blame-hang-timeout 10000 ; sleep 1; done
once the test hangs, use dotnet-dump to analyze issue
Expected behavior
A clear and concise description of what you expected to happen.
test should not hangs
Log Output
Applicable log output. Please ensure you remove any sensitive information.
@adamrodger big thanks for taking a look!, however the problem is in the internal code at my company, but I can setup some PoC to demostrate how it happened later today
btw, as far as I check my error log, it seems that pact mock server got dead during the VerifyAsync Context and pact_ffi is trying to get the server port to cleanup and it hangs if the server is dead
the deadlock is inside pactffi_cleanup_mock_server, as when I remove the native code call in pact-net, everythings works
Previous issues
Have you searched the issue tracker to ensure this hasn't been discussed before?
https://github.com/pact-foundation/pact-net/issues?q=is%3Aissue+hangs
https://github.com/pact-foundation/pact-net/issues?q=is%3Aissue+freeze
https://github.com/pact-foundation/pact-net/issues?q=is%3Aissue+deadlock
Version information:
Describe the bug
I create a pact builder with multiple interaction and try to invoke the call via WebApplicationFactory in my API integration test, and some of my test run are getting stucked
and here's the problem I discovered during --blame
*notice the duplicate call of PactNet.Interop.NativeInterop.CleanupMockServer(Int32), this might cause pact_ffi mutex lock each other
Steps To Reproduce
Expected behavior
A clear and concise description of what you expected to happen.
Log Output
Applicable log output. Please ensure you remove any sensitive information.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: