432 words

Issue #270 - Page cache File handling produced an java.io.IOException: Negative seek offset

BugVersion: Priority: CriticalStatus: FixedReplies: 9
#1
2016-03-04 11:52

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

btc_es
btc_es's picture
Joined on 2014-10-20
User Post #102
#2
2016-03-04 14:10

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)
support
support's picture
Joined on 2010-05-03
User Post #2,455
#3
2016-03-04 15:12

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
btc_es
btc_es's picture
Joined on 2014-10-20
User Post #104
#4
2016-03-06 07:55

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)
support
support's picture
Joined on 2010-05-03
User Post #2,456
#5
2016-03-07 13:18

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)
btc_es
btc_es's picture
Joined on 2014-10-20
User Post #105
#6
2016-03-07 14:56

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)
support
support's picture
Joined on 2010-05-03
User Post #2,457
#7
2016-03-08 13:17

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)
btc_es
btc_es's picture
Joined on 2014-10-20
User Post #107
#8
2016-03-09 14:34

Please try build 2.6.7_04.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,461
#9
2016-03-10 07:05

Version 2.6.7_04 is not yet available.

btc_es
btc_es's picture
Joined on 2014-10-20
User Post #109
#10
2016-03-11 10:13

Problem is solved with Version 2.6.7_04.

btc_es
btc_es's picture
Joined on 2014-10-20
User Post #110

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel