Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9F77F10194 for ; Thu, 29 May 2014 20:49:03 +0000 (UTC) Received: (qmail 50544 invoked by uid 500); 29 May 2014 20:49:02 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 50477 invoked by uid 500); 29 May 2014 20:49:02 -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 50407 invoked by uid 99); 29 May 2014 20:49:02 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 May 2014 20:49:02 +0000 Date: Thu, 29 May 2014 20:49:02 +0000 (UTC) From: "Myrna van Lunteren (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DERBY-6504) change AllocPage.ReadContainerInfo to catch ArrayIndexOutOfBoundsException and turn it into Derby error. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-6504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14012878#comment-14012878 ] Myrna van Lunteren commented on DERBY-6504: ------------------------------------------- The output was from a junit test wrapping around an old sql test; I ran a modified version of StoreScriptsTest with only the sql Rllmodule active. Without the exception in the NewException() call, the XSDG4 error shows up in the errorStackTrace.out and derby.log. With the Exception repeated in the NewException() call, I only get an ArrayIndexOutOfBoundsException, as if the catch is doing nothing... I note that most of the error conditions in AllocPage are wrapping the newException in a markCorrupt call, but that didn't seem to make a difference... Maybe it's because of the artificial way I am forcing an ArrayIndexOutOfBoundsException. I'll do some further research. > change AllocPage.ReadContainerInfo to catch ArrayIndexOutOfBoundsException and turn it into Derby error. > -------------------------------------------------------------------------------------------------------- > > Key: DERBY-6504 > URL: https://issues.apache.org/jira/browse/DERBY-6504 > Project: Derby > Issue Type: Bug > Components: Store > Affects Versions: 10.6.1.0, 10.8.2.2 > Reporter: Mike Matrigali > Assignee: Myrna van Lunteren > Attachments: DERBY-6504.diff > > > Users have reported databases that will not boot with stack traces showing: > Caused by: java.lang.ArrayIndexOutOfBoundsException > at java.lang.System.arraycopy(Native Method) > at org.apache.derby.impl.store.raw.data.AllocPage.ReadContainerInfo(Unknown Source) > at org.apache.derby.impl.store.raw.data.FileContainer.readHeader(Unknown Source) > I suggest the code be changed to catch the out of bounds and turn it > into a StandardException and include as much runtime information as > possible so that the underlying problem can be diagnosed. Information > should include sizes of both arrays, the amount of data being copied ("N"), > and possibly a hex dump of the source array. -- This message was sent by Atlassian JIRA (v6.2#6252)