Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Fail to read queue. #203

Open
chrisjenx opened this issue Nov 17, 2018 · 0 comments
Open

Fail to read queue. #203

chrisjenx opened this issue Nov 17, 2018 · 0 comments

Comments

@chrisjenx
Copy link

We run while(queue.size() > 2000) queue.remove() to prune our queue if it's getting to long, but after upgrading to Tape 2 we keep getting:

Caused by java.lang.ArrayIndexOutOfBoundsException: length=32; regionStart=0; regionLength=-1350298417
       at java.util.Arrays.checkOffsetAndCount(Arrays.java:136)
       at libcore.io.IoBridge.read(IoBridge.java:523)
       at java.io.RandomAccessFile.readBytes(RandomAccessFile.java:336)
       at java.io.RandomAccessFile.read(RandomAccessFile.java:365)
       at java.io.RandomAccessFile.readFully(RandomAccessFile.java:424)
       at com.squareup.tape2.QueueFile.ringRead(QueueFile.java:350)
       at com.squareup.tape2.QueueFile.remove(QueueFile.java:631)
       at com.squareup.tape2.QueueFile.remove(QueueFile.java:595)
       at com.squareup.tape2.FileObjectQueue.remove(FileObjectQueue.java:47)
       at com.instacart.instashopper.v2.log.logdna.ISLogDnaTree.logSynchronized(ISLogDnaTree.kt:81)
       at com.instacart.instashopper.v2.log.logdna.ISLogDnaTree.access$logSynchronized(ISLogDnaTree.kt:28)
       at com.instacart.instashopper.v2.log.logdna.ISLogDnaTree$logOnTapeScheduler$1.call(ISLogDnaTree.kt:89)
       at com.instacart.instashopper.v2.log.logdna.ISLogDnaTree$logOnTapeScheduler$1.call(ISLogDnaTree.kt:28)
       at io.reactivex.internal.operators.observable.ObservableFromCallable.subscribeActual(ObservableFromCallable.java:43)
       at io.reactivex.Observable.subscribe(Observable.java:12090)
       at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
       at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
       at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
       at java.lang.Thread.run(Thread.java:764)

I've been writing tests to try and reproduce the issue, but I can only seem to randomly make it happen on a device.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant