db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3354) Select from large lob table with embedded gives OutOfMemoryError
Date Tue, 12 Feb 2008 16:07:08 GMT

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

Kathey Marsden commented on DERBY-3354:

Thanks for the patch.  I tried it out and it and have a few comments.

1) In EmbedBlob should the call to  localConn.removeLOBMapping(locator); be in a finally block
like it is in EmbedClob?

2) In jdk15 we don't have free()  so would still have a leak. Do you have any suggestions
for a jdk15 solution?

3) I removed the call to free() from the repro and ran 
java LocLeak and got.
Retrieving row 99000
Exception in thread "main" java.sql.SQLException: Java exception: ': java.util.ConcurrentModificationException'.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:95)
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
        at org.apache.derby.impl.jdbc.Util.javaException(Util.java:245)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1946)
        at org.apache.derby.impl.jdbc.EmbedConnection.rollback(EmbedConnection.java:1521)
        at LocLeak.main(LocLeak.java:14)
Caused by: java.sql.SQLException: Java exception: ': java.util.ConcurrentModificationException'.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:13
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:70)
        ... 7 more
Caused by: java.util.ConcurrentModificationException
        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
        at java.util.HashMap$ValueIterator.next(HashMap.java:821)
        at org.apache.derby.impl.jdbc.EmbedConnection.clearLOBMapping(EmbedConnection.java:2737)
        at org.apache.derby.impl.jdbc.EmbedConnection.rollback(EmbedConnection.java:1519)
        ... 1 more

> Select from large lob table with embedded gives OutOfMemoryError
> ----------------------------------------------------------------
>                 Key: DERBY-3354
>                 URL: https://issues.apache.org/jira/browse/DERBY-3354
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions:,,
>            Reporter: Kathey Marsden
>         Attachments: derby-3354.diff, LocLeak.java
> Retrieving from a large table with lobs gives an OutOfMemoryException, even if free()
is explictly called on the lob.   I believe this is because EmbedConnection.addLobMapping
is called for every lob creation but is never cleared until commit or rollback, even if the
lob is freed.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message