db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5398) NullPointerException in storemore/bug3498.sql
Date Wed, 07 Sep 2011 13:58:09 GMT

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

Rick Hillegas updated DERBY-5398:

    Attachment: derby-5398.sql

Attaching derby-5398.sql. This script shows the following behaviors related to this problem:

1) If you shutdown the database in an orderly fashion, then there is enough context when we
need it and sequences are able to flush their current positions to disk, reclaiming unused

2) If you shutdown the database in an unorderly fashion, there isn't enough context when we
need it and the sequences trip over an NPE when trying to reclaim their unused values.

I can imagine several ways to fix this problem, listed in rising order of usefulness and complexity:

i) Re-instate the original exception swallowing.

ii) Have BasicDatabase check for the presence of enough context before trying to clear the
sequence caches. If there isn't enough context then we are somewhere in an unorderly shutdown
and the sequences can't reclaim their unused values.

iii) Find another place in shutdown where DataDictionary.clearSequenceCaches() succeeds in
more cases. If you find a place that always succeeds, then you have a solution to DERBY-5151.

> NullPointerException in storemore/bug3498.sql
> ---------------------------------------------
>                 Key: DERBY-5398
>                 URL: https://issues.apache.org/jira/browse/DERBY-5398
>             Project: Derby
>          Issue Type: Bug
>          Components: Services
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>         Attachments: derby-5398.sql
> The tinderbox failed when testing revision 1164361:
> Failure Details:
> ********* Diff file derbyall/storeall/storemore/bug3498.diff
> *** Start: bug3498 jdk1.6.0_24 storeall:storemore 2011-09-02 10:04:59 ***
> 322 del
> < ij> 
> 322 add
> > ij> Exception in thread "main" java.lang.NullPointerException
> Test Failed.
> *** End:   bug3498 jdk1.6.0_24 storeall:storemore 2011-09-02 10:05:02 ***
> Here's the full stack trace:
> Exception in thread "main" java.lang.NullPointerException
> 	at org.apache.derby.impl.sql.catalog.SequenceUpdater.updateCurrentValueOnDisk(Unknown
> 	at org.apache.derby.impl.sql.catalog.SequenceUpdater.clean(Unknown Source)
> 	at org.apache.derby.impl.sql.catalog.SequenceUpdater.clearIdentity(Unknown Source)
> 	at org.apache.derby.impl.services.cache.ConcurrentCache.removeEntry(Unknown Source)
> 	at org.apache.derby.impl.services.cache.ConcurrentCache.ageOut(Unknown Source)
> 	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.clearSequenceCaches(Unknown
> 	at org.apache.derby.impl.db.BasicDatabase.stop(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.TopService.stop(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.TopService.shutdown(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.shutdown(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.shutdown(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:582)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:207)
> 	at org.apache.derby.impl.tools.ij.utilMain.cleanupGo(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)

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message