Doctor crashes while creating database copy with java.lang.ArrayIndexOutOfBoundsException: pos

#1

Hi, unfortunately the fix to Doctor in 2.9.5_03 did not work completely, we are now running into the following exception:

.................................................. 50800MB
.................................................. 50900MB
............................................... 50994MB (total)
Analyzing database structure...
10% 20% 30% 40% 50% 60% 70% 80% 90% 100%

No errors have been found.

Creating a database copy...

.................................................. 1000000 objects
..................java.lang.ArrayIndexOutOfBoundsException: pos
at com.objectdb.o.ByteWriter.v(ByteWriter.java:121)
at com.objectdb.o.SPW.aq(SPW.java:378)
at com.objectdb.o.SPW.at(SPW.java:299)
at com.objectdb.o.SPW.W(SPW.java:70)
at com.objectdb.o.PGW.V(PGW.java:343)
at com.objectdb.o.PGW.al(PGW.java:163)
at com.objectdb.o.UPT.u(UPT.java:135)
at com.objectdb.o.UPT.g(UPT.java:111)
at com.objectdb.o.TSK.b(TSK.java:146)
at com.objectdb.o.TSK.c(TSK.java:96)
at com.objectdb.o.UPT.n(UPT.java:158)
at com.objectdb.o.PGT.j(PGT.java:155)
at com.objectdb.o.UPT.u(UPT.java:122)
at com.objectdb.o.URT.g(URT.java:173)
at com.objectdb.o.TSK.b(TSK.java:146)
at com.objectdb.o.TSK.c(TSK.java:96)
at com.objectdb.o.TSM.a(TSM.java:88)
at com.objectdb.o.UTT.r(UTT.java:377)
at com.objectdb.o.UTT.g(UTT.java:225)
at com.objectdb.o.TSK.b(TSK.java:146)
at com.objectdb.o.TSK.c(TSK.java:96)
at com.objectdb.o.TSM.a(TSM.java:88)
at com.objectdb.o.MST.Y3(MST.java:1446)
at com.objectdb.o.DCM.c(DCM.java:997)
at com.objectdb.o.DCM.w(DCM.java:929)
at com.objectdb.o.DCM.w(DCM.java:843)
at com.objectdb.o.DCM.r(DCM.java:330)
at com.objectdb.o.DCM.j(DCM.java:183)
at com.objectdb.Doctor.main(Doctor.java:22)

[ObjectDB 2.9.5_03] pos
[./main.odb] Took 34 minutes and 7 seconds

Filesize before: 50G ./main.odb
Filesize after: 24G fixed/./main.odb
#2

This was a regression in build 2.9.5_03. Build 2.9.5_04 fixes the exception from this report. Please give it a test and report back.

Fixing the root issue using only stack traces is tough, so we might need a couple more iterations to get Doctor working with your file.

ObjectDB Support
#3

Hi, sorry for the delay. Completely understand that fixing just off of stack traces is difficult, we're happy to continue trying and reporting updates. Speaking of, Doctor ran into a different exception now. Other than the Doctor issues, the database is functional, so this is not a critical issue at the moment.

............................... 52363MB (total)
Analyzing database structure...
10% 20% 30% 40% 50% 60% 70% 80% 90% 100%

No errors have been found.

Creating a database copy...
java.lang.ArrayIndexOutOfBoundsException: arraycopy: last destination index 2240871222 out of bounds for byte[2147483639]
    at java.base/java.lang.System.arraycopy(Native Method)
    at com.objectdb.o.BYW.h(BYW.java:729)
    at com.objectdb.o.BYW.v(BYW.java:639)
    at com.objectdb.o.BYW.v(BYW.java:627)
    at com.objectdb.o.RSV.O(RSV.java:128)
    at com.objectdb.o.CMV.Y8(CMV.java:284)
    at com.objectdb.o.CMV.O(CMV.java:261)
    at com.objectdb.o.VLV.g(VLV.java:355)
    at com.objectdb.o.VLV.h(VLV.java:321)
    at com.objectdb.o.VLV.e(VLV.java:289)
    at com.objectdb.o.DCM.w(DCM.java:841)
    at com.objectdb.o.DCM.r(DCM.java:330)
    at com.objectdb.o.DCM.j(DCM.java:183)
    at com.objectdb.Doctor.main(Doctor.java:22)

[ObjectDB 2.9.5_04] arraycopy: last destination index 2240871222 out of bounds for byte[2147483639]
[./main.odb] Took 28 minutes and 14 seconds

Filesize before: 52G    ./main.odb 
Filesize after: 4.0K    fixed/./main.odb
#4

Thank you for this report. Please test the fix in Build 2.9.5_05.

ObjectDB Support
#5

Doctor finished successfully, thank you for the fix.

#6

Thank you for the update. This issue will be now closed.

ObjectDB Support

Reply