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

Mike Matrigali commented on DERBY-6582:
---------------------------------------

Unfortunately without line number there is more than one place that can 
generate a null pointer.  Here
is the interesting part of the stack:
============= begin nested exception, level (1) ===========
java.lang.NullPointerException
        at 
org.apache.derby.impl.store.raw.data.LogicalPageOperation.generateUndo(Unknown 
Source)

if (undo == null) then code uses return from findpage without checking it for 
null.  findpage is documented
that it could return null if " @return null if container is dropped and 
committed (possibly
        stubbified), else return the latched page"
It could be that recovery code never expects to hit this condition during undo.
What is going on would be much clearer with a dump of log records leading to 
this condtion.

There is also the undo != null path which uses the findLogicalPage() return 
without checking for null.

> Database corruption after OutOfMemoryError 
> -------------------------------------------
>
>                 Key: DERBY-6582
>                 URL: https://issues.apache.org/jira/browse/DERBY-6582
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.9.1.0
>         Environment: Apache Derby: 10.9.1.0 (1344872), RT info | os.arch=x86 
> |  | os.name=Windows Server 2008 R2 |  | os.version=6.1 |  | 
> java.version=1.6.0_17 |  | -Xmx1024m
>            Reporter: Andreas Resch
>         Attachments: derby.ERROR XSLA6.log, derby.OutOfMemory.log
>
>
> after running into an out of memory error [1] the database cannot be used any 
> more [2]. Full stacktraces follow as attachment
> [1] OutOfMemoryError Stacktrace
> DBMS failure (UE[DRDAConnThread_32]). Exiting with code -1
> java.lang.OutOfMemoryError: Java heap space
>       at java.util.LinkedHashMap.createEntry(Unknown Source)
>       at java.util.LinkedHashMap.addEntry(Unknown Source)
>       at java.util.HashMap.put(Unknown Source)
>       at sun.util.resources.OpenListResourceBundle.loadLookup(Unknown Source)
>       at 
> sun.util.resources.OpenListResourceBundle.loadLookupTablesIfNecessary(Unknown 
> Source)
>       at sun.util.resources.OpenListResourceBundle.handleGetObject(Unknown 
> Source)
>       at sun.util.resources.TimeZoneNamesBundle.handleGetObject(Unknown 
> Source)
>       at java.util.ResourceBundle.getObject(Unknown Source)
>       at java.util.ResourceBundle.getObject(Unknown Source)
>       at java.util.ResourceBundle.getStringArray(Unknown Source)
>       at sun.util.TimeZoneNameUtility.retrieveDisplayNames(Unknown Source)
>       at sun.util.TimeZoneNameUtility.retrieveDisplayNames(Unknown Source)
>       at java.util.TimeZone.getDisplayNames(Unknown Source)
>       at java.util.TimeZone.getDisplayName(Unknown Source)
>       at java.util.Date.toString(Unknown Source)
>       at java.lang.String.valueOf(Unknown Source)
>       at java.lang.StringBuffer.append(Unknown Source)
>       at 
> org.apache.derby.impl.services.stream.BasicGetLogHeader.getHeader(Unknown 
> Source)
>       at org.apache.derby.iapi.error.ErrorStringBuilder.appendln(Unknown 
> Source)
> [...]
> [2] ERROR XSLA6: Cannot recover the database.
> [...]
> Caused by: java.lang.NullPointerException
>       at 
> org.apache.derby.impl.store.raw.data.LogicalPageOperation.generateUndo(Unknown
>  Source)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to