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

XNET protocol does not work correctly in SuperClassic [CORE1902] #901

Closed
firebird-automations opened this issue May 14, 2008 · 10 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @alexpotapchenko

XNET protocol does not work correctly in SuperClassic if there are multiple connections.
In log file:
XNET error: get_free_slot() failed.
It occurs because in function xnet::get_free_slot it is not possible to create map file because the map file with such name is already created.
The reason of it that code in xnet::connect_server (ULONG timestamp = (ULONG) time(NULL);) does not generate unique value.

Commits: 7d28033

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

This is because of following code in server_init() :

// init the limits

#⁠ifdef SUPERSERVER
global_slots_per_map = XPS_MAX_NUM_CLI;
global_pages_per_slot = XPS_MAX_PAGES_PER_CLI;
#⁠else
// For classic server there is always only 1 connection and 1 slot
global_slots_per_map = 1;
global_pages_per_slot = XPS_MAX_PAGES_PER_CLI;
#⁠endif

Remove #⁠ifdef, please, and tell if error gone

@firebird-automations
Copy link
Collaborator Author

Commented by: @alexpotapchenko

Yes, if global_slots_per_map = XPS_MAX_NUM_CLI then XNET protocol in SC works correctly.

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @alexpotapchenko

If I am not mistaken in server_init() the following code is necessary:
global_slots_per_map = flag & (SRVR_multi_client | SRVR_debug) ? XPS_MAX_NUM_CLI : 1;

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

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

resolution: Fixed [ 1 ]

Fix Version: 2.5 Alpha 1 [ 10224 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Philip Williams (unordained)

Would you expect to see this issue in Firebird 2.1.1 SuperServer on Win x32?

I had that happen to me today, probably while a cron job was talking to the database (via an isql script, running on the same machine as the server process, connecting locally -- but I don't have any stderr logs from that isql session.)

From firebird.log:

PTC-DEV2-XP (Server) Tue Oct 07 09:13:02 2008
XNET error: get_free_slot() failed

PTC-DEV2-XP (Server) Tue Oct 07 09:13:02 2008
Database:
unknown ISC error 0

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Phillip, look also at CORE2108
It will be backported into 2.1.2 soon

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Cannot be tested

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