db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SBarb...@ILSTechnology.com
Subject 'Invalid checksum on Page' error
Date Wed, 07 Sep 2005 14:50:41 GMT

Hi,
        I have apache derby 10.0 running on a MontaVista Linux system (3.1
Professional with Linux/i686 2.4.20)  in embedded mode using the
EmbeddedConnectionPoolDataSource.
The java level is Sun's jre 1.4.2_04.
There are around 3.5 million records in a table in the DB.
While adding the records I had  one thread inserting rows into this table
at a rate of around 50 msecs.
Another thread is periodically doing selects on this table and some
deletes.

When the record count was building up to 3.5 million , no deletes were
being done on the table.
I have the transaction log and db temp space in a different directory.

When a thread attempts to delete a record from the table , it catches a
SQLException with the following error message

 SQLError:0              SQLState:XJ001           SQLErrMsg:Java exception:
': java.lang.NullPointerException'.


The derby.log file (at the end of this posting )  indicates an invalid
checksum on a page . I have only included the first few lines.
This may have occurred when i was selecting data from the database.

If I restart the application, I sometimes get the same SQLException on the
thread that is inserting data , after a few succesful inserts.

When I run the command line client (ij), I am able to select and delete
records from this database.

What would typically cause a checksum error to occur ? Is there a way to
recover from it without losing data ?


====================  Begin derby.log
========================================================================
------------  BEGIN SHUTDOWN ERROR STACK -------------

ERROR XSDG2: Invalid checksum on Page Page(10031,Container(0, 800)),
expected=3,
558,849,496, on-disk version=772,832,532, page dump follows: Hex dump:
00000000: 0075 0000 0001 0000 0000 0000 003d 003c  .u..............
00000010: 0000 0042 0000 0000 0000 0000 0000 0000  ...B............


The trailing stack trace is as follows:

        at
org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
        at
org.apache.derby.impl.store.raw.data.StoredPage.validateChecksum(Unknown
Source)
        at
org.apache.derby.impl.store.raw.data.StoredPage.initFromData(UnknownSource)
        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.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.conglomerate.OpenConglomerate.latchPage(Unknown
 Source)
        at
org.apache.derby.impl.store.access.conglomerate.GenericConglomerateController.fetch(Unknown
 Source)
        at
org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet.getNextRowCore(Unknown
 Source)
        at
org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getNextRow(Unknown
 Source)
        at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown
Source)
        at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)
       ......

------------  END SHUTDOWN ERROR STACK -------------

2005-09-07 13:54:01.041 GMT Thread[Thread-2,5,main] (XID = 2985973),
(SESSIONID= 1), (DATABASE = /xqjava/db/SAF), (DRDAID = null), Cleanup
action starting
2005-09-07 13:54:01.042 GMT Thread[Thread-2,5,main] (XID = 2985973),
(SESSIONID= 1), (DATABASE = /xqjava/db/SAF), (DRDAID = null), Failed
Statement is: INSERT
INTO  messages_1 ( msg_id, msg_timestamp, msg) VALUES (?,?,?)
java.lang.NullPointerException
        at
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown
 Source)
        at
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown
 Source)
        at org.apache.derby.impl.store.raw.xact.Xact.openContainer(Unknown
Source)
        at
org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.init(Unknown
 Source)
        at org.apache.derby.impl.store.access.heap.Heap.open(Unknown
Source)
        at
org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(Unknown
Source)
        at
org.apache.derby.impl.store.access.RAMTransaction.openCompiledConglomerate(Unknown
 Source)
        at
org.apache.derby.impl.sql.execute.RowChangerImpl.openForUpdate(Unknown
Source)
        at org.apache.derby.impl.sql.execute.RowChangerImpl.open(Unknown
Source)
        at
org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown
Source)
        at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown
Source)
        at
org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
        at
org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
        at
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown
Source)
        at
org.apache.derby.impl.jdbc.EmbedCallableStatement.executeStatement(Unknown
Source)
        at
org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source)
........
Cleanup action completed

==================== derby.log
========================================================================


Thanks in advance.
Sunil.








Mime
View raw message