db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Matrigali (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-4894) Database corrupt with ERROR XSDB0: Unexpected exception on in-memory page Page(103,Container(0, 1137))
Date Tue, 09 Nov 2010 18:59:11 GMT

     [ https://issues.apache.org/jira/browse/DERBY-4894?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mike Matrigali updated DERBY-4894:
----------------------------------


I looked at the db and found that there is actually a checksum error on that page.  The current
code loads and verifies the page header and the slot table before checking the checksum and
gets errors in those before the checksum check which is then never reached.

Here is a dump of the page with the user data removed.  On first look it looks like the top
and bottom of the page are good but not the middle.  Definitely the 0's cutting off the data

at the top looks wrong.  The page version of the page from disk is 440 which matches up 
with the last log entry for the page which logged change number 439 to the page.

May be interesting to get more information about the disk hardware and file systems from the

user.  Do they have write cache enabled?  What is block size on filesystem/hardware.  Any
errors other than out of disk space on disk.  I am trying to come up with scenario's where
out
of disk space could result in this.  I think I could believe this could come from a system
crash on some filesystems where the OS has taken our 32k write and ordered it into multiple
I/O's and only the top part of the page got written and the bottom was old.  This is the kind
of thing that
checksum is there to catch.  I have been trying to figure out if an out of disk space would
cause this but don't know.  The page is in the middle of the file and should have been
all allocated on disk so i/o to it should never cause out of disk.  Maybe some compressing
 file system where a write that changes a block from all 0's to something else requires more
disk space?

============= begin nested exception, level (3) ===========^M
ERROR XSDG2: Invalid checksum on Page Page(103,Container(0, 1137)), expected=996
,966,733, on-disk version=2,106,965,967, page dump follows: Hex dump:
00000000: 0075 0000 0001 0000 0000 0000 01b8 00b2  .u...........?.?
00000010: 0000 0139 0000 0000 0000 0000 0000 0000  ...9............
00000020: 0000 0000 0001 0000 0000 0000 0000 0000  ................
00000030: 0000 0000 0000 0000 0000 0000 0006 0700  ................
00000040: 0200 8500 0800 0000 0000 0000 3500 0800  ..?.........5...
00000050: 0000 0000 0000 f800 0800 0000 0000 0000  ................
00000060: de00 0800 0000 0000 0000 0000 0800 0000  ................
00000070: 0000 0000 0001 0007 0200 4069 0067 2f6f  ...........i.g.o
... user private data that I can't post but looks valid to me
... until this last line of data.  This is a btree so there should
... be a record id after the data but it looks like either 0's have
... overwritten it starting at 00005000 or they never got written.
... The 0's start is suspiciously on a 4k boundary.
00004ff0: 772f 7365 6172 6368 626f 6f6b 2e68 746d  w.searchbook.htm
00005000: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00005010: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00005020: 0000 0000 0000 0000 0000 0000 0000 0000  ................
...  all ZERO's in the file until ...
00007c10: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00007c20: 0000 0000 0000 0000 0000 0000 3c85 006e  .............?.n
00007c30: 0000 399b 007e 0000 35aa 007f 0000 3b98  ..9?....5?.....?
00007c40: 0080 0000 2d00 007f 0000 371e 007d 0000  .?........7.....
00007c50: 3a19 0075 0000 36ae 0070 0000 31e7 006a  ...u..6?.p..1..j
00007c60: 0000 3629 0085 0000 3b14 0084 0000 3a8e  ..6..?.....?...?
00007c70: 0086 0000 4228 0086 0000 305f 008a 0000  .?..B..?..0..?..
00007c80: 3431 0086 0000 30e9 0085 0000 2f63 0084  41.?..0..?...c.?
00007c90: 0000 4335 007a 0000 40d7 0077 0000 3c18  ..C5.z...?.w....
00007ca0: 006d 0000 3897 007c 0000 41ba 006e 0000  .m..8?....A?.n..
00007cb0: 3251 0079 0000 414e 006c 0000 3cf3 0086  2Q.y..AN.l.....?
00007cc0: 0000 379b 008a 0000 3df5 007a 0000 2e07  ..7?.?.....z....
00007cd0: 0077 0000 3f56 006d 0000 43af 007c 0000  .w...V.m..C?....
00007ce0: 33c3 006e 0000 4050 0087 0000 3e6f 007c  3?.n...P.?...o..
00007cf0: 0000 316e 0079 0000 2c92 006e 0000 3913  ..1n.y...?.n..9.
00007d00: 0088 0000 2d7f 0088 0000 42ae 0087 0000  .?.....?..B?.?..
00007d10: 44ac 0087 0000 3fc3 008d 0000 34b7 0088  D?.?...?.?..4?.?
00007d20: 0000 3d79 007c 0000 2fe7 0078 0000 2e7e  ...y.......x....
00007d30: 006e 0000 32ca 0082 0000 442b 0081 0000  .n..2?.?..D..?..
00007d40: 334c 0077 0000 3825 0072 0000 3eeb 006b  3L.w..8..r.....k
00007d50: 0000 48a9 0085 0000 4a15 0086 0000 4c28  ..H?.?..J..?..L.
00007d60: 007b 0000 461e 0077 0000 4ca3 006d 0000  ....F..w..L?.m..
00007d70: 4a9b 0088 0000 471c 0087 0000 47a3 008d  J?.?..G..?..G?.?
00007d80: 0000 4533 007d 0000 4830 0079 0000 45b0  ..E3....H0.y..E?
00007d90: 006e 0000 4b23 0088 0000 4695 0087 0000  .n..K..?..F?.?..
00007da0: 4bab 007d 0000 492e 0079 0000 49a7 006e  K?....I..y..I?.n
00007db0: 0000 2c1a 0078 0000 2eec 0077 0000 2b38  .....x.....w...8
00007dc0: 0077 0000 353f 006b 0000 2baf 006b 0000  .w..5..k...?.k..
00007dd0: 2abb 007d 0000 1f6e 007b 0000 29cc 0077  .?.....n.....?.w
00007de0: 0000 22b2 007c 0000 1eef 007f 0000 1e6f  ...?...........o
00007df0: 0080 0000 1df2 007d 0000 1d72 0080 0000  .?.........r.?..
00007e00: 1cf6 007c 0000 1c75 0081 0000 1bf5 0080  .......u.?.....?
00007e10: 0000 1b75 0080 0000 27e5 0081 0000 1af9  ...u.?.....?....
00007e20: 007c 0000 2496 0080 0000 2772 0073 0000  .....?.?...r.s..
00007e30: 1a87 0072 0000 1a12 0075 0000 199e 0074  .?.r.....u...?.t
00007e40: 0000 192a 0074 0000 18b3 0077 0000 1840  .....t...?.w....
00007e50: 0073 0000 17c9 0077 0000 1754 0075 0000  .s.....w...T.u..
00007e60: 16dc 0078 0000 1665 0077 0000 15ef 0076  .?.x...e.w.....v
00007e70: 0000 258e 0078 0000 1578 0077 0000 1501  ...?.x...x.w....
00007e80: 0077 0000 20d5 0077 0000 28de 0077 0000  .w...?.w.....w..
00007e90: 148b 0076 0000 214c 0078 0000 1414 0077  .?.v...L.x.....w
00007ea0: 0000 2955 0077 0000 139e 0076 0000 1326  ...U.w...?.v....
00007eb0: 0078 0000 2a43 0078 0000 12ad 0079 0000  .x...C.x...?.y..
00007ec0: 23a7 0078 0000 1235 0078 0000 2516 0078  .?.x...5.x.....x
00007ed0: 0000 232e 0079 0000 26f9 0079 0000 11bf  .....y.....y....
00007ee0: 0076 0000 114a 0075 0000 10d2 0078 0000  .v...J.u...?.x..
00007ef0: 105a 0078 0000 21c4 0079 0000 0fe3 0077  .Z.x...?.y.....w
00007f00: 0000 0f6c 0077 0000 0ef5 0077 0000 0e7f  ...l.w.....w....
00007f10: 0076 0000 0e08 0077 0000 2866 0078 0000  .v.....w...f.x..
00007f20: 0d91 0077 0000 0d1d 0074 0000 0ca9 0074  .?.w.....t...?.t
00007f30: 0000 241f 0077 0000 0c2f 007a 0000 0bb7  .....w.....z...?
00007f40: 0078 0000 0b3c 007b 0000 0ac1 007b 0000  .x..............
00007f50: 0a45 007c 0000 09c9 007c 0000 094d 007c  .E...........M..
00007f60: 0000 08d3 007a 0000 085a 0079 0000 07dc  ...?.z...Z.y...?
00007f70: 007e 0000 075d 007f 0000 06df 007e 0000  ................
00007f80: 0664 007b 0000 2606 007c 0000 05ed 0077  .d.............w
00007f90: 0000 223d 0075 0000 0578 0075 0000 0503  .....u...x.u....
00007fa0: 0075 0000 048f 0074 0000 2060 0075 0000  .u...?.t.....u..
00007fb0: 041a 0075 0000 03a6 0074 0000 0333 0073  ...u...?.t...3.s
00007fc0: 0000 1fe9 0077 0000 02c0 0073 0000 024b  .....w.....s...K
00007fd0: 0075 0000 01d5 0076 0000 015e 0077 0000  .u...?.v.....w..
00007fe0: 2682 0077 0000 00eb 0073 0000 0076 0075  .?.w.....s...v.u
00007ff0: 0000 003c 003a 0000 0000 0000 7d95 bfcf  .............?.?




> Database corrupt with ERROR XSDB0: Unexpected exception on in-memory page Page(103,Container(0,
1137)) 
> -------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4894
>                 URL: https://issues.apache.org/jira/browse/DERBY-4894
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.5.3.0
>            Reporter: Kathey Marsden
>         Attachments: derby4894_diff.txt, derbywtrunk.log
>
>
> I am looking at a user database that is corrupt.  The database is in 10.5 format and
the stack trace on connect is below. 
> ERROR XSDB0: Unexpected exception on in-memory page Page(103,Container(0, 1137))
> 	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.initSlotTable(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.initFromData(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)
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
> 	at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
> 	at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
> 	at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
> 	at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
> 	at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown
Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown
Source)
> 	at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
> 	at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
> 	at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
> 	at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:322)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:297)
> 	at org.apache.derby.impl.tools.ij.ij.dynamicConnection(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.ConnectStatement(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.ijStatement(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)
> ------------  END SHUTDOWN ERROR STACK -------------
> 2010-11-08 19:59:32.965 GMT:
> Shutting down instance a816c00e-012c-2d12-7233-000000073238 with class loader sun.misc.Launcher$AppClassLoader@4be14be1

> ----------------------------------------------------------------
> 2010-11-08 19:59:32.981 GMT Thread[main,5,main] Cleanup action starting
> java.sql.SQLException: Failed to start database 'persistenceDB' with class loader sun.misc.Launcher$AppClassLoader@4be14be1,
see the next exception for details.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
> 	at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
> 	at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
> 	at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:322)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:297)
> 	at org.apache.derby.impl.tools.ij.ij.dynamicConnection(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.ConnectStatement(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.ijStatement(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.sql.SQLException: Failed to start database 'persistenceDB' with class
loader sun.misc.Launcher$AppClassLoader@4be14be1, see the next exception for details.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
> 	... 19 more
> Caused by: java.sql.SQLException: Unexpected exception on in-memory page Page(103,Container(0,
1137))
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
> 	... 16 more
> Caused by: ERROR XSDB0: Unexpected exception on in-memory page Page(103,Container(0,
1137))
> 	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.initSlotTable(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.initFromData(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)
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
> 	at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
> 	at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
> 	at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
> 	at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
> 	at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown
Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown
Source)
> 	at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source)
> 	... 16 more
> ============= begin nested exception, level (1) ===========
> java.sql.SQLException: Unexpected exception on in-memory page Page(103,Container(0, 1137))
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
> 	at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
> 	at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
> 	at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:322)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:297)
> 	at org.apache.derby.impl.tools.ij.ij.dynamicConnection(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.ConnectStatement(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.ijStatement(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.sql.SQLException: Unexpected exception on in-memory page Page(103,Container(0,
1137))
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
> 	... 18 more
> Caused by: ERROR XSDB0: Unexpected exception on in-memory page Page(103,Container(0,
1137))
> 	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.initSlotTable(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.initFromData(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)
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
> 	at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
> 	at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
> 	at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
> 	at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
> 	at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown
Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown
Source)
> 	at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source)
> 	... 16 more
> ============= end nested exception, level (1) ===========
> ============= begin nested exception, level (2) ===========
> java.sql.SQLException: Unexpected exception on in-memory page Page(103,Container(0, 1137))
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
> 	at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
> 	at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
> 	at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:322)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:297)
> 	at org.apache.derby.impl.tools.ij.ij.dynamicConnection(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.ConnectStatement(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.ijStatement(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: ERROR XSDB0: Unexpected exception on in-memory page Page(103,Container(0,
1137))
> 	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.initSlotTable(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.initFromData(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)
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
> 	at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
> 	at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
> 	at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
> 	at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
> 	at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown
Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown
Source)
> 	at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source)
> 	... 16 more
> ============= end nested exception, level (2) ===========
> ============= begin nested exception, level (3) ===========
> ERROR XSDB0: Unexpected exception on in-memory page Page(103,Container(0, 1137))
> 	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.initSlotTable(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.initFromData(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)
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
> 	at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
> 	at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
> 	at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
> 	at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
> 	at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown
Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown
Source)
> 	at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
> 	at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
> 	at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
> 	at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:322)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:297)
> 	at org.apache.derby.impl.tools.ij.ij.dynamicConnection(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.ConnectStatement(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.ijStatement(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)
> ============= end nested exception, level (3) ===========
> Cleanup action completed
> Attached also is the derby.log connecting with a trunk sane build and the following properties
set:
> derby.debug.true=LogTrace
> derby.database.allowPreReleaseUpgrade=true
> as derbywtrunk.log
> That one fails with the assertion:
> DEBUG LogTrace OUTPUT: scanned 30061 : Page Operation: Page(103,Container(0, 1137)) pageVersion
424 : Insert :  Slot=110 recordId=297 instant = (66,264948) logEnd = (66,265114) logIn at
27 available 123
> Exception trace: 
> org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED
> 	at org.apache.derby.shared.common.sanity.SanityManager.ASSERT(SanityManager.java:98)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.getRecordPortionLength(StoredPage.java:2045)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.initSlotTable(StoredPage.java:2214)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.initFromData(StoredPage.java:780)
> 	at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(CachedPage.java:210)
> 	at org.apache.derby.impl.services.cache.ConcurrentCache.find(ConcurrentCache.java:295)
> 	at org.apache.derby.impl.store.raw.data.FileContainer.getAnyPage(FileContainer.java:2527)
> 	at org.apache.derby.impl.store.raw.data.BaseContainer.getAnyPage(BaseContainer.java:496)
> 	at org.apache.derby.impl.store.raw.data.BaseContainerHandle.getAnyPage(BaseContainerHandle.java:611)
> 	at org.apache.derby.impl.store.raw.data.PageBasicOperation.findpage(PageBasicOperation.java:304)
> 	at org.apache.derby.impl.store.raw.data.PageBasicOperation.needsRedo(PageBasicOperation.java:160)
> 	at org.apache.derby.impl.store.raw.log.FileLogger.redo(FileLogger.java:1395)
> 	at org.apache.derby.impl.store.raw.log.LogToFile.recover(LogToFile.java:924)
> 	at org.apache.derby.impl.store.raw.RawStore.boot(RawStore.java:339)
> Showing that it fails on an entry early in log66.dat  and we have a log67.dat to go.
> Unfortunately I cannot post the db but just thought I would put this out there in case
anyone in the community has ideas.
> I am still trying to reconstruct the history with the user. The copy has no date information
but as far as I can tell the db was last successfully updated on 10/30 and failed when they
tried to connect on 11/10.  I was surprised that the database was in 10.5 format as we thought
they only just upgraded to 10.5 as part of the support process after encountering the error.
  The current db copy I have did not preserve the timestamps so am trying to get that too.
> The problem occurred as part of a product upgrade (not necessarily a derby upgrade) which
first failed due to running out of disk space, but it is not clear it even got to the point
of accessing Derby.  After making more space available, the user retried the install and got
this error.
> I am going to try just printing the transaction log to see if the additional records
are well formed.   Mike said because there are not extensive comments on this assert, probably
it has never been hit in the field before.    He will add more info to the assert and post
a patch to try here.

-- 
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