Skip to content
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

Closed
firebird-automations opened this issue May 12, 2015 · 7 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

description: 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.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

summary: Superclassic server hangs in packet_receive() => Superclassic server hangs when receiving network packet

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Listener thread requires serious rework in next version. Currently I just avoid hang in it with additional check.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 Beta 2 [ 10586 ]

Fix Version: 2.5.5 [ 10670 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Cannot be tested

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants