Description
Our ASP.NET Core application (RHEL 7; ASP.NET Core 2.2.7 runtime) frequently stops responding immediately after restarting a remote SQL Server database hosted on Windows Server.
The application has a thread that is repeatedly calling recvmsg on a socket in CLOSE_WAIT state.
The socket was originally ESTABLISHED with the database and transitioned to CLOSE_WAIT as soon as the database host was restarted. The socket remains in CLOSE_WAIT indefinitely until the application is restarted.
Attaching a debugger reveals the following stack trace.
I'm not exactly sure, but this is my best guess as to the line of code that produces the recvmsg calls.
If the TCP state transition diagram below is to be believed, then the socket correctly transitioned to CLOSE_WAIT when the database went down, but the application seems to think it is still ESTABLISHED or something.
Given the information above, does this look like a dotnet bug?
Thanks for reading!