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

"Invalid BLOB ID" error [CORE5078] #5365

Closed
firebird-automations opened this issue Jan 20, 2016 · 10 comments
Closed

"Invalid BLOB ID" error [CORE5078] #5365

firebird-automations opened this issue Jan 20, 2016 · 10 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pcisar

Attachments:
blob.fbk

After we switched couple columns from big varchar to blob one customer
reported 'Invalid BLOB ID' error. Unfortunately we were not able to
notice any pattern to explain what could be causing it thus we were not
able to create test case from scratch. Luckily we were able to strip
client DB down to one simplified SP (and three tables) where it happens
every time for us on 64 bit classic firebird 2.5.5 on windows
(32 bit 2.5.2/3/4/5 fb works fine, 64 bit 2.5.2/3/4/5 on windows and
2.5.3 on linux also generates error here). DB backup file is attached,
executing 'select * from do_changeTxStatus;' causes the error. SP code
and results we get follow below. SP code is made by combining multiple other
SPs and triggers, and then stripped down as much as possible, so the
code may not make any sense, it's just to demonstrate the error

set term ^;
create or alter procedure do_changeTxStatus
returns (info varchar(20), UPDCNT INTEGER, trans integer, subs integer,
MsgType integer, notifyParams integer)
as
declare variable tmpmessage blob;
begin
updCnt=0;
for select trans, subs
from trans
order by trans -- or 'subs desc' generates error, 'trans desc' or 'subs' -- no error
into :trans, :subs
do begin
for select distinct MsgType --removing distinct eliminates error
from NotifyParams p
where sscTableKey = :Subs
into :MsgType
do begin
info='assigning blob';
suspend;
tmpmessage='1606=222=333'; -- eliminating temp variable eliminates error
for select p.notifyParams
from NotifyParams p
where p.sscTableKey = :Subs
into :notifyParams
do begin
updCnt=updCnt+1;
info='inserting blob';
suspend;
insert into PendingSC (pendingSc, Priority, CommandBlob)
values (GEN_ID(GENID_PENDINGSC, 1), 500, :tmpMessage);
end
end
end
end
^
set term ;^
commit;

select * from do_changeTxStatus;

INFO UPDCNT TRANS SUBS MSGTYPE NOTIFYPARAMS
==================== ============ ============ ============ ============ ============
assigning blob 0 1361557 1449 2525 <null>
inserting blob 1 1361557 1449 2525 265
assigning blob 1 1361558 7955 2525 265
inserting blob 2 1361558 7955 2525 829
assigning blob 2 1361563 6707 2525 829
inserting blob 3 1361563 6707 2525 597
assigning blob 3 1361564 1502 2524 597
inserting blob 4 1361564 1502 2524 277
inserting blob 5 1361564 1502 2524 278
inserting blob 6 1361564 1502 2524 279
inserting blob 7 1361564 1502 2524 1340
assigning blob 7 1361564 1502 2525 1340
inserting blob 8 1361564 1502 2525 277
inserting blob 9 1361564 1502 2525 278
inserting blob 10 1361564 1502 2525 279
inserting blob 11 1361564 1502 2525 1340
assigning blob 11 1361566 7021 2525 1340
inserting blob 12 1361566 7021 2525 630
assigning blob 12 1361569 6614 2525 630
inserting blob 13 1361569 6614 2525 586
assigning blob 13 1361570 8303 2525 586
inserting blob 14 1361570 8303 2525 1668
assigning blob 14 1361572 7917 2525 1668
inserting blob 15 1361572 7917 2525 811
assigning blob 15 1361573 7523 2525 811
inserting blob 16 1361573 7523 2525 1187
assigning blob 16 1361576 815 2525 1187
inserting blob 17 1361576 815 2525 950
inserting blob 18 1361576 815 2525 951
inserting blob 19 1361576 815 2525 952
assigning blob 19 1361578 2746 2525 952
inserting blob 20 1361578 2746 2525 1012
assigning blob 20 1361581 3773 2525 1012
inserting blob 21 1361581 3773 2525 1078
assigning blob 21 1361582 7079 2525 1078
inserting blob 22 1361582 7079 2525 644
assigning blob 22 1361583 8144 2525 644
inserting blob 23 1361583 8144 2525 883
inserting blob 24 1361583 8144 2525 884
inserting blob 25 1361583 8144 2525 885
assigning blob 25 1361585 8162 2525 885
inserting blob 26 1361585 8162 2525 892
inserting blob 27 1361585 8162 2525 893
inserting blob 28 1361585 8162 2525 1575
assigning blob 28 1361586 1331 2525 1575
inserting blob 29 1361586 1331 2525 257
assigning blob 29 1361587 548 2525 257
inserting blob 30 1361587 548 2525 215
inserting blob 31 1361587 548 2525 216
assigning blob 31 1361588 8127 2525 216
inserting blob 32 1361588 8127 2525 946
inserting blob 33 1361588 8127 2525 947
assigning blob 33 1361589 2798 2525 947
inserting blob 34 1361589 2798 2525 1024
assigning blob 34 1361590 3776 2525 1024
inserting blob 35 1361590 3776 2525 1079
assigning blob 35 1361591 7031 2525 1079
inserting blob 36 1361591 7031 2525 634
assigning blob 36 1361592 1948 2525 634
inserting blob 37 1361592 1948 2525 358
inserting blob 38 1361592 1948 2525 359
inserting blob 39 1361592 1948 2525 360
assigning blob 39 1361593 8141 2525 360
inserting blob 40 1361593 8141 2525 861
inserting blob 41 1361593 8141 2525 862
inserting blob 42 1361593 8141 2525 863
assigning blob 42 1361594 7424 2524 863
inserting blob 43 1361594 7424 2524 1393
assigning blob 43 1361595 4311 2524 1393
inserting blob 44 1361595 4311 2524 1108
inserting blob 45 1361595 4311 2524 1446
assigning blob 45 1361595 4311 2525 1446
inserting blob 46 1361595 4311 2525 1108
inserting blob 47 1361595 4311 2525 1446
assigning blob 47 1361596 7915 2525 1446
inserting blob 48 1361596 7915 2525 806
assigning blob 48 1361599 7588 2525 806
inserting blob 49 1361599 7588 2525 749
assigning blob 49 1361600 2806 2524 749
inserting blob 50 1361600 2806 2524 1029
inserting blob 51 1361600 2806 2524 1482
Statement failed, SQLSTATE = 42000
invalid BLOB ID
-At procedure 'DO_CHANGETXSTATUS' line: 31, col: 21

Commits: 5b2f994 0455367 FirebirdSQL/fbt-repository@5d0c88a FirebirdSQL/fbt-repository@9491b3b

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

Confirmed, got exception during selecting data on Classic WI-V2.5.5.26952, x64.
STDERR:
Statement failed, SQLSTATE = 42000
invalid BLOB ID
-At procedure 'DO_CHANGETXSTATUS' line: 31, col: 21

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Attachment: blob.fbk [ 12872 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @mrotteveel

In the description you mention this happens with Classic, what about SuperServer and SuperClassic?

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

Version: 3.0 RC1 [ 10584 ]

Version: 3.0 Beta 2 [ 10586 ]

Version: 3.0 Beta 1 [ 10332 ]

Fix Version: 3.0 RC2 [ 10048 ]

Fix Version: 2.5.6 [ 10721 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Mark,

knowing the reason of bug i can tell that:
- it is very old, probably since v1.5
- it is very rare and hard to reproduce
- it is not dependent on engine architecture and\or bitness

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

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

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Attila Molnár (e_pluribus_unum)

Hi Vlad!

I have a similar error message in JDBC411. Are they related?
Is there a 2.5.6 nightly build zip package to test it?

Thank You!

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Done successfully

Test Details: Confirmed, got exception during selecting data on Classic WI-V2.5.5.26952, x64.
STDERR:
Statement failed, SQLSTATE = 42000
invalid BLOB ID
-At procedure 'DO_CHANGETXSTATUS' line: 31, col: 21

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Hi Attila,

i can't say for sure if JDBC411 is related with this issue, sorry.
As for 2.5.6 snapshot builds - it is there: http://www.firebirdsql.org/en/snapshot-builds/

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