You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Jukka Zitting <ju...@gmail.com> on 2014/07/01 23:02:01 UTC
Re: svn commit: r1607081 - in /jackrabbit/oak/trunk:
oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/mk/
oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/mk/
oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/ oak-core/src/main/...
Hi,
On Tue, Jul 1, 2014 at 9:57 AM, <st...@apache.org> wrote:
> - return rep.getBlobStore().readBlob(blobId, pos, buff, off, length);
> + int read = rep.getBlobStore().readBlob(blobId, pos, buff, off, length);
> + return read < 0 ? 0 : read;
Shouldn't this (and all the other similar lines) be:
return read < 0 ? -1 : read;
? My build gets stuck in an infinite loop because the read() method returns 0.
BR,
Jukka Zitting
Re: svn commit: r1607081 - in /jackrabbit/oak/trunk:
oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/mk/
oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/mk/
oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/ oak-core/src/main/...
Posted by Jukka Zitting <ju...@gmail.com>.
Hi,
On Tue, Jul 1, 2014 at 5:02 PM, Jukka Zitting <ju...@gmail.com> wrote:
> On Tue, Jul 1, 2014 at 9:57 AM, <st...@apache.org> wrote:
>> - return rep.getBlobStore().readBlob(blobId, pos, buff, off, length);
>> + int read = rep.getBlobStore().readBlob(blobId, pos, buff, off, length);
>> + return read < 0 ? 0 : read;
>
> Shouldn't this (and all the other similar lines) be:
>
> return read < 0 ? -1 : read;
>
> ? My build gets stuck in an infinite loop because the read() method returns 0.
Answering my own questions: it shouldn't, as described in the issue.
The stuck thread I saw was (same stack trace for many minutes):
"main" #1 prio=5 os_prio=0 tid=0x00000000024c8000 nid=0x4c90 runnable
[0x00000000030fd000]
java.lang.Thread.State: RUNNABLE
at org.apache.jackrabbit.oak.commons.IOUtils.skipFully(IOUtils.java:80)
at org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore.readBlob(AbstractBlobStore.java:431)
at org.apache.jackrabbit.oak.plugins.document.DocumentMK.read(DocumentMK.java:322)
at org.apache.jackrabbit.oak.commons.mk.MicroKernelInputStream.read(MicroKernelInputStream.java:56)
at com.google.common.io.ByteStreams.read(ByteStreams.java:828)
at com.google.common.io.ByteSource.contentEquals(ByteSource.java:304)
at com.google.common.io.ByteStreams.equal(ByteStreams.java:661)
at org.apache.jackrabbit.oak.plugins.memory.AbstractBlob.equal(AbstractBlob.java:58)
at org.apache.jackrabbit.oak.plugins.memory.AbstractBlob.equals(AbstractBlob.java:153)
at org.junit.Assert.isEquals(Assert.java:132)
at org.junit.Assert.assertEquals(Assert.java:121)
at org.junit.Assert.assertEquals(Assert.java:147)
at org.apache.jackrabbit.oak.core.MutableTreeTest.testBlob(MutableTreeTest.java:474)
A subsequent build didn't reproduce this problem, so it might have
been some unrelated transient problem. I'll let you know if this
occurs again.
BR,
Jukka Zitting