1 Reply Latest reply: Apr 15, 2014 6:14 PM by Greybird-Oracle RSS

    The jdb data file cannot be deleted due to  com.sleepycat.je.log.ChecksumException

    1072560

      Hi,

       

      I'm using BDB-JE 5.0.43, and found intermittently some .jdb file cannot be deleted by cleaner due to  com.sleepycat.je.log.ChecksumException, so I ran below command trying to diagnostic the issue

       

      $ java -cp  bdb-je.jar  com.sleepycat.je.util.DbVerifyLog -h ~/data-store

       

      com.sleepycat.je.util.LogVerificationException: Log is invalid, fileName: 00000135.jdb fileNumber: 0x135 logEntryOffset: 0x6077fe0 verifyState: INVALID reason: com.sleepycat.je.log.ChecksumExcep\

      tion: Read invalid log entry type: 0

              at com.sleepycat.je.util.LogVerificationInputStream.newVerifyException(LogVerificationInputStream.java:562)

              at com.sleepycat.je.util.LogVerificationInputStream.newVerifyException(LogVerificationInputStream.java:555)

              at com.sleepycat.je.util.LogVerificationInputStream.processFixedHeader(LogVerificationInputStream.java:418)

              at com.sleepycat.je.util.LogVerificationInputStream.verify(LogVerificationInputStream.java:350)

              at com.sleepycat.je.util.LogVerificationInputStream.read(LogVerificationInputStream.java:239)

              at com.sleepycat.je.util.LogVerificationInputStream.read(LogVerificationInputStream.java:212)

              at com.sleepycat.je.util.DbVerifyLog.verify(DbVerifyLog.java:143)

              at com.sleepycat.je.util.DbVerifyLog.main(DbVerifyLog.java:187)

      Caused by: com.sleepycat.je.log.ChecksumException: Read invalid log entry type: 0

              at com.sleepycat.je.log.LogEntryHeader.<init>(LogEntryHeader.java:161)

              at com.sleepycat.je.util.LogVerificationInputStream.processFixedHeader(LogVerificationInputStream.java:416)

              at com.sleepycat.je.util.LogVerificationInputStream.verify(LogVerificationInputStream.java:350)

              at com.sleepycat.je.util.LogVerificationInputStream.read(LogVerificationInputStream.java:239)

              at com.sleepycat.je.util.LogVerificationInputStream.read(LogVerificationInputStream.java:212)

              at com.sleepycat.je.util.DbVerifyLog.verify(DbVerifyLog.java:143)

              at com.sleepycat.je.util.DbVerifyLog.main(DbVerifyLog.java:188)

      com.sleepycat.je.util.LogVerificationException: Log is invalid, fileName: 00000135.jdb fileNumber: 0x135 logEntryOffset: 0x6077fe0 verifyState: INVALID reason: com.sleepycat.je.log.ChecksumExcep\

      tion: Read invalid log entry type: 0

       

      and also ran

      java -cp bdb-je.jar com.sleepycat.je.util.DbSpace  -h ~/data-store


      it shows


      File    Size (KB)  % Used

      --------  ---------  ------

      00000034     102157      32

      0000009f     102393      67

      00000135     102392       0

      0000013b     102391       0

      00000149     102398       0

      00000154     102396      33

       

      As you will notice the data utilization of 00000135 is zero.

      We tried removing the .jdb file for 00000135, but got FileNotFoundException when opening the store.


      Any suggestion we can do about this issue?


      Thanks


      Anfernee

        • 1. Re: The jdb data file cannot be deleted due to  com.sleepycat.je.log.ChecksumException
          Greybird-Oracle

          Anfernee,


          The checksum is meant to detect file corruption due to OS/filesystem/driver bugs or media failure.  The zero reported may indicate that there is a block of zeros written by the filesystem at the location -- we've seen this happen before, anyway.  In any case, the file is bad.


          To recover, you can restore the file from a backup (assuming the file in the backup set is valid), or recreate your data set if you don't have a valid backup.


          The fact that the utilization of that file is zero according to DbSpace doesn't help with this problem.  The utilization reported by DbSpace is only approximate.  The file is still referenced and needed, or you wouldn't get errors when you try to run without it.


          --mark