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
Superclassic server hangs when receiving network packet [CORE4788] #5087
Comments
Modified by: @AlexPeshkoffassignee: Alexander Peshkov [ alexpeshkoff ] |
Modified by: @AlexPeshkoffdescription: Listener thread finds active port in the list of known server ports and after it receives network packet on that port and processes it (that typically menas sends to worker thread). But port lock is not held between active port detection and receiving packet. Therefore under some circumstances port handle may get closed and have invalid handle value when receiving a packet. With poll() call to detect active port this leads to server (listener thread) hang in packet receive code. => Listener thread finds active port in the list of known server ports and after it receives network packet on that port and processes it (that typically menas sends to worker thread). But port lock is not held between active port detection and receiving packet. Therefore under some circumstances port handle may get closed and have invalid handle value when receiving a packet. With poll() call to detect active port this leads to server (listener thread) hang in packet receive code. An issue was initially noticed by IBPhoenix customers. |
Modified by: @AlexPeshkoffsummary: Superclassic server hangs in packet_receive() => Superclassic server hangs when receiving network packet |
Commented by: @AlexPeshkoff Listener thread requires serious rework in next version. Currently I just avoid hang in it with additional check. |
Modified by: @AlexPeshkoffstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Beta 2 [ 10586 ] Fix Version: 2.5.5 [ 10670 ] |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @AlexPeshkoff
Listener thread finds active port in the list of known server ports and after it receives network packet on that port and processes it (that typically menas sends to worker thread). But port lock is not held between active port detection and receiving packet. Therefore under some circumstances port handle may get closed and have invalid handle value when receiving a packet. With poll() call to detect active port this leads to server (listener thread) hang in packet receive code.
An issue was initially noticed by IBPhoenix customers.
Commits: 7c15e5b 28025c6 FirebirdSQL/fbt-repository@8b18ccd FirebirdSQL/fbt-repository@2aea3bc
The text was updated successfully, but these errors were encountered: