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

Mike Matrigali commented on DERBY-5739:
---------------------------------------

the problem has happened in the past, and now will continue no matter where you 
copy the database. So would say that this bug is
particular to the linux system.  What kind of filesystem/disk was it on when 
the power outage/clold shutdown happened.  

checksum is the procedure that derby uses to insure that a full page is written 
to disk.  This looks like a 32k size page in a base table.  Derby
calculates and writes a checksum to the page to make sure the whole page is 
correctly written to disk.  In this case it looks like it was not.  
The only supported recovery at this point is to recover from backup.  If the 
filesystem/device breaks up a 32k write into multiple writes of smaller
size (ie. 2k filesystem) and system crashes half way between writing all of 
these then derby has no way to know what part of the page is 
correct.  

A problem on page 0 is particularly hard to recover from as it has metadata 
info about the rest of the table.  Page 0 is a little suspicious, especially
if you have more than one db getting the problem.  JVM info for the original 
crash machine might help.  

Do your other customers all have checksum errors?  Are they all on page 0?
                
> database will not boot, encountering a checksum error on one of the pages
> -------------------------------------------------------------------------
>
>                 Key: DERBY-5739
>                 URL: https://issues.apache.org/jira/browse/DERBY-5739
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.6.1.0
>         Environment: Windows 7 and Ubuntu Linux
>            Reporter: Arunagiri
>         Attachments: derby.log
>
>
> Cannot able to connect database.
> ------------  BEGIN SHUTDOWN ERROR STACK -------------
> ERROR XSDG2: Invalid checksum on Page Page(0,Container(0, 1424)), 
> expected=3,663,358,272, on-disk version=2,621,194,794, page dump follows: Hex 
> dump:
> 00000000: 0076 0000 0001 0000 0000 0000 004d 0000  .v...........M..
> 00000010: 0000 0006 0000 0000 0000 0000 0000 0000  ................
> 00000020: 0000 0000 0001 0000 ccfd 3287 0000 0000  ........ᅩ.2ヌ....
> 00000030: 0000 0000 0000 0000 0000 0000 ffff ffff  ................
> 00000040: ffff ffff 0000 0000 0000 0000 0000 0000  ................
> 00000050: 0000 0000 0000 0000 0000 0000 0000 0000  ................
> 00000060: 0000 0000 0000 0000 0000 0000 5000 0000  ............P...
> 00000070: 0000 0000 0000 0000 0000 0000 0000 0000  ................
> 00000080: 0000 0000 0000 0000 0000 0000 0000 0000  ................
> 00000090: 0000 0000 0000 0000 0000 0000 0000 0000  ................
> 000000a0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
> 000000b0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
> 000000c0: 0000 0080 0000 0000 0000 0000 0100 0000  ...タ............
> 000000d0: 0000 0152 9000 0000 4c30 0000 0000 0000  ...Rミ...L0......
> 000000e0: 5000 0000 0000 0000 0000 0000 0000 0000  P...............
> 000000f0: 0000 0000 0000 0000 5000 0000 0000 0000  ........P.......
> 00000100: 0000 0000 0000 5000 0000 0000 0000 0000  ......P.........
> 00000110: 0000 0000 0000 0000 0000 0000 0000 0000  ................
> 00000120: 0000 0000 0000 0000 0000 0000 0000 0000  ................
> and the trace ends with 
> 00007fc0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
> 00007fd0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
> 00007fe0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
> 00007ff0: 0000 0000 0000 0000 0000 0000 9c3c 422a  ............ワ.B.
>       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(Unknown 
> Source)
>       at org.apache.derby.impl.store.raw.data.AllocPage.initFromData(Unknown 
> Source)
>       at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(Unknown 
> Source)
>       at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(Unknown 
> Source)
>       at org.apache.derby.impl.services.cache.ConcurrentCache.find(Unknown 
> Source)
>       at 
> org.apache.derby.impl.store.raw.data.FileContainer.getAnyPage(Unknown Source)
>       at 
> org.apache.derby.impl.store.raw.data.BaseContainer.getAnyPage(Unknown Source)
>       at 
> org.apache.derby.impl.store.raw.data.BaseContainerHandle.getAnyPage(Unknown 
> Source)
>       at 
> org.apache.derby.impl.store.raw.data.PageBasicOperation.findpage(Unknown 
> Source)
>       at 
> org.apache.derby.impl.store.raw.data.PageBasicOperation.needsRedo(Unknown 
> Source)
>       at org.apache.derby.impl.store.raw.log.FileLogger.redo(Unknown Source)
>       at org.apache.derby.impl.store.raw.log.LogToFile.recover(Unknown Source)
>       at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source)
>       at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown 
> Source)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to