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

Login attempts while engine is shutting down caused unnecessary delays in shutdown process [CORE5900] #6158

Closed
firebird-automations opened this issue Aug 22, 2018 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @hvlad

When engine shutdown is already in progress, the server is still running and listening for/processing incoming packets including possible login requests.

But during shutdown the security database is unavailable, therefore plugins may return auth failures.

In some cases (like all db users using same login) this may cause "banning" of login attempts (due to multiple login failures -- which is designed to manage DDOS attack conditions). This causes the related worker threads to sleep for a while before returning login failure to user. Such threads cause the shutdown process to pause, making it wait till the end of "ban period".

Commits: dfc0259 fea7c61 a741300 9675ab2 87c306e

====== Test Details ======

Currently there is no ability to restart FB instance from fbtest framework.
Though such test can be implemented by using 'sc.exe' and .bat with bulk ISQLs that are launched at the same time (Linux has, of course, similar tools for that task).

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

reporter: Alexander Peshkov [ alexpeshkoff ] => Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

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

resolution: Fixed [ 1 ]

Fix Version: 4.0 Beta 1 [ 10750 ]

Fix Version: 3.0.4 [ 10863 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

description: When engine shutdown is already in progress server is still running and listening to incoming packets including possible login requests. But security database is unavailable, therefore plugins return auth failures. In some cases (like all users working with same login) this may cause banning of logins, i.e. worker threads will sleep for a while before replying login failure to user. Such threads prevent server shutdown making it wait till the end of ban period. => When engine shutdown is already in progress, the server is still running and listening for/processing incoming packets including possible login requests.

But during shutdown the security database is unavailable, therefore plugins may return auth failures.

In some cases (like all db users using same login) this may cause "banning" of login attempts (due to multiple login failures -- which is designed to manage DDOS attack conditions). This causes the related worker threads to sleep for a while before returning login failure to user. Such threads cause the shutdown process to pause, making it wait till the end of "ban period".

summary: Banned during engine shutdown threads cause unwanted delays when shutting server => Login attempts while engine is shutting down caused unnecessary delays in shutdown process

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Deferred

Test Details: Currently there is no ability to restart FB instance from fbtest framework.
Though such test can be implemented by using 'sc.exe' and .bat with bulk ISQLs that are launched at the same time (Linux has, of course, similar tools for that task).

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