Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-1409

After crash, segment persistence is broken with failures in java.nio classes

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.15
    • Fix Version/s: 0.17
    • Component/s: segmentmk
    • Labels:
      None

      Description

      For some unknown reasons my laptop crashed and with it our Oak-based application. After starting it again, the persistence is broken, and nothing works. My OS and file system looks fine (Operating system: OSX Mavericks, rebooted by itself while it was closed, only noticeable through a "your system was restarted" dialog).

      There are java.nio DirectByteBuffer, ByteBuffer and Buffer exceptions (null argument, index out of bounds, and bufferoverflow) see below.

      07.02.2014 07:04:43.843 *ERROR* [pool-7-thread-1] org.apache.sling.commons.scheduler.impl.QuartzScheduler Exception during job execution of org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate@691a70f1 : null
      java.lang.IllegalArgumentException: null
      	at java.nio.Buffer.position(Buffer.java:216) ~[na:1.6.0_29]
      	at org.apache.jackrabbit.oak.plugins.segment.file.MappedAccess.write(MappedAccess.java:65) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.file.TarFile.writeEntry(TarFile.java:166) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.file.FileStore.writeSegment(FileStore.java:318) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.flush(SegmentWriter.java:201) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.prepare(SegmentWriter.java:238) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.writeMapLeaf(SegmentWriter.java:310) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.writeMapBucket(SegmentWriter.java:376) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.writeMapBucket(SegmentWriter.java:403) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.writeMapBucket(SegmentWriter.java:412) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.writeMapBucket(SegmentWriter.java:412) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.writeMap(SegmentWriter.java:590) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.writeNode(SegmentWriter.java:894) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeBuilder.getNodeState(SegmentNodeBuilder.java:62) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore.checkpoint(SegmentNodeStore.java:210) ~[na:na]
      	at org.apache.jackrabbit.oak.spi.state.ProxyNodeStore.checkpoint(ProxyNodeStore.java:60) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.run(AsyncIndexUpdate.java:115) ~[na:na]
      	at org.apache.sling.commons.scheduler.impl.QuartzJobExecutor.execute(QuartzJobExecutor.java:105) ~[org.apache.sling.commons.scheduler-2.4.2.jar:na]
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:207) [org.apache.sling.commons.scheduler-2.4.2.jar:na]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_29]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_29]
      	at java.lang.Thread.run(Thread.java:680) [na:1.6.0_29]
      
      07.02.2014 07:10:23.841 *ERROR* [pool-7-thread-1] org.apache.sling.commons.scheduler.impl.QuartzScheduler Exception during job execution of org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate@691a70f1 : null
      java.lang.IndexOutOfBoundsException: null
      	at java.nio.ByteBuffer.wrap(ByteBuffer.java:352) ~[na:1.6.0_29]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.flush(SegmentWriter.java:197) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.prepare(SegmentWriter.java:238) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.prepare(SegmentWriter.java:214) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.writeValueRecord(SegmentWriter.java:476) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.writeString(SegmentWriter.java:614) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.writeProperty(SegmentWriter.java:726) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.writeNode(SegmentWriter.java:918) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentWriter$2.childNodeAdded(SegmentWriter.java:871) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.compareAgainstBaseState(ModifiedNodeState.java:384) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.writeNode(SegmentWriter.java:868) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeBuilder.getNodeState(SegmentNodeBuilder.java:62) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore.checkpoint(SegmentNodeStore.java:210) ~[na:na]
      	at org.apache.jackrabbit.oak.spi.state.ProxyNodeStore.checkpoint(ProxyNodeStore.java:60) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.run(AsyncIndexUpdate.java:115) ~[na:na]
      	at org.apache.sling.commons.scheduler.impl.QuartzJobExecutor.execute(QuartzJobExecutor.java:105) ~[org.apache.sling.commons.scheduler-2.4.2.jar:na]
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:207) [org.apache.sling.commons.scheduler-2.4.2.jar:na]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_29]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_29]
      	at java.lang.Thread.run(Thread.java:680) [na:1.6.0_29]
      
      07.02.2014 07:02:34.408 *ERROR* [TarMK flush thread: /Users/alex/Work/code/cq/master/quickstart/target/crx-quickstart/repository] org.apache.sling.extensions.threaddump.internal.Activator Uncaught exception in Thread Thread[TarMK flush thread: /Users/alex/Work/code/cq/master/quickstart/target/crx-quickstart/repository,1,main]
      java.nio.BufferOverflowException: null
      	at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:352) ~[na:1.6.0_29]
      	at org.apache.jackrabbit.oak.plugins.segment.file.MappedAccess.write(MappedAccess.java:66) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.file.TarFile.writeEntry(TarFile.java:169) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.file.FileStore.writeSegment(FileStore.java:318) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.flush(SegmentWriter.java:201) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.file.FileStore.flush(FileStore.java:189) ~[na:na]
      	at org.apache.jackrabbit.oak.plugins.segment.file.FileStore$1.run(FileStore.java:164) ~[na:na]
      	at java.lang.Thread.run(Thread.java:680) ~[na:1.6.0_29]
      

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              jukkaz Jukka Zitting
              Reporter:
              alexander.klimetschek Alexander Klimetschek

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment