Home » Support » Issue Tracking » Page cache File handling produced an java.io.IOException: Negative seek offset

Page cache File handling produced an java.io.IOException: Negative seek offset

Type: BugPriority: CriticalStatus: FixedReplies: 9
#1

we get following exception when we execute a find() in a scenario, we can not readjust with an example.

 

Before the exception throws we get two outputs on std error:

pos = -8192
length = 8192

 

The Exception:

Failed to read from file 'C:\Users\DEVELO~1\AppData\Local\Temp\objectdb_541100773067300498\pages11.dat'
Exception in thread "Thread-359" [ObjectDB 2.6.6_08] javax.persistence.PersistenceException
Failed to read from file 'C:\Users\DEVELO~1\AppData\Local\Temp\objectdb_541100773067300498\pages11.dat' (error 117)
    at com.objectdb.jpa.EMImpl.find(EMImpl.java:630)
    at com.objectdb.jpa.EMImpl.find(EMImpl.java:545)
    at com.btc.ep.base.dal.internal.services.PersistenceUtilityServiceImpl.find(PersistenceUtilityServiceImpl.java:108)
    ...
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.objectdb.o.UserException: Failed to read from file 'C:\Users\DEVELO~1\AppData\Local\Temp\objectdb_541100773067300498\pages11.dat'
    at com.objectdb.o.MSG.d(MSG.java:75)
    at com.objectdb.o.LFL.UA(LFL.java:1107)
    at com.objectdb.o.PageCacheFile.l(PageCacheFile.java:165)
    at com.objectdb.o.PAG.L(PAG.java:448)
    at com.objectdb.o.PAG.T(PAG.java:550)
    at com.objectdb.o.PAG.U(PAG.java:563)
    at com.objectdb.o.RRT.C(RRT.java:241)
    at com.objectdb.o.RTT.l(RTT.java:134)
    at com.objectdb.o.RRT.l(RRT.java:32)
    at com.objectdb.o.TSK.i(TSK.java:145)
    at com.objectdb.o.TSK.f(TSK.java:95)
    at com.objectdb.o.TSM.e(TSM.java:86)
    at com.objectdb.o.MST.a1(MST.java:707)
    at com.objectdb.o.MST.aY(MST.java:476)
    at com.objectdb.o.MST.Vl(MST.java:442)
    at com.objectdb.o.WRA.Vl(WRA.java:266)
    at com.objectdb.o.LDR.G(LDR.java:556)
    at com.objectdb.o.LDR.F(LDR.java:473)
    at com.objectdb.o.LDR.A(LDR.java:272)
    at com.objectdb.o.OBC.aP(OBC.java:1059)
    at com.objectdb.o.OBC.aN(OBC.java:977)
    at com.objectdb.jpa.EMImpl.find(EMImpl.java:625)
    ... 15 more
Caused by: java.io.IOException: Negative seek offset
    at java.io.RandomAccessFile.seek(RandomAccessFile.java:555)
    at com.objectdb.o.LFL.L(LFL.java:1184)
    at com.objectdb.o.LFL.UA(LFL.java:1101)
    ... 35 more

I also add a screenshot of the temp directory. Striking is the size of page11.dat

#2

The stack trace indicates a missing synchronization in the new implementation of temporary files for very large transactions. Version 2.6.7 should fix this bug.

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

Version 2.6.7 don't fix the bug:  (Now there are other line Numbers in PAG.java)

pos = -8192
length = 8192
[ObjectDB 2.6.7] javax.persistence.PersistenceException
Failed to read from file 'C:\Users\DEVELO~1\AppData\Local\Temp\objectdb_3242438124290483846\pages3.dat' (error 117)
at com.objectdb.jpa.EMImpl.find(EMImpl.java:630)
at com.objectdb.jpa.EMImpl.find(EMImpl.java:545)
at com.btc.ep.base.dal.internal.services.PersistenceUtilityServiceImpl.find(PersistenceUtilityServiceImpl.java:108)
...
at java.lang.Thread.run(Thread.java:745)
Caused by: com.objectdb.o.UserException: Failed to read from file 'C:\Users\DEVELO~1\AppData\Local\Temp\objectdb_3242438124290483846\pages3.dat'
at com.objectdb.o.MSG.d(MSG.java:75)
at com.objectdb.o.LFL.UB(LFL.java:1107)
at com.objectdb.o.PageCacheFile.l(PageCacheFile.java:165)
at com.objectdb.o.PAG.L(PAG.java:451)
at com.objectdb.o.PAG.T(PAG.java:565)
at com.objectdb.o.PAG.U(PAG.java:578)
at com.objectdb.o.RRT.C(RRT.java:241)
at com.objectdb.o.RTT.l(RTT.java:134)
at com.objectdb.o.RRT.l(RRT.java:32)
at com.objectdb.o.TSK.i(TSK.java:145)
at com.objectdb.o.TSK.f(TSK.java:95)
at com.objectdb.o.TSM.e(TSM.java:86)
at com.objectdb.o.MST.a1(MST.java:707)
at com.objectdb.o.MST.aY(MST.java:476)
at com.objectdb.o.MST.Vl(MST.java:442)
at com.objectdb.o.WRA.Vl(WRA.java:266)
at com.objectdb.o.LDR.G(LDR.java:556)
at com.objectdb.o.LDR.F(LDR.java:473)
at com.objectdb.o.LDR.A(LDR.java:272)
at com.objectdb.o.OBC.aP(OBC.java:1059)
at com.objectdb.o.OBC.aN(OBC.java:977)
at com.objectdb.jpa.EMImpl.find(EMImpl.java:625)
... 15 more
Caused by: java.io.IOException: Negative seek offset
at java.io.RandomAccessFile.seek(RandomAccessFile.java:555)
at com.objectdb.o.LFL.L(LFL.java:1184)
at com.objectdb.o.LFL.UB(LFL.java:1101)
... 35 more
#4

Build 2.6.7_01 includes another attempt. Unfortunately with no test case that reproduces the exception it is still possible that the new build will not solve the issue.

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

Also Version 2.6.7_1 don't fix the bug:

Exception in thread "Thread-174" [ObjectDB 2.6.7_01] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) 64-Bit Server VM 1.8.0_51 (on Windows 7 6.1).
Please report this error on http://www.objectdb.com/database/issue/new
com.objectdb.o.InternalException: java.lang.NullPointerException: null
java.lang.NullPointerException
at com.objectdb.o.PAG.T(PAG.java:566)
at com.objectdb.o.PAG.U(PAG.java:578)
at com.objectdb.o.RRT.C(RRT.java:241)
at com.objectdb.o.RTT.l(RTT.java:134)
at com.objectdb.o.RRT.l(RRT.java:32)
at com.objectdb.o.TSK.i(TSK.java:145)
at com.objectdb.o.TSK.f(TSK.java:95)
at com.objectdb.o.TSM.e(TSM.java:86)
at com.objectdb.o.MST.a1(MST.java:707)
at com.objectdb.o.MST.aY(MST.java:476)
at com.objectdb.o.MST.Vl(MST.java:442)
at com.objectdb.o.WRA.Vl(WRA.java:266)
at com.objectdb.o.LDR.G(LDR.java:556)
at com.objectdb.o.LDR.F(LDR.java:473)
at com.objectdb.o.LDR.A(LDR.java:272)
at com.objectdb.o.OBC.aP(OBC.java:1059)
at com.objectdb.o.OBC.aN(OBC.java:977)
at com.objectdb.jpa.EMImpl.find(EMImpl.java:625)
at com.objectdb.jpa.EMImpl.find(EMImpl.java:545)
at com.btc.ep.base.dal.internal.services.PersistenceUtilityServiceImpl.find(PersistenceUtilityServiceImpl.java:108)
...
at java.lang.Thread.run(Thread.java:745)
#6

Build 2.6.7_02 adds some diagnosis checks in order to produce a better stack trace, but probably will not solve the bug either. If you can provide a test case that demonstrates the exception it may accelerate solving this bug.

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

Exception with version 2.6.7_02

Exception in thread "Thread-171" [ObjectDB 2.6.7_02] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) 64-Bit Server VM 1.8.0_51 (on Windows 7 6.1).
Please report this error on http://www.objectdb.com/database/issue/new
com.objectdb.o.InternalException: null
com.objectdb.o.InternalException
at com.objectdb.o.PAG.L(PAG.java:451)
at com.objectdb.o.PAG.T(PAG.java:569)
at com.objectdb.o.PAG.U(PAG.java:582)
at com.objectdb.o.RRT.C(RRT.java:241)
at com.objectdb.o.RTT.l(RTT.java:134)
at com.objectdb.o.RRT.l(RRT.java:32)
at com.objectdb.o.TSK.i(TSK.java:145)
at com.objectdb.o.TSK.f(TSK.java:95)
at com.objectdb.o.TSM.e(TSM.java:86)
at com.objectdb.o.MST.a1(MST.java:707)
at com.objectdb.o.MST.aY(MST.java:476)
at com.objectdb.o.MST.Vl(MST.java:442)
at com.objectdb.o.WRA.Vl(WRA.java:266)
at com.objectdb.o.LDR.G(LDR.java:556)
at com.objectdb.o.LDR.F(LDR.java:473)
at com.objectdb.o.LDR.A(LDR.java:272)
at com.objectdb.o.OBC.aP(OBC.java:1059)
at com.objectdb.o.OBC.aN(OBC.java:977)
at com.objectdb.jpa.EMImpl.find(EMImpl.java:625)
at com.objectdb.jpa.EMImpl.find(EMImpl.java:545)
at com.btc.ep.base.dal.internal.services.PersistenceUtilityServiceImpl.find(PersistenceUtilityServiceImpl.java:108)
...
at java.lang.Thread.run(Thread.java:745)
#8

Please try build 2.6.7_04.

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

Version 2.6.7_04 is not yet available.

#10

Problem is solved with Version 2.6.7_04.


Post Reply

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