db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4139) error on sql when upgrading database from 10.2.2 to 10.4.1.3
Date Fri, 03 Apr 2009 07:22:12 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695273#action_12695273
] 

Knut Anders Hatlen commented on DERBY-4139:
-------------------------------------------

Between 10.2 and 10.3 we switched to Java NIO. One possibility is that there's a problem with
Java NIO on your platform. The error message of the IOException talks about incorrect value
for an argument, but the way I read the javadoc for FileChannel.read() incorrect arguments
should be exposed in other ways than the one described (negative position should give IllegalArgumentException,
too high position means 0 bytes should be read), so my guess at this point is that it's more
likely a JVM bug than a Derby bug.

For completeness, could you post the output from "java -version"? Thanks.

> error on sql when upgrading database from 10.2.2 to 10.4.1.3
> ------------------------------------------------------------
>
>                 Key: DERBY-4139
>                 URL: https://issues.apache.org/jira/browse/DERBY-4139
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.1.3
>         Environment: AS400 V5R3
>            Reporter: Trung Tran
>
> I upgraded a 10.2.2 database to 10.4.1.3 on the AS400 V5R3 and when I try to access a
large table, derby throws this error.
> select max(column) from table;
> ERROR XSDG0: Page Page(86673,Container(0, 4432)) could not be read from disk.       
                                        
> ERROR XJ001: Java exception: 'The value specified for the argument is not correct. Read/write
failed: java.io.IOException'.  
> In derby.log
> ERROR XSDG0: Page Page(86673,Container(0, 4432)) could not be read from disk.
> 	at java.lang.Throwable.<init>(Throwable.java:195)
> 	at java.lang.Exception.<init>(Exception.java:41)
> 	at org.apache.derby.iapi.error.StandardException.<init>(Unknown Source)
> 	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.CachedPage.readPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(Unknown Source)
> 	at org.apache.derby.impl.services.cache.CachedItem.takeOnIdentity(Unknown Source)
> 	at org.apache.derby.impl.services.cache.Clock.addEntry(Unknown Source)
> 	at org.apache.derby.impl.services.cache.Clock.find(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.FileContainer.getAllocPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.BaseContainer.getAllocPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.BaseContainerHandle.getAllocPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.AllocationCache.validate(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.AllocationCache.getLastPageNumber(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.FileContainer.pageValid(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.FileContainer.getUserPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.FileContainer.getPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.BaseContainerHandle.getPage(Unknown Source)
> 	at org.apache.derby.impl.store.access.heap.HeapConglomerateFactory.readConglomerate(Unknown
Source)
> 	at org.apache.derby.impl.store.access.RAMAccessManager.conglomCacheFind(Unknown Source)
> 	at org.apache.derby.impl.store.access.RAMTransaction.findExistingConglomerate(Unknown
Source)
> 	at org.apache.derby.impl.store.access.RAMTransaction.openStoreCost(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.CompilerContextImpl.getStoreCostController(Unknown
Source)
> 	at org.apache.derby.impl.sql.compile.FromBaseTable.getStoreCostController(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.FromBaseTable.estimateCost(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.estimateTotalCost(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costBasedCostOptimizable(Unknown
Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costOptimizable(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.FromBaseTable.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.DMLStatementNode.optimizeStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.CursorNode.optimizeStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
> 	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown
Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Caused by: java.io.IOException: The value specified for the argument is not correct.
Read/write failed
> 	at java.lang.Throwable.<init>(Throwable.java:195)
> 	at java.lang.Exception.<init>(Exception.java:41)
> 	at java.io.IOException.<init>(IOException.java:40)
> 	at sun.nio.ch.FileDispatcher.pread0(Native Method)
> 	at sun.nio.ch.FileDispatcher.pread(FileDispatcher.java:60)
> 	at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:230)
> 	at sun.nio.ch.IOUtil.read(IOUtil.java:206)
> 	at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:617)
> 	at org.apache.derby.impl.store.raw.data.RAFContainer4.readFull(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.RAFContainer4.readPage0(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.RAFContainer4.readPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.CachedPage.readPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(Unknown Source)
> 	at org.apache.derby.impl.services.cache.CachedItem.takeOnIdentity(Unknown Source)
> 	at org.apache.derby.impl.services.cache.Clock.addEntry(Unknown Source)
> 	at org.apache.derby.impl.services.cache.Clock.find(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.FileContainer.getAllocPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.BaseContainer.getAllocPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.BaseContainerHandle.getAllocPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.AllocationCache.validate(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.AllocationCache.getLastPageNumber(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.FileContainer.pageValid(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.FileContainer.getUserPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.FileContainer.getPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.BaseContainerHandle.getPage(Unknown Source)
> 	at org.apache.derby.impl.store.access.heap.HeapConglomerateFactory.readConglomerate(Unknown
Source)
> 	at org.apache.derby.impl.store.access.RAMAccessManager.conglomCacheFind(Unknown Source)
> 	at org.apache.derby.impl.store.access.RAMTransaction.findExistingConglomerate(Unknown
Source)
> 	at org.apache.derby.impl.store.access.RAMTransaction.openStoreCost(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.CompilerContextImpl.getStoreCostController(Unknown
Source)
> 	at org.apache.derby.impl.sql.compile.FromBaseTable.getStoreCostController(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.FromBaseTable.estimateCost(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.estimateTotalCost(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costBasedCostOptimizable(Unknown
Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costOptimizable(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.FromBaseTable.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.DMLStatementNode.optimizeStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.CursorNode.optimizeStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
> 	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown
Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> ============= begin nested exception, level (1) ===========
> java.io.IOException: The value specified for the argument is not correct. Read/write
failed
> 	at java.lang.Throwable.<init>(Throwable.java:195)
> 	at java.lang.Exception.<init>(Exception.java:41)
> 	at java.io.IOException.<init>(IOException.java:40)
> 	at sun.nio.ch.FileDispatcher.pread0(Native Method)
> 	at sun.nio.ch.FileDispatcher.pread(FileDispatcher.java:60)
> 	at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:230)
> 	at sun.nio.ch.IOUtil.read(IOUtil.java:206)
> 	at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:617)
> 	at org.apache.derby.impl.store.raw.data.RAFContainer4.readFull(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.RAFContainer4.readPage0(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.RAFContainer4.readPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.CachedPage.readPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(Unknown Source)
> 	at org.apache.derby.impl.services.cache.CachedItem.takeOnIdentity(Unknown Source)
> 	at org.apache.derby.impl.services.cache.Clock.addEntry(Unknown Source)
> 	at org.apache.derby.impl.services.cache.Clock.find(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.FileContainer.getAllocPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.BaseContainer.getAllocPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.BaseContainerHandle.getAllocPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.AllocationCache.validate(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.AllocationCache.getLastPageNumber(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.FileContainer.pageValid(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.FileContainer.getUserPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.FileContainer.getPage(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.BaseContainerHandle.getPage(Unknown Source)
> 	at org.apache.derby.impl.store.access.heap.HeapConglomerateFactory.readConglomerate(Unknown
Source)
> 	at org.apache.derby.impl.store.access.RAMAccessManager.conglomCacheFind(Unknown Source)
> 	at org.apache.derby.impl.store.access.RAMTransaction.findExistingConglomerate(Unknown
Source)
> 	at org.apache.derby.impl.store.access.RAMTransaction.openStoreCost(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.CompilerContextImpl.getStoreCostController(Unknown
Source)
> 	at org.apache.derby.impl.sql.compile.FromBaseTable.getStoreCostController(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.FromBaseTable.estimateCost(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.estimateTotalCost(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costBasedCostOptimizable(Unknown
Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costOptimizable(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.FromBaseTable.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.DMLStatementNode.optimizeStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.CursorNode.optimizeStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
> 	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown
Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> ============= end nested exception, level (1) ===========
> I noticed that one of the datafile is over 8 GB.  Does the newer version of derby have
a problem with large files?  I will try 10.4.2.0 to see if the same problem exists.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message