This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5548 - Out of memory error
Summary: Out of memory error
Status: RESOLVED FIXED
Alias: None
Product: mobileOK Basic checker
Classification: Unclassified
Component: Java Library (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Dominique Hazael-Massieux
QA Contact:
URL: http://iphone.20minutes.fr/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-07 13:51 UTC by Dominique Hazael-Massieux
Modified: 2008-03-07 16:08 UTC (History)
0 users

See Also:


Attachments
Moki document of checker running on the given site (698.20 KB, application/xml)
2008-03-07 13:52 UTC, Dominique Hazael-Massieux
Details

Description Dominique Hazael-Massieux 2008-03-07 13:51:19 UTC
When checking http://iphone.20minutes.fr/ with the library (and once the max body size has been increased to 500K instead of 50K), the checker crashes with the following trace:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at com.sun.org.apache.xml.internal.utils.SuballocatedIntVector.<init>(SuballocatedIntVector.java:99)
        at com.sun.org.apache.xml.internal.utils.SuballocatedIntVector.<init>(SuballocatedIntVector.java:113)
        at com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase.declareNamespaceInContext(DTMDefaultBase.java:1299)
        at com.sun.org.apache.xml.internal.dtm.ref.dom2dtm.DOM2DTM.addNode(DOM2DTM.java:303)
        at com.sun.org.apache.xml.internal.dtm.ref.dom2dtm.DOM2DTM.nextNode(DOM2DTM.java:539)
        at com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase._nextsib(DTMDefaultBase.java:563)
        at com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase.getNextSibling(DTMDefaultBase.java:1140)
        at com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBaseTraversers$ChildTraverser.next(DTMDefaultBaseTraversers.java:461)
        at com.sun.org.apache.xpath.internal.axes.AxesWalker.getNextNode(AxesWalker.java:333)
        at com.sun.org.apache.xpath.internal.axes.AxesWalker.nextNode(AxesWalker.java:361)
        at com.sun.org.apache.xpath.internal.axes.WalkingIterator.nextNode(WalkingIterator.java:192)
        at com.sun.org.apache.xpath.internal.axes.NodeSequence.nextNode(NodeSequence.java:281)
        at com.sun.org.apache.xpath.internal.axes.NodeSequence.runTo(NodeSequence.java:435)
        at com.sun.org.apache.xml.internal.dtm.ref.DTMNodeList.<init>(DTMNodeList.java:79)
        at com.sun.org.apache.xpath.internal.objects.XNodeSet.nodelist(XNodeSet.java:339)
        at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.getResultAsType(XPathExpressionImpl.java:353)
        at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:99)
        at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:180)
        at org.w3c.mwi.mobileok.basic.AbstractCSSTestImplementation.generateResultsOnCSSContent(AbstractCSSTestImplementation.java:98)
        at org.w3c.mwi.mobileok.basic.AbstractCSSTestImplementation.runTest(AbstractCSSTestImplementation.java:56)
        at org.w3c.mwi.mobileok.basic.Tester.runTests(Tester.java:75)
        at org.w3c.mwi.mobileok.basic.Tester.main(Tester.java:211)

(the relevant moki document is attached)

I'm not sure what may cause this out of memory error - I haven't spotted any obvious problem in the XPath used to parse embedded stylesheet.
Comment 1 Dominique Hazael-Massieux 2008-03-07 13:52:34 UTC
Created attachment 527 [details]
Moki document of checker running on the given site
Comment 2 Sean Owen 2008-03-07 15:29:32 UTC
Dom how do you run the JVM? I would run it like so:

java -server -da -dsa -Xmx512m ...

The first three are performance related but the last increases the maximum amount of memory the JVM will use to 512MB. I'd feed the checker as much as you can. Increasing the size of the documents we allow increases memory requirements, and also makes the XML/XSL parsing more memory-intensive. I think the default max heap size is 64M, which can run out quickly.
Comment 3 Dominique Hazael-Massieux 2008-03-07 16:08:48 UTC
that did it, indeed, thanks for the tip!