You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Myrna van Lunteren (JIRA)" <ji...@apache.org> on 2012/10/09 21:40:03 UTC

[jira] [Updated] (DERBY-5344) updateClob2 test in LobLimitsTest gets OutOfMemoryError on updateRow with embedded

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

Myrna van Lunteren updated DERBY-5344:
--------------------------------------

    Component/s: Store
        Urgency: Normal
         Labels: derby_triage10_10  (was: )

I thought I'd check if this is still an issue.
It took a little effort (and time, because the full suite takes a while) - at first, I got no OOMs, then I tried to run the full largedata._Suite with -Xmx32M, and I got OOMs everywhere (it couldn't even create the summary line in the output).
I finally commented out Derby5624Test, LobLimitsLiteTest, and LobLimitsClientTest from _Suite, and prevented the Clob tests in LobLimitsTest from running by adding an extra 't' to the fixture names. And of course I had the if clause (to prevent UpdateClob2 from running with Embedded) commented out.
With -Xmx32M I still got an OOM in another test, but with -Xmx128M I did see the OOM in updateRow:

java.sql.SQLException: Java exception: ': java.lang.OutOfMemoryError'.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:98)
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:142)
	at org.apache.derby.impl.jdbc.Util.javaException(Util.java:299)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:436)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:353)
	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2375)
	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:82)
	at org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(EmbedResultSet.java:4420)
	at org.apache.derby.impl.jdbc.EmbedResultSet.updateRow(EmbedResultSet.java:3799)
	at org.apache.derbyTesting.functionTests.tests.largedata.LobLimitsTest.updateClob2(LobLimitsTest.java:1214)
	at org.apache.derbyTesting.functionTests.tests.largedata.LobLimitsTest.test_04_Clob2(LobLimitsTest.java:315)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
	at java.lang.reflect.Method.invoke(Method.java:611)
	at junit.framework.TestCase.runTest(TestCase.java:164)
	at junit.framework.TestCase.runBare(TestCase.java:130)
	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:117)
	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:424)
	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:441)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:120)
	at junit.framework.TestSuite.runTest(TestSuite.java:230)
	at junit.framework.TestSuite.run(TestSuite.java:225)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.extensions.TestSetup.run(TestSetup.java:25)
	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.extensions.TestSetup.run(TestSetup.java:25)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.extensions.TestSetup.run(TestSetup.java:25)
	at junit.framework.TestSuite.runTest(TestSuite.java:230)
	at junit.framework.TestSuite.run(TestSuite.java:225)
	at junit.textui.TestRunner.doRun(TestRunner.java:121)
	at junit.textui.TestRunner.start(TestRunner.java:185)
	at junit.textui.TestRunner.main(TestRunner.java:143)
Caused by: java.sql.SQLException: Java exception: ': java.lang.OutOfMemoryError'.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:42)
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:122)
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:71)
	... 43 more
Caused by: java.lang.OutOfMemoryError
	at org.apache.derby.iapi.types.SQLChar.readExternal(SQLChar.java:1243)
	at org.apache.derby.iapi.types.SQLClob.readExternal(SQLClob.java:823)
	at org.apache.derby.iapi.types.SQLChar.getString(SQLChar.java:765)
	at org.apache.derby.iapi.types.SQLChar.setFrom(SQLChar.java:1753)
	at org.apache.derby.iapi.types.DataType.setValue(DataType.java:528)
	at org.apache.derby.impl.jdbc.EmbedResultSet.updateRow(EmbedResultSet.java:3779)
	... 35 more

Looking at the test, this doesn't appear to be a test issue. The clob is inserted and passed in as a stream, so not materialized by the test. Marking Component Store.

                
> updateClob2 test in LobLimitsTest gets OutOfMemoryError on updateRow with embedded
> ----------------------------------------------------------------------------------
>
>                 Key: DERBY-5344
>                 URL: https://issues.apache.org/jira/browse/DERBY-5344
>             Project: Derby
>          Issue Type: Bug
>          Components: Store, Test
>    Affects Versions: 10.9.1.0
>            Reporter: Kathey Marsden
>              Labels: derby_triage10_10
>
> On converting LobLimits.java to LobLimitsTest I noticed this disabled test:
> There is  disabled test in largedata.LobLimitsTest.java which is a carryover from largedata.LobLimits.java
>         // Disabled for now, this will materialize, will open
>         // jira for it.
>         // updateClob2("ClobTest #8.1",conn,selectClob,BIG_LOB_SZ,0,0,10,1,CHARDATAFILE);
> Enabling the test for embedded I noticed it still  can get an out of memory.  (I actually think I did run it once successfully)
> but on my second full run of the suite I saw it fail.
>  
> java.sql.SQLException: Java exception: ': java.lang.OutOfMemoryError'.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:98)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:142)
> 	at org.apache.derby.impl.jdbc.Util.javaException(Util.java:299)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:412)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:348)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2290)
> 	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:82)
> 	at org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(EmbedResultSet.java:4409)
> 	at org.apache.derby.impl.jdbc.EmbedResultSet.updateRow(EmbedResultSet.java:3788)
> 	at org.apache.derbyTesting.functionTests.tests.largedata.LobLimitsTest.updateClob2(LobLimitsTest.java:1219)
> 	at org.apache.derbyTesting.functionTests.tests.largedata.LobLimitsTest.testClob2(LobLimitsTest.java:304)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> 	at java.lang.reflect.Method.invoke(Method.java:611)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:112)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at junit.textui.TestRunner.doRun(TestRunner.java:116)
> 	at junit.textui.TestRunner.start(TestRunner.java:172)
> 	at junit.textui.TestRunner.main(TestRunner.java:138)
> Caused by: java.sql.SQLException: Java exception: ': java.lang.OutOfMemoryError'.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:122)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:71)
> 	... 37 more
> Caused by: java.lang.OutOfMemoryError
> 	at org.apache.derby.iapi.services.io.DynamicByteArrayOutputStream.expandBuffer(DynamicByteArrayOutputStream.java:244)
> 	at org.apache.derby.iapi.services.io.DynamicByteArrayOutputStream.write(DynamicByteArrayOutputStream.java:78)
> 	at java.io.DataOutputStream.write(DataOutputStream.java)
> 	at org.apache.derby.iapi.types.SQLChar.writeUTF(SQLChar.java:922)
> 	at org.apache.derby.iapi.types.SQLChar.writeClobUTF(SQLChar.java:960)
> 	at org.apache.derby.iapi.types.SQLClob.writeExternal(SQLClob.java:647)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.logColumn(StoredPage.java:6325)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.logRow(StoredPage.java:4006)
> 	at org.apache.derby.impl.store.raw.data.UpdateOperation.writeOptionalDataToBuffer(UpdateOperation.java:255)
> 	at org.apache.derby.impl.store.raw.data.UpdateOperation.<init>(UpdateOperation.java:106)
> 	at org.apache.derby.impl.store.raw.data.LoggableActions.actionUpdate(LoggableActions.java:80)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.doUpdateAtSlot(StoredPage.java:8602)
> 	at org.apache.derby.impl.store.raw.data.BasePage.updateAtSlot(BasePage.java:1064)
> 	at org.apache.derby.impl.store.access.conglomerate.GenericConglomerateController.replace(GenericConglomerateController.java:486)
> 	at org.apache.derby.impl.sql.execute.RowChangerImpl.updateRow(RowChangerImpl.java:523)
> 	at org.apache.derby.impl.sql.execute.UpdateResultSet.collectAffectedRows(UpdateResultSet.java:569)
> 	at org.apache.derby.impl.sql.execute.UpdateResultSet.open(UpdateResultSet.java:264)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:436)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(GenericPreparedStatement.java:306)
> 	at org.apache.derby.impl.jdbc.EmbedResultSet.updateRow(EmbedResultSet.java:3772)
> 	... 29 more
> The test passes on client and in LobLimitsLiteTest  in embedded. To reproduce run largedata.LobLimitsTest, commenting out the below condition:
>        if (!(usingEmbedded()  && BIGGEST_LOB_SZ  == _2GB)) {
>             updateClob2("ClobTest #8.1",selectClob,BIG_LOB_SZ,0,0,10,CHARDATAFILE);
>         }
>   or likely you can get a smaller standalone test case by adjusting the sizes and adjusting down the heap with -Xmx

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira