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

lock manager error when connect a Firebird 3.0 database more than once using SuperClassic Firebird 4.0 service #7357

Closed
ccy opened this issue Oct 20, 2022 · 4 comments

Comments

@ccy
Copy link

ccy commented Oct 20, 2022

I start Firebird 4.0 service in Fedora 36. Here is the firebird.conf:

ServerMode = SuperClassic
Providers = Remote,Engine13,Engine12,Loopback

I have included the libEngine12.dll from firebird 3.0.10 in the plugins directory:

ls -gG /usr/lib64/firebird/plugins
total 27148
-rwxr-xr-x. 1  1485096 Jan 20  2022 libChaCha.so
-rwxr-xr-x. 1  7511904 Oct 20 15:25 libEngine12.so
-rwxr-xr-x. 1 10165624 Jan 20  2022 libEngine13.so
-rwxr-xr-x. 1  2383880 Jan 20  2022 libfbtrace.so
-rwxr-xr-x. 1  1531976 Jan 20  2022 libLegacy_Auth.so
-rwxr-xr-x. 1  1543744 Jan 20  2022 libLegacy_UserManager.so
-rwxr-xr-x. 1  1586320 Jan 20  2022 libSrp.so
-rwxr-xr-x. 1  1569744 Jan 20  2022 libudr_engine.so
drwxr-xr-x. 2       80 Oct 20 13:51 udr
-rw-r--r--. 1      197 Jan 20  2022 udr_engine.conf

I connect a firebird 3.0 database with isql:

$ isql-fb -u sysdba -p masterkey inet://localhost/mydb
Database: inet://localhost/mydb, User: SYSDBA

And it works.

I open another console and connect to the same database:

$ isql-fb -u sysdba -p masterkey inet://localhost/mydb
Statement failed, SQLSTATE = 40001
lock manager error
-inconsistent lock table type/version; found 255/1:146, expected 255/2:146
Use CONNECT or CREATE DATABASE to specify a database

A lock manager error prompt.

This error happen to ServerMode=SuperClassic or ServerMode=Classic. It doesn't happen to ServerMode=Super.

@hvlad
Copy link
Member

hvlad commented Oct 20, 2022

Error means that engine13 attempt to attach to the shared memory area created by engine12.
It happens because engine13 tries to open database and creates lock table before check for ODS version.
Database is already opened by engine12 and lock table was created by engine12 too.

@ccy
Copy link
Author

ccy commented Oct 20, 2022

Is there a solution to the issue?

@AlexPeshkoff AlexPeshkoff self-assigned this Oct 20, 2022
@AlexPeshkoff
Copy link
Member

To make it work with existing config that to be fixed in our code. Sorry - we made most of checks with SS.
Quick fix possible for you right now is to define Providers not in firebird.conf but in databases.conf, i.e.
mydb=/your/path/to/db.fdb
{
Providers = Remote,Engine12,Loopback
}

@ccy
Copy link
Author

ccy commented Mar 31, 2023

Thank you @AlexPeshkoff . This issue has fixed in firebird 4.0.3

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

4 participants