From: Christian S. <chr...@ne...> - 2003-07-28 13:45:39
|
Hello, I am testing the XUpdate capabilities with the CVS head version running in embedded mode, and keep running into an OutOfMemoryError. I have a small document (3 nested elements), to which I am adding one element via an xupdate:append command. I can do this in a loop 83 times - then I get said error. Doubling the -Xmx value to 512m only gets me to 84 items, but after that I get the stack trace below from the shutdown method (which is called in a finally block). Interestingly, if I restart my program after the first run, I can query the document and see the 83 inserted items. However, trying to add another item, I get the OutOfMemoryError on the very first attempt - which shows that the condition is permanent. java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at org.dbxml.core.filer.Paged$Page.write(Paged.java:947) at org.dbxml.core.filer.Paged$Page.access$900(Paged.java:812) at org.dbxml.core.filer.Paged.writeValue(Paged.java:446) at org.exist.storage.store.DOMFile.access$300(DOMFile.java:72) at org.exist.storage.store.DOMFile$DOMPage.write(DOMFile.java:1471) at org.exist.storage.store.DOMFile$ClockPageBuffer.flush(DOMFile.java:1635) at org.exist.storage.store.DOMFile.flush(DOMFile.java:580) at org.exist.storage.NativeBroker$14.start(NativeBroker.java:1889) at org.exist.storage.store.DOMTransaction.run(DOMTransaction.java:48) at org.exist.storage.NativeBroker.sync(NativeBroker.java:1886) at org.exist.storage.NativeBroker.shutdown(NativeBroker.java:1749) at org.exist.storage.BrokerPool.shutdown(BrokerPool.java:328) at org.exist.xmldb.LocalDatabaseInstanceManager.shutdown(LocalDatabaseInstanceManager.java:32) at test.DBMain.shutdown(DBMain.java:130) at test.TestExist.testPerformance(TestExist.java:65) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) 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.textui.TestRunner.doRun(TestRunner.java:116) at junit.textui.TestRunner.start(TestRunner.java:172) at junit.textui.TestRunner.main(TestRunner.java:138) |
From: Wolfgang M. <me...@if...> - 2003-07-28 16:58:36
|
Hi, I encountered a similar error after doing 90 XUpdates. It is caused by a wrong page size declaration in the page header (thus a very large byte array is allocated for the page, leading to an OutOfMemoryError). I just committed a bug fix to the CVS. Wolfgang On Monday 28 July 2003 03:44 pm, Christian Sell wrote: > Hello, > > I am testing the XUpdate capabilities with the CVS head version running > in embedded mode, and keep running into an OutOfMemoryError. I have a > small document (3 nested elements), to which I am adding one element via > an xupdate:append command. > > I can do this in a loop 83 times - then I get said error. Doubling the > -Xmx value to 512m only gets me to 84 items, but after that I get the > stack trace below from the shutdown method (which is called in a finally > block). > > Interestingly, if I restart my program after the first run, I can query > the document and see the 83 inserted items. However, trying to add > another item, I get the OutOfMemoryError on the very first attempt - > which shows that the condition is permanent. |
From: Wolfgang M. <me...@if...> - 2003-07-29 16:00:27
|
Hi, I found two additional bugs in the XUpdate code: in both cases, the size of the inserted or appended node exceeds the available amount of free space in the page, resulting in an ArrayIndexOutOfBounds exception. A bug fix has just been submitted to CVS. Wolfgang |