Page #9 entry 0 (key 'bjjl') has 75 extra bytes / Unexpected last index ID: -119 (expected -116)

Type: BugVersion: 2.4.0Priority: NormalStatus: FixedReplies: 6
#1

Please check the attached database file. When running the Doctor, I get

 

Global Value Errors
-------------------
[1] Unexpected last index ID: -119 (expected -116)

Page Content Errors
-------------------
[1] Page #9 entry 0 has unexpected object format
[2] Page #9 entry 0 (key 'bjjl') has 75 extra bytes

 

Both errors are not fixable. When creating a new db file with the Doctor, this file yields the same errors. Please advise. 

If you need more information just let me know.

 

#2

This seems to be the same problem as of issue #796.

It may be possible to improve the Doctor in a way that these two objects will be deleted (not fixed), but still, if there is a bug that may cause storing arrays in a bad format - exploring it requires a way to reproduce the database creation process.

Do you know how to create a new database that will have that specific problem?

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#3

Will try to send you some code that recreates this part of the database. Can take some days though. Please stay tuned.

#4

Please see attached NetBeans project. Just run the application once, and check /tmp/bug.odb.

I get 

MacBook:tmp bjjl$ java -cp ~/Downloads/objectdb-2.4.0_03/bin/objectdb.jar com.objectdb.Doctor bug.odb
ObjectDB Doctor [version 2.4.0_03]
Copyright (c) 2012, ObjectDB Software. All rights reserved.

Scanning the database file...
0MB (total)

Analyzing database structure...
100%

Page Content Errors
-------------------
[1] Page #3 entry 0 has unexpected object format
[2] Page #3 entry 0 (key 'guest') has 11 extra bytes

#5

The resulting errors seem to be somewhat random. Sometimes everything is just fine. And just now I got (after deleting the database file and re-running the application):

MacBook:tmp bjjl$ java -cp ~/Downloads/objectdb-2.4.0_03/bin/objectdb.jar com.objectdb.Doctor bug.odb
ObjectDB Doctor [version 2.4.0_03]
Copyright (c) 2012, ObjectDB Software. All rights reserved.

Scanning the database file...
0MB (total)

Analyzing database structure...
100%

Missing Objects (Broken References)
-----------------------------------
[1] BTree #5122(5122):5713873
Referenced by:
  - odbbug.Person(2):'guest'

 

 

#6

Seems to depend on the calculated values for password and salt in the code.

 

#7

Thank you for this useful test.

It was a bug in the Doctor, i.e. the database is fine and there was a false alarm of the Doctor in checking byte arrays.

Build 2.4.1 fixes this problem.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply

To post a reply and/or subscribe to update notifications - please login