I have a weird situation on a production server.
We have network application written on C++ which serves users requests by TCP written using IOCP.
Two days ago we did an update of Windows 2012 R2 (it installed latest security updates. The previous update was 6 month ago). And after the update when trying to stop the service we see in logs that server hangs on call to close listening socket
closesocket(session->listen_socket);
The schema of stopping the network system is the next:
PostQueuedCompletionStatus(m_completion_port, 0, NULL, NULL);
x
the number of worker threads
Wait all worker threads finish their job
CloseHandle(m_completion_port);
closesocket(session->accept_socket);
closesocket(session->listen_socket);
This was working good for the last 4 years, but suddenly after Windows 2012 R2 update the server hangs forever on call closesocket(session->listen_socket);
I've alsi tried as a solution to set LINGER option with 0 timeout to make abotive closure, but it didn't help.
All ideas how to fix this or make any additional diagnostics?
The issue was brought by patch from Microsoft KB4338815, which caused closesocket tо hang forever on Intel Xeon processors and this was also posted by FileZilla guys in this thread https://forum.filezilla-project.org/viewtopic.php?t=49308
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With