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-issue-importer opened this issue May 12, 2015 · 7 comments
Closed

Comments

@firebird-issue-importer

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 12, 2015

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 12, 2015

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 12, 2015

Modified by: @AlexPeshkoff

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 12, 2015

Commented by: @AlexPeshkoff

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 12, 2015

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 30, 2015

Modified by: @pavel-zotov

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

QA Status: Cannot be tested

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 23, 2015

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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants