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

Kathey Marsden updated DERBY-3354:
----------------------------------

    Attachment: LocLeak.java

Atttached is a program to reproduce this issue.
Run java -Xmx16M LocLeak. I got the error on the 68000 row of retreival with 
the free(). Sooner if I didn't call free.

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:2882)
        at 
java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
        at 
java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
        at java.lang.StringBuilder.append(StringBuilder.java:119)
        at java.lang.Object.toString(Object.java:219)
        at java.lang.String.valueOf(String.java:2827)
        at java.lang.StringBuffer.append(StringBuffer.java:219)
        at 
org.apache.derby.impl.jdbc.EmbedConnection.restoreContextStack(EmbedConnection.java:1960)
        at 
org.apache.derby.impl.jdbc.ConnectionChild.restoreContextStack(ConnectionChild.java:131)
        at org.apache.derby.impl.jdbc.UTF8Reader.fillBuffer(UTF8Reader.java:567)
        at org.apache.derby.impl.jdbc.UTF8Reader.read(UTF8Reader.java:245)
        at 
org.apache.derby.impl.jdbc.ClobUpdatableReader.read(ClobUpdatableReader.java:154)
        at org.apache.derby.impl.jdbc.EmbedClob.getSubString(EmbedClob.java:225)
        at LocLeak.dump_db(LocLeak.java:50)
        at LocLeak.main(LocLeak.java:13)

Note there may be problems freeing the locators on garbage collection, because 
client relies upon them even after there is no embedded reference.


> 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
>            Reporter: Kathey Marsden
>         Attachments: 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.

Reply via email to