db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roman Musil (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4571) Memory leak on server when using "SET ROLE" command
Date Fri, 26 Feb 2010 07:00:29 GMT

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

Roman Musil commented on DERBY-4571:

OK, it is little bit more complicated, than in your attached Java program. The SELECT command
must use rights defined by the ROLE. If "SET ROLE" is executed, but SELECT is granted directly
to the user, then it works OK.
I'll provide a sample Java program in a few hours.

(I know, it has to be two different issue: one "memory leak" and second "data loosing", but
the "data loosing" is difficult to reproduce.
Database is installed "as is" - no special configuration -> no write disk cache.)
There is the stack trace from derby.log (btw: the database rapidly slows down before exception):
Exception in thread "DRDAConnThread_8" 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.StringBuffer.append(StringBuffer.java:224)
        at java.io.StringWriter.write(StringWriter.java:95)
        at java.io.PrintWriter.write(PrintWriter.java:412)
        at java.io.PrintWriter.write(PrintWriter.java:429)
        at java.io.PrintWriter.print(PrintWriter.java:559)
        at org.apache.derby.iapi.error.ErrorStringBuilder.appendln(Unknown Source)
        at org.apache.derby.iapi.services.context.ContextManager.cleanupOnError(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source)
        at org.apache.derby.impl.drda.DRDAStatement.execute(Unknown Source)
        at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
        at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)

> Memory leak on server when using "SET ROLE" command
> ---------------------------------------------------
>                 Key: DERBY-4571
>                 URL: https://issues.apache.org/jira/browse/DERBY-4571
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions:,
>         Environment: Windows XP, Java 6 (build doesn't matter: 10-18)
>            Reporter: Roman Musil
>         Attachments: D4571.java
> Scenario:
> -connect into database
> -use command SET ROLE
> -repeat simple selects many times -> memory consumtions ends with database "outOfMemory:
heap space" crash.
> Sometimes this crash ends with loosing (of course previously commited) data in different
tables - this is in the case using "UPDATE" etc. command.
> Without command SET ROLE everythings works OK. 

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

View raw message