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

Error restoring on FB 3.0 from FB 2.5: bugcheck 221 (cannot remap) [CORE5414] #5687

Closed
firebird-automations opened this issue Dec 7, 2016 · 13 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Cristiano Ferrari (boxmga)

Attachments:
firebird.log

I'm trying to restore a FB 2.5.4 backup (transportable) on a FB 3.0.1 and having this error:

gbak: 0.004 committing metadata
gbak: ERROR:Error while parsing procedure FZ_ESTOQUECONSOLIDADO's BLR
gbak: ERROR: Error while parsing procedure LISTASALDOSECUSTOS2's BLR
gbak: ERROR: internal Firebird consistency check ((CMP) copy: cannot remap (221), file: RecordSourceNodes.cpp line: 594)
gbak:Exiting before completion due to errors
gbak: ERROR:internal Firebird consistency check (can't continue after bugcheck)

I've tried to run gbak -C with -n and -m (and both) options and this error remain. Many procedures call UDFs from two 3rd part librarys: cpf_udf.so, http://rfunc.so, http://tbudf.so, all of then compiled for 64 bits.

I already tried to change the owner for UDF folder (and all files inside it) to firebird:firebird.

The full source code for this SPs and the UDFs librarys is here: https://drive.google.com/drive/folders/0BxCWYNjpA1-SRll4QjZuOThWdzQ?usp=sharing

UPDATE: after post, I've tried to do gbak -C again plus the -fix_fss_m win1252 and now I have this error:

gbak: 0.000 restoring privilege for user FZ_APURAÇAO_PIS_COFINS_ENT_SAI
gbak: ERROR:arithmetic exception, numeric overflow, or string truncation
gbak: ERROR: string right truncation
gbak: ERROR: expected length 31, actual 31
gbak:Exiting before completion due to errors

UPDATE 2: in this last restore (using -fix_fss_m win1252) I noticed that there are many messages in firebird.log like this

RDB$FLAGS for trigger CHECK_284 in RDB$TRIGGERS is corrupted (304)

But, the original datadabase in FB 2.5 doesn't show any consistence problem.

The firebird.log with all theses messages is in attachment.

Commits: 4f7843d 3ca0d67

@firebird-automations
Copy link
Collaborator Author

Modified by: Cristiano Ferrari (boxmga)

description: I'm trying to restore a FB 2.5.4 backup (transportable) on a FB 3.0.1 and having this error:

gbak: 0.004 committing metadata
gbak: ERROR:Error while parsing procedure FZ_ESTOQUECONSOLIDADO's BLR
gbak: ERROR: Error while parsing procedure LISTASALDOSECUSTOS2's BLR
gbak: ERROR: internal Firebird consistency check ((CMP) copy: cannot remap (221), file: RecordSourceNodes.cpp line: 594)
gbak:Exiting before completion due to errors
gbak: ERROR:internal Firebird consistency check (can't continue after bugcheck)

I've tried to run gbak -C with -n and -m (and both) options and this error remain. Many procedures call UDFs from two 3rd part librarys: cpf_udf.so, http://rfunc.so, http://tbudf.so, all of then compiled for 64 bits.

I already tried to change the owner for UDF folder (and all files inside it) to firebird:firebird.

The full source code for this SPs and the UDFs librarys is here: https://drive.google.com/drive/folders/0BxCWYNjpA1-SRll4QjZuOThWdzQ?usp=sharing

=>

I'm trying to restore a FB 2.5.4 backup (transportable) on a FB 3.0.1 and having this error:

gbak: 0.004 committing metadata
gbak: ERROR:Error while parsing procedure FZ_ESTOQUECONSOLIDADO's BLR
gbak: ERROR: Error while parsing procedure LISTASALDOSECUSTOS2's BLR
gbak: ERROR: internal Firebird consistency check ((CMP) copy: cannot remap (221), file: RecordSourceNodes.cpp line: 594)
gbak:Exiting before completion due to errors
gbak: ERROR:internal Firebird consistency check (can't continue after bugcheck)

I've tried to run gbak -C with -n and -m (and both) options and this error remain. Many procedures call UDFs from two 3rd part librarys: cpf_udf.so, http://rfunc.so, http://tbudf.so, all of then compiled for 64 bits.

I already tried to change the owner for UDF folder (and all files inside it) to firebird:firebird.

The full source code for this SPs and the UDFs librarys is here: https://drive.google.com/drive/folders/0BxCWYNjpA1-SRll4QjZuOThWdzQ?usp=sharing

UPDATE: after post, I've tried to do gbak -C again plus the -fix_fss_m win1252 and now I have this error:

gbak: 0.000 restoring privilege for user FZ_APURAÇAO_PIS_COFINS_ENT_SAI
gbak: ERROR:arithmetic exception, numeric overflow, or string truncation
gbak: ERROR: string right truncation
gbak: ERROR: expected length 31, actual 31
gbak:Exiting before completion due to errors

@firebird-automations
Copy link
Collaborator Author

Modified by: Cristiano Ferrari (boxmga)

Attachment: firebird.log [ 13040 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: Cristiano Ferrari (boxmga)

description: I'm trying to restore a FB 2.5.4 backup (transportable) on a FB 3.0.1 and having this error:

gbak: 0.004 committing metadata
gbak: ERROR:Error while parsing procedure FZ_ESTOQUECONSOLIDADO's BLR
gbak: ERROR: Error while parsing procedure LISTASALDOSECUSTOS2's BLR
gbak: ERROR: internal Firebird consistency check ((CMP) copy: cannot remap (221), file: RecordSourceNodes.cpp line: 594)
gbak:Exiting before completion due to errors
gbak: ERROR:internal Firebird consistency check (can't continue after bugcheck)

I've tried to run gbak -C with -n and -m (and both) options and this error remain. Many procedures call UDFs from two 3rd part librarys: cpf_udf.so, http://rfunc.so, http://tbudf.so, all of then compiled for 64 bits.

I already tried to change the owner for UDF folder (and all files inside it) to firebird:firebird.

The full source code for this SPs and the UDFs librarys is here: https://drive.google.com/drive/folders/0BxCWYNjpA1-SRll4QjZuOThWdzQ?usp=sharing

UPDATE: after post, I've tried to do gbak -C again plus the -fix_fss_m win1252 and now I have this error:

gbak: 0.000 restoring privilege for user FZ_APURAÇAO_PIS_COFINS_ENT_SAI
gbak: ERROR:arithmetic exception, numeric overflow, or string truncation
gbak: ERROR: string right truncation
gbak: ERROR: expected length 31, actual 31
gbak:Exiting before completion due to errors

=>

I'm trying to restore a FB 2.5.4 backup (transportable) on a FB 3.0.1 and having this error:

gbak: 0.004 committing metadata
gbak: ERROR:Error while parsing procedure FZ_ESTOQUECONSOLIDADO's BLR
gbak: ERROR: Error while parsing procedure LISTASALDOSECUSTOS2's BLR
gbak: ERROR: internal Firebird consistency check ((CMP) copy: cannot remap (221), file: RecordSourceNodes.cpp line: 594)
gbak:Exiting before completion due to errors
gbak: ERROR:internal Firebird consistency check (can't continue after bugcheck)

I've tried to run gbak -C with -n and -m (and both) options and this error remain. Many procedures call UDFs from two 3rd part librarys: cpf_udf.so, http://rfunc.so, http://tbudf.so, all of then compiled for 64 bits.

I already tried to change the owner for UDF folder (and all files inside it) to firebird:firebird.

The full source code for this SPs and the UDFs librarys is here: https://drive.google.com/drive/folders/0BxCWYNjpA1-SRll4QjZuOThWdzQ?usp=sharing

UPDATE: after post, I've tried to do gbak -C again plus the -fix_fss_m win1252 and now I have this error:

gbak: 0.000 restoring privilege for user FZ_APURAÇAO_PIS_COFINS_ENT_SAI
gbak: ERROR:arithmetic exception, numeric overflow, or string truncation
gbak: ERROR: string right truncation
gbak: ERROR: expected length 31, actual 31
gbak:Exiting before completion due to errors

UPDATE 2: in this last restore (using -fix_fss_m win1252) I noticed that there are many messages in firebird.log like this

RDB$FLAGS for trigger CHECK_284 in RDB$TRIGGERS is corrupted (304)

But, the original datadabase in FB 2.5 doesn't show any consistence problem.

The firebird.log with all theses messages is in attachment.

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Can you send a minimal metadata backup or tables and views DDL to reproduce it?

@firebird-automations
Copy link
Collaborator Author

Commented by: Cristiano Ferrari (boxmga)

>> Can you send a minimal metadata backup or tables and views DDL to reproduce it?

Sure. I can send you all the metadata, but can't attach to this task, because the procedures/triggers sources have 3rd part code protected by copyright restrictions.

I'm sending in your e-mail address.

Tks a lot.

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

This bug is reproduced with this simple command:

select 1 from rdb$database a full join rdb$database b on (exists(select 1 from rdb$database));

v3 optimizer clone nodes where v2 does not.

Dmitry, could you look at it?

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

I will.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

summary: Error restoring on FB 3.0 from FB 2.5: error parsing procedure/consistence check => Error restoring on FB 3.0 from FB 2.5: bugcheck 221 (cannot remap)

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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

resolution: Fixed [ 1 ]

Fix Version: 3.0.2 [ 10785 ]

Fix Version: 4.0 Alpha 1 [ 10731 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Cristiano Ferrari (boxmga)

Tested with 3.0.2.32668-0.amd64 snapshot build and restore done OK

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Done successfully

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

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