Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 61464 invoked from network); 7 Aug 2009 20:37:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Aug 2009 20:37:37 -0000 Received: (qmail 60109 invoked by uid 500); 7 Aug 2009 20:37:43 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 60023 invoked by uid 500); 7 Aug 2009 20:37:43 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 59983 invoked by uid 99); 7 Aug 2009 20:37:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Aug 2009 20:37:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Aug 2009 20:37:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 04A1029A0017 for ; Fri, 7 Aug 2009 13:37:15 -0700 (PDT) Message-ID: <1305225242.1249677435018.JavaMail.jira@brutus> Date: Fri, 7 Aug 2009 13:37:15 -0700 (PDT) From: "Kathey Marsden (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-3811) ArrayIndexOutOfBoundsException in BasePage.getHeaderAtSlot accessing modified Clob with READ_UNCOMMITTED isolation In-Reply-To: <1506765339.1217603194061.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740715#action_12740715 ] Kathey Marsden commented on DERBY-3811: --------------------------------------- I am sorry but I cannot post the corrupt database, but I do have access to it. If there are any debugging steps you can walk me through, I would be more than happy to try. > ArrayIndexOutOfBoundsException in BasePage.getHeaderAtSlot accessing modified Clob with READ_UNCOMMITTED isolation > ------------------------------------------------------------------------------------------------------------------ > > Key: DERBY-3811 > URL: https://issues.apache.org/jira/browse/DERBY-3811 > Project: Derby > Issue Type: Bug > Components: Store > Affects Versions: 10.5.1.1 > Reporter: Kristian Waagan > Attachments: ClobStabilityTest.java > > > The attached Java program does the following, using two concurrent threads for the last part. > a) Inserts a 1 MB Clob. > b) UpdateThread changes the Clob to a 0.5 MB Clob, then sleeps for 5 seconds before it performs a rollback. > c) SelectThread selects the Clob and calls Clob.length(). > Both threads/connections run with READ_UNCOMMITTED isolation and with autocommit off. > Running the attached Java program results in the following exception: > 1217602873292 :: Using isolation level READ_UNCOMMITTED (1) > 1217602873341 :: <> Starting update. > 1217602873649 :: <> Update completed! > 1217602875305 :: <> Executing select query... > 1217602875328 :: <> Getting Clob object... > java.sql.SQLException: Java exception: '-1: java.lang.ArrayIndexOutOfBoundsException'. > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:95) > at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:87) > at org.apache.derby.impl.jdbc.Util.javaException(Util.java:244) > at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403) > at org.apache.derby.impl.jdbc.EmbedResultSet.noStateChangeException(EmbedResultSet.java:4386) > at org.apache.derby.impl.jdbc.StoreStreamClob.noStateChangeLOB(StoreStreamClob.java:292) > at org.apache.derby.impl.jdbc.StoreStreamClob.getCharLength(StoreStreamClob.java:170) > at org.apache.derby.impl.jdbc.EmbedClob.length(EmbedClob.java:175) > at ClobStabilityTest$SelectThread.myRun(ClobStabilityTest.java:102) > at ClobStabilityTest$SelectThread.run(ClobStabilityTest.java:87) > at java.lang.Thread.run(Thread.java:619) > Caused by: java.sql.SQLException: Java exception: '-1: java.lang.ArrayIndexOutOfBoundsException'. > at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45) > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:119) > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:70) > ... 10 more > Caused by: java.lang.ArrayIndexOutOfBoundsException: -1 > at org.apache.derby.impl.store.raw.data.BasePage.getHeaderAtSlot(BasePage.java:1794) > at org.apache.derby.impl.store.raw.data.StoredPage.restorePortionLongColumn(StoredPage.java:5816) > at org.apache.derby.impl.store.raw.data.OverflowInputStream.fillByteHolder(OverflowInputStream.java:151) > at org.apache.derby.impl.store.raw.data.BufferedByteHolderInputStream.read(BufferedByteHolderInputStream.java:44) > at java.io.DataInputStream.read(DataInputStream.java:132) > at org.apache.derby.impl.jdbc.PositionedStoreStream.read(PositionedStoreStream.java:106) > at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) > at java.io.BufferedInputStream.read(BufferedInputStream.java:237) > at org.apache.derby.iapi.util.UTF8Util.internalSkip(UTF8Util.java:111) > at org.apache.derby.iapi.util.UTF8Util.skipUntilEOF(UTF8Util.java:59) > at org.apache.derby.impl.jdbc.StoreStreamClob.getCharLength(StoreStreamClob.java:167) > ... 4 more > 1217602878848 :: <> Rolling back! > Is the Java program valid, and should this work? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.