[jira] [Updated] (CASSANDRA-7664) IndexOutOfBoundsException thrown during repair
[ https://issues.apache.org/jira/browse/CASSANDRA-7664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcus Eriksson updated CASSANDRA-7664: --- Attachment: 0001-throw-EOFException-if-we-run-out-of-chunks-in-compre.patch throw EOF exception if the datafile does not contain the chunks expected IndexOutOfBoundsException thrown during repair -- Key: CASSANDRA-7664 URL: https://issues.apache.org/jira/browse/CASSANDRA-7664 Project: Cassandra Issue Type: Bug Components: Core Environment: RHEL 6.1 Casandra 1.2.3 - 1.2.18 Reporter: ZhongYu Assignee: Marcus Eriksson Fix For: 2.0.10 Attachments: $O[TOX~GGUZRW~IHPYPEG{0.jpg, 0001-throw-EOFException-if-we-run-out-of-chunks-in-compre.patch, other-errors.txt I was running repair command with moderate read and write load at the same time. And I found tens of IndexOutOfBoundsException in system log as follows: {quote} ERROR [Thread-6056] 2013-05-22 14:47:59,416 CassandraDaemon.java (line132) Exception in thread Thread[Thread-6056,5,main] java.lang.IndexOutOfBoundsException at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:75) at org.apache.cassandra.streaming.compress.CompressedInputStream$Reader.runMayThrow(CompressedInputStream.java:151) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at java.lang.Thread.run(Thread.java:662) {quote} I read the source code of CompressedInputStream.java and found there surely will throw IndexOutOfBoundsException in the following situation: {code:title=CompressedInputStream.java|borderStyle=solid} // Part of CompressedInputStream.java start from Line 139 protected void runMayThrow() throws Exception { byte[] compressedWithCRC; while (chunks.hasNext()) { CompressionMetadata.Chunk chunk = chunks.next(); int readLength = chunk.length + 4; // read with CRC compressedWithCRC = new byte[readLength]; int bufferRead = 0; while (bufferRead readLength) bufferRead += source.read(compressedWithCRC, bufferRead, readLength - bufferRead); dataBuffer.put(compressedWithCRC); } } {code} If read function read nothing because the end of the stream has been reached, it will return -1, thus bufferRead can be negetive. In the next circle, read function will throw IndexOutOfBoundsException because bufferRead is negetive. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-7664) IndexOutOfBoundsException thrown during repair
[ https://issues.apache.org/jira/browse/CASSANDRA-7664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yuki Morishita updated CASSANDRA-7664: -- Reviewer: Yuki Morishita IndexOutOfBoundsException thrown during repair -- Key: CASSANDRA-7664 URL: https://issues.apache.org/jira/browse/CASSANDRA-7664 Project: Cassandra Issue Type: Bug Components: Core Environment: RHEL 6.1 Casandra 1.2.3 - 1.2.18 Reporter: ZhongYu Assignee: Marcus Eriksson Fix For: 2.0.10 Attachments: $O[TOX~GGUZRW~IHPYPEG{0.jpg, 0001-throw-EOFException-if-we-run-out-of-chunks-in-compre.patch, other-errors.txt I was running repair command with moderate read and write load at the same time. And I found tens of IndexOutOfBoundsException in system log as follows: {quote} ERROR [Thread-6056] 2013-05-22 14:47:59,416 CassandraDaemon.java (line132) Exception in thread Thread[Thread-6056,5,main] java.lang.IndexOutOfBoundsException at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:75) at org.apache.cassandra.streaming.compress.CompressedInputStream$Reader.runMayThrow(CompressedInputStream.java:151) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at java.lang.Thread.run(Thread.java:662) {quote} I read the source code of CompressedInputStream.java and found there surely will throw IndexOutOfBoundsException in the following situation: {code:title=CompressedInputStream.java|borderStyle=solid} // Part of CompressedInputStream.java start from Line 139 protected void runMayThrow() throws Exception { byte[] compressedWithCRC; while (chunks.hasNext()) { CompressionMetadata.Chunk chunk = chunks.next(); int readLength = chunk.length + 4; // read with CRC compressedWithCRC = new byte[readLength]; int bufferRead = 0; while (bufferRead readLength) bufferRead += source.read(compressedWithCRC, bufferRead, readLength - bufferRead); dataBuffer.put(compressedWithCRC); } } {code} If read function read nothing because the end of the stream has been reached, it will return -1, thus bufferRead can be negetive. In the next circle, read function will throw IndexOutOfBoundsException because bufferRead is negetive. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-7664) IndexOutOfBoundsException thrown during repair
[ https://issues.apache.org/jira/browse/CASSANDRA-7664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Branson updated CASSANDRA-7664: Attachment: other-errors.txt Got this on a bootstrapping node shortly after a stream failed. See other-errors.txt file for the relevant log information. IndexOutOfBoundsException thrown during repair -- Key: CASSANDRA-7664 URL: https://issues.apache.org/jira/browse/CASSANDRA-7664 Project: Cassandra Issue Type: Bug Components: Core Environment: RHEL 6.1 Casandra 1.2.3 - 1.2.18 Reporter: ZhongYu Attachments: $O[TOX~GGUZRW~IHPYPEG{0.jpg, other-errors.txt I was running repair command with moderate read and write load at the same time. And I found tens of IndexOutOfBoundsException in system log as follows: {quote} ERROR [Thread-6056] 2013-05-22 14:47:59,416 CassandraDaemon.java (line132) Exception in thread Thread[Thread-6056,5,main] java.lang.IndexOutOfBoundsException at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:75) at org.apache.cassandra.streaming.compress.CompressedInputStream$Reader.runMayThrow(CompressedInputStream.java:151) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at java.lang.Thread.run(Thread.java:662) {quote} I read the source code of CompressedInputStream.java and found there surely will throw IndexOutOfBoundsException in the following situation: {code:title=CompressedInputStream.java|borderStyle=solid} // Part of CompressedInputStream.java start from Line 139 protected void runMayThrow() throws Exception { byte[] compressedWithCRC; while (chunks.hasNext()) { CompressionMetadata.Chunk chunk = chunks.next(); int readLength = chunk.length + 4; // read with CRC compressedWithCRC = new byte[readLength]; int bufferRead = 0; while (bufferRead readLength) bufferRead += source.read(compressedWithCRC, bufferRead, readLength - bufferRead); dataBuffer.put(compressedWithCRC); } } {code} If read function read nothing because the end of the stream has been reached, it will return -1, thus bufferRead can be negetive. In the next circle, read function will throw IndexOutOfBoundsException because bufferRead is negetive. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-7664) IndexOutOfBoundsException thrown during repair
[ https://issues.apache.org/jira/browse/CASSANDRA-7664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ZhongYu updated CASSANDRA-7664: --- Description: I was running repair command with moderate read and write load at the same time. And I found tens of IndexOutOfBoundsException in system log as follows: ERROR [Thread-6056] 2013-05-22 14:47:59,416 CassandraDaemon.java (line132) Exception in thread Thread[Thread-6056,5,main] java.lang.IndexOutOfBoundsException at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:75) at org.apache.cassandra.streaming.compress.CompressedInputStream$Reader.runMayThrow(CompressedInputStream.java:151) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at java.lang.Thread.run(Thread.java:662) I read the source code of CompressedInputStream.java and found there surely will throw IndexOutOfBoundsException in the following situation: {code:title=CompressedInputStream.java|borderStyle=solid} // Part of CompressedInputStream.java start from Line 139 protected void runMayThrow() throws Exception { byte[] compressedWithCRC; while (chunks.hasNext()) { CompressionMetadata.Chunk chunk = chunks.next(); int readLength = chunk.length + 4; // read with CRC compressedWithCRC = new byte[readLength]; int bufferRead = 0; while (bufferRead readLength) bufferRead += source.read(compressedWithCRC, bufferRead, readLength - bufferRead); dataBuffer.put(compressedWithCRC); } } {code} If read function read nothing because the end of the stream has been reached, it will return -1, thus bufferRead can be negetive. In the next turn read function will throw IndexOutOfBoundsException because bufferRead is negetive. was: I was running repair command with moderate read and write load at the same time. And I found tens of IndexOutOfBoundsException in system log as follows: ERROR [Thread-6056] 2013-05-22 14:47:59,416 CassandraDaemon.java (line132) Exception in thread Thread[Thread-6056,5,main] java.lang.IndexOutOfBoundsException at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:75) at org.apache.cassandra.streaming.compress.CompressedInputStream$Reader.runMayThrow(CompressedInputStream.java:151) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at java.lang.Thread.run(Thread.java:662) I read the source code of CompressedInputStream.java and found there surely will throw IndexOutOfBoundsException in the following situation: {code:title=Bar.java|borderStyle=solid} // Part of CompressedInputStream.java start from Line 139 protected void runMayThrow() throws Exception { byte[] compressedWithCRC; while (chunks.hasNext()) { CompressionMetadata.Chunk chunk = chunks.next(); int readLength = chunk.length + 4; // read with CRC compressedWithCRC = new byte[readLength]; int bufferRead = 0; while (bufferRead readLength) bufferRead += source.read(compressedWithCRC, bufferRead, readLength - bufferRead); dataBuffer.put(compressedWithCRC); } } {code} If read function read nothing because the end of the stream has been reached, it will return -1, thus bufferRead can be negetive. In the next turn read function will throw IndexOutOfBoundsException because bufferRead is negetive. IndexOutOfBoundsException thrown during repair -- Key: CASSANDRA-7664 URL: https://issues.apache.org/jira/browse/CASSANDRA-7664 Project: Cassandra Issue Type: Bug Components: Core Environment: RHEL 6.1 Casandra 1.2.18 Reporter: ZhongYu I was running repair command with moderate read and write load at the same time. And I found tens of IndexOutOfBoundsException in system log as follows: ERROR [Thread-6056] 2013-05-22 14:47:59,416 CassandraDaemon.java (line132) Exception in thread Thread[Thread-6056,5,main] java.lang.IndexOutOfBoundsException at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:75) at org.apache.cassandra.streaming.compress.CompressedInputStream$Reader.runMayThrow(CompressedInputStream.java:151) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at java.lang.Thread.run(Thread.java:662) I read the source code of CompressedInputStream.java and found there surely will throw IndexOutOfBoundsException in the following situation: {code:title=CompressedInputStream.java|borderStyle=solid} // Part of CompressedInputStream.java start from Line
[jira] [Updated] (CASSANDRA-7664) IndexOutOfBoundsException thrown during repair
[ https://issues.apache.org/jira/browse/CASSANDRA-7664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ZhongYu updated CASSANDRA-7664: --- Description: I was running repair command with moderate read and write load at the same time. And I found tens of IndexOutOfBoundsException in system log as follows: ERROR [Thread-6056] 2013-05-22 14:47:59,416 CassandraDaemon.java (line132) Exception in thread Thread[Thread-6056,5,main] java.lang.IndexOutOfBoundsException at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:75) at org.apache.cassandra.streaming.compress.CompressedInputStream$Reader.runMayThrow(CompressedInputStream.java:151) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at java.lang.Thread.run(Thread.java:662) I read the source code of CompressedInputStream.java and found there surely will throw IndexOutOfBoundsException in the following situation: {code:title=CompressedInputStream.java|borderStyle=solid} // Part of CompressedInputStream.java start from Line 139 protected void runMayThrow() throws Exception { byte[] compressedWithCRC; while (chunks.hasNext()) { CompressionMetadata.Chunk chunk = chunks.next(); int readLength = chunk.length + 4; // read with CRC compressedWithCRC = new byte[readLength]; int bufferRead = 0; while (bufferRead readLength) bufferRead += source.read(compressedWithCRC, bufferRead, readLength - bufferRead); dataBuffer.put(compressedWithCRC); } } {code} If read function read nothing because the end of the stream has been reached, it will return -1, thus bufferRead can be negetive. In the next circle, read function will throw IndexOutOfBoundsException because bufferRead is negetive. was: I was running repair command with moderate read and write load at the same time. And I found tens of IndexOutOfBoundsException in system log as follows: ERROR [Thread-6056] 2013-05-22 14:47:59,416 CassandraDaemon.java (line132) Exception in thread Thread[Thread-6056,5,main] java.lang.IndexOutOfBoundsException at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:75) at org.apache.cassandra.streaming.compress.CompressedInputStream$Reader.runMayThrow(CompressedInputStream.java:151) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at java.lang.Thread.run(Thread.java:662) I read the source code of CompressedInputStream.java and found there surely will throw IndexOutOfBoundsException in the following situation: {code:title=CompressedInputStream.java|borderStyle=solid} // Part of CompressedInputStream.java start from Line 139 protected void runMayThrow() throws Exception { byte[] compressedWithCRC; while (chunks.hasNext()) { CompressionMetadata.Chunk chunk = chunks.next(); int readLength = chunk.length + 4; // read with CRC compressedWithCRC = new byte[readLength]; int bufferRead = 0; while (bufferRead readLength) bufferRead += source.read(compressedWithCRC, bufferRead, readLength - bufferRead); dataBuffer.put(compressedWithCRC); } } {code} If read function read nothing because the end of the stream has been reached, it will return -1, thus bufferRead can be negetive. In the next turn read function will throw IndexOutOfBoundsException because bufferRead is negetive. IndexOutOfBoundsException thrown during repair -- Key: CASSANDRA-7664 URL: https://issues.apache.org/jira/browse/CASSANDRA-7664 Project: Cassandra Issue Type: Bug Components: Core Environment: RHEL 6.1 Casandra 1.2.18 Reporter: ZhongYu I was running repair command with moderate read and write load at the same time. And I found tens of IndexOutOfBoundsException in system log as follows: ERROR [Thread-6056] 2013-05-22 14:47:59,416 CassandraDaemon.java (line132) Exception in thread Thread[Thread-6056,5,main] java.lang.IndexOutOfBoundsException at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:75) at org.apache.cassandra.streaming.compress.CompressedInputStream$Reader.runMayThrow(CompressedInputStream.java:151) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at java.lang.Thread.run(Thread.java:662) I read the source code of CompressedInputStream.java and found there surely will throw IndexOutOfBoundsException in the following situation: {code:title=CompressedInputStream.java|borderStyle=solid} // Part of
[jira] [Updated] (CASSANDRA-7664) IndexOutOfBoundsException thrown during repair
[ https://issues.apache.org/jira/browse/CASSANDRA-7664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ZhongYu updated CASSANDRA-7664: --- Description: I was running repair command with moderate read and write load at the same time. And I found tens of IndexOutOfBoundsException in system log as follows: ERROR [Thread-6056] 2013-05-22 14:47:59,416 CassandraDaemon.java (line132) Exception in thread Thread[Thread-6056,5,main] java.lang.IndexOutOfBoundsException at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:75) at org.apache.cassandra.streaming.compress.CompressedInputStream$Reader.runMayThrow(CompressedInputStream.java:151) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at java.lang.Thread.run(Thread.java:662) I read the source code of CompressedInputStream.java and found there surely will throw IndexOutOfBoundsException in the following situation: {code:title=CompressedInputStream.java|borderStyle=solid} // Part of CompressedInputStream.java start from Line 139 protected void runMayThrow() throws Exception { byte[] compressedWithCRC; while (chunks.hasNext()) { CompressionMetadata.Chunk chunk = chunks.next(); int readLength = chunk.length + 4; // read with CRC compressedWithCRC = new byte[readLength]; int bufferRead = 0; while (bufferRead readLength) bufferRead += source.read(compressedWithCRC, bufferRead, readLength - bufferRead); dataBuffer.put(compressedWithCRC); } } {code} If read function read nothing because the end of the stream has been reached, it will return -1, thus bufferRead can be negetive. In the next circle, read function will throw IndexOutOfBoundsException because bufferRead is negetive. was: I was running repair command with moderate read and write load at the same time. And I found tens of IndexOutOfBoundsException in system log as follows: ERROR [Thread-6056] 2013-05-22 14:47:59,416 CassandraDaemon.java (line132) Exception in thread Thread[Thread-6056,5,main] java.lang.IndexOutOfBoundsException at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:75) at org.apache.cassandra.streaming.compress.CompressedInputStream$Reader.runMayThrow(CompressedInputStream.java:151) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at java.lang.Thread.run(Thread.java:662) I read the source code of CompressedInputStream.java and found there surely will throw IndexOutOfBoundsException in the following situation: {code:title=CompressedInputStream.java|borderStyle=solid} // Part of CompressedInputStream.java start from Line 139 protected void runMayThrow() throws Exception { byte[] compressedWithCRC; while (chunks.hasNext()) { CompressionMetadata.Chunk chunk = chunks.next(); int readLength = chunk.length + 4; // read with CRC compressedWithCRC = new byte[readLength]; int bufferRead = 0; while (bufferRead readLength) bufferRead += source.read(compressedWithCRC, bufferRead, readLength - bufferRead); dataBuffer.put(compressedWithCRC); } } {code} If read function read nothing because the end of the stream has been reached, it will return -1, thus bufferRead can be negetive. In the next circle, read function will throw IndexOutOfBoundsException because bufferRead is negetive. IndexOutOfBoundsException thrown during repair -- Key: CASSANDRA-7664 URL: https://issues.apache.org/jira/browse/CASSANDRA-7664 Project: Cassandra Issue Type: Bug Components: Core Environment: RHEL 6.1 Casandra 1.2.18 Reporter: ZhongYu I was running repair command with moderate read and write load at the same time. And I found tens of IndexOutOfBoundsException in system log as follows: ERROR [Thread-6056] 2013-05-22 14:47:59,416 CassandraDaemon.java (line132) Exception in thread Thread[Thread-6056,5,main] java.lang.IndexOutOfBoundsException at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:75) at org.apache.cassandra.streaming.compress.CompressedInputStream$Reader.runMayThrow(CompressedInputStream.java:151) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at java.lang.Thread.run(Thread.java:662) I read the source code of CompressedInputStream.java and found there surely will throw IndexOutOfBoundsException in the following situation: {code:title=CompressedInputStream.java|borderStyle=solid} // Part of
[jira] [Updated] (CASSANDRA-7664) IndexOutOfBoundsException thrown during repair
[ https://issues.apache.org/jira/browse/CASSANDRA-7664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ZhongYu updated CASSANDRA-7664: --- Description: I was running repair command with moderate read and write load at the same time. And I found tens of IndexOutOfBoundsException in system log as follows: {quote} ERROR [Thread-6056] 2013-05-22 14:47:59,416 CassandraDaemon.java (line132) Exception in thread Thread[Thread-6056,5,main] java.lang.IndexOutOfBoundsException at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:75) at org.apache.cassandra.streaming.compress.CompressedInputStream$Reader.runMayThrow(CompressedInputStream.java:151) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at java.lang.Thread.run(Thread.java:662) {quote} I read the source code of CompressedInputStream.java and found there surely will throw IndexOutOfBoundsException in the following situation: {code:title=CompressedInputStream.java|borderStyle=solid} // Part of CompressedInputStream.java start from Line 139 protected void runMayThrow() throws Exception { byte[] compressedWithCRC; while (chunks.hasNext()) { CompressionMetadata.Chunk chunk = chunks.next(); int readLength = chunk.length + 4; // read with CRC compressedWithCRC = new byte[readLength]; int bufferRead = 0; while (bufferRead readLength) bufferRead += source.read(compressedWithCRC, bufferRead, readLength - bufferRead); dataBuffer.put(compressedWithCRC); } } {code} If read function read nothing because the end of the stream has been reached, it will return -1, thus bufferRead can be negetive. In the next circle, read function will throw IndexOutOfBoundsException because bufferRead is negetive. was: I was running repair command with moderate read and write load at the same time. And I found tens of IndexOutOfBoundsException in system log as follows: ERROR [Thread-6056] 2013-05-22 14:47:59,416 CassandraDaemon.java (line132) Exception in thread Thread[Thread-6056,5,main] java.lang.IndexOutOfBoundsException at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:75) at org.apache.cassandra.streaming.compress.CompressedInputStream$Reader.runMayThrow(CompressedInputStream.java:151) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at java.lang.Thread.run(Thread.java:662) I read the source code of CompressedInputStream.java and found there surely will throw IndexOutOfBoundsException in the following situation: {code:title=CompressedInputStream.java|borderStyle=solid} // Part of CompressedInputStream.java start from Line 139 protected void runMayThrow() throws Exception { byte[] compressedWithCRC; while (chunks.hasNext()) { CompressionMetadata.Chunk chunk = chunks.next(); int readLength = chunk.length + 4; // read with CRC compressedWithCRC = new byte[readLength]; int bufferRead = 0; while (bufferRead readLength) bufferRead += source.read(compressedWithCRC, bufferRead, readLength - bufferRead); dataBuffer.put(compressedWithCRC); } } {code} If read function read nothing because the end of the stream has been reached, it will return -1, thus bufferRead can be negetive. In the next circle, read function will throw IndexOutOfBoundsException because bufferRead is negetive. IndexOutOfBoundsException thrown during repair -- Key: CASSANDRA-7664 URL: https://issues.apache.org/jira/browse/CASSANDRA-7664 Project: Cassandra Issue Type: Bug Components: Core Environment: RHEL 6.1 Casandra 1.2.18 Reporter: ZhongYu I was running repair command with moderate read and write load at the same time. And I found tens of IndexOutOfBoundsException in system log as follows: {quote} ERROR [Thread-6056] 2013-05-22 14:47:59,416 CassandraDaemon.java (line132) Exception in thread Thread[Thread-6056,5,main] java.lang.IndexOutOfBoundsException at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:75) at org.apache.cassandra.streaming.compress.CompressedInputStream$Reader.runMayThrow(CompressedInputStream.java:151) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at java.lang.Thread.run(Thread.java:662) {quote} I read the source code of CompressedInputStream.java and found there surely will throw IndexOutOfBoundsException in the following situation:
[jira] [Updated] (CASSANDRA-7664) IndexOutOfBoundsException thrown during repair
[ https://issues.apache.org/jira/browse/CASSANDRA-7664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ZhongYu updated CASSANDRA-7664: --- Environment: RHEL 6.1 Casandra 1.2.3 was: RHEL 6.1 Casandra 1.2.18 IndexOutOfBoundsException thrown during repair -- Key: CASSANDRA-7664 URL: https://issues.apache.org/jira/browse/CASSANDRA-7664 Project: Cassandra Issue Type: Bug Components: Core Environment: RHEL 6.1 Casandra 1.2.3 Reporter: ZhongYu I was running repair command with moderate read and write load at the same time. And I found tens of IndexOutOfBoundsException in system log as follows: {quote} ERROR [Thread-6056] 2013-05-22 14:47:59,416 CassandraDaemon.java (line132) Exception in thread Thread[Thread-6056,5,main] java.lang.IndexOutOfBoundsException at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:75) at org.apache.cassandra.streaming.compress.CompressedInputStream$Reader.runMayThrow(CompressedInputStream.java:151) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at java.lang.Thread.run(Thread.java:662) {quote} I read the source code of CompressedInputStream.java and found there surely will throw IndexOutOfBoundsException in the following situation: {code:title=CompressedInputStream.java|borderStyle=solid} // Part of CompressedInputStream.java start from Line 139 protected void runMayThrow() throws Exception { byte[] compressedWithCRC; while (chunks.hasNext()) { CompressionMetadata.Chunk chunk = chunks.next(); int readLength = chunk.length + 4; // read with CRC compressedWithCRC = new byte[readLength]; int bufferRead = 0; while (bufferRead readLength) bufferRead += source.read(compressedWithCRC, bufferRead, readLength - bufferRead); dataBuffer.put(compressedWithCRC); } } {code} If read function read nothing because the end of the stream has been reached, it will return -1, thus bufferRead can be negetive. In the next circle, read function will throw IndexOutOfBoundsException because bufferRead is negetive. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-7664) IndexOutOfBoundsException thrown during repair
[ https://issues.apache.org/jira/browse/CASSANDRA-7664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ZhongYu updated CASSANDRA-7664: --- Environment: RHEL 6.1 Casandra 1.2.3 - 1.2.18 was: RHEL 6.1 Casandra 1.2.3 IndexOutOfBoundsException thrown during repair -- Key: CASSANDRA-7664 URL: https://issues.apache.org/jira/browse/CASSANDRA-7664 Project: Cassandra Issue Type: Bug Components: Core Environment: RHEL 6.1 Casandra 1.2.3 - 1.2.18 Reporter: ZhongYu I was running repair command with moderate read and write load at the same time. And I found tens of IndexOutOfBoundsException in system log as follows: {quote} ERROR [Thread-6056] 2013-05-22 14:47:59,416 CassandraDaemon.java (line132) Exception in thread Thread[Thread-6056,5,main] java.lang.IndexOutOfBoundsException at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:75) at org.apache.cassandra.streaming.compress.CompressedInputStream$Reader.runMayThrow(CompressedInputStream.java:151) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at java.lang.Thread.run(Thread.java:662) {quote} I read the source code of CompressedInputStream.java and found there surely will throw IndexOutOfBoundsException in the following situation: {code:title=CompressedInputStream.java|borderStyle=solid} // Part of CompressedInputStream.java start from Line 139 protected void runMayThrow() throws Exception { byte[] compressedWithCRC; while (chunks.hasNext()) { CompressionMetadata.Chunk chunk = chunks.next(); int readLength = chunk.length + 4; // read with CRC compressedWithCRC = new byte[readLength]; int bufferRead = 0; while (bufferRead readLength) bufferRead += source.read(compressedWithCRC, bufferRead, readLength - bufferRead); dataBuffer.put(compressedWithCRC); } } {code} If read function read nothing because the end of the stream has been reached, it will return -1, thus bufferRead can be negetive. In the next circle, read function will throw IndexOutOfBoundsException because bufferRead is negetive. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-7664) IndexOutOfBoundsException thrown during repair
[ https://issues.apache.org/jira/browse/CASSANDRA-7664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] xiangdong Huang updated CASSANDRA-7664: --- Attachment: $O[TOX~GGUZRW~IHPYPEG{0.jpg I got the same problem. Firstly, I use nodetool repair command to repair the consistency. second, I shutdown Cassandra ignore the repairation is running. thirdly, I restart Cassandra and minites later, I find erro logs . IndexOutOfBoundsException thrown during repair -- Key: CASSANDRA-7664 URL: https://issues.apache.org/jira/browse/CASSANDRA-7664 Project: Cassandra Issue Type: Bug Components: Core Environment: RHEL 6.1 Casandra 1.2.3 - 1.2.18 Reporter: ZhongYu Attachments: $O[TOX~GGUZRW~IHPYPEG{0.jpg I was running repair command with moderate read and write load at the same time. And I found tens of IndexOutOfBoundsException in system log as follows: {quote} ERROR [Thread-6056] 2013-05-22 14:47:59,416 CassandraDaemon.java (line132) Exception in thread Thread[Thread-6056,5,main] java.lang.IndexOutOfBoundsException at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:75) at org.apache.cassandra.streaming.compress.CompressedInputStream$Reader.runMayThrow(CompressedInputStream.java:151) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at java.lang.Thread.run(Thread.java:662) {quote} I read the source code of CompressedInputStream.java and found there surely will throw IndexOutOfBoundsException in the following situation: {code:title=CompressedInputStream.java|borderStyle=solid} // Part of CompressedInputStream.java start from Line 139 protected void runMayThrow() throws Exception { byte[] compressedWithCRC; while (chunks.hasNext()) { CompressionMetadata.Chunk chunk = chunks.next(); int readLength = chunk.length + 4; // read with CRC compressedWithCRC = new byte[readLength]; int bufferRead = 0; while (bufferRead readLength) bufferRead += source.read(compressedWithCRC, bufferRead, readLength - bufferRead); dataBuffer.put(compressedWithCRC); } } {code} If read function read nothing because the end of the stream has been reached, it will return -1, thus bufferRead can be negetive. In the next circle, read function will throw IndexOutOfBoundsException because bufferRead is negetive. -- This message was sent by Atlassian JIRA (v6.2#6252)