Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-29138

JUnit analysis fails with OOM (regression)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • junit-plugin
    • Ubuntu 12.04, 64bit

      Since the upgrade to Jenkins 1.609.1 (LTS) Jenkins needs significantly more memory parsing the JUnit results. We have slaves running with 512MB heap and there were no problems parsing all results in the previous version. Right after the update they are not not able to parse the same results with 1.5GB! I also checked and the largest XML result file is 17MB (and we don't keep large stdout/stderr). This looks like a serious regression in this version of Jenkins.
      Here's the relevant stack trace:
      Caused by: java.lang.OutOfMemoryError: Java heap space
      at java.util.Arrays.copyOf(Arrays.java:2367)
      at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
      at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
      at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:415)
      at java.lang.StringBuffer.append(StringBuffer.java:237)
      at org.dom4j.io.SAXContentHandler.characters(SAXContentHandler.java:293)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.characters(AbstractSAXParser.java:546)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:648)
      at org.dom4j.io.SAXReader.read(SAXReader.java:465)
      at org.dom4j.io.SAXReader.read(SAXReader.java:264)
      at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:123)
      at hudson.tasks.junit.TestResult.parse(TestResult.java:282)
      at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:228)
      at hudson.tasks.junit.TestResult.parse(TestResult.java:163)
      at hudson.tasks.junit.TestResult.parse(TestResult.java:146)
      at hudson.tasks.junit.TestResult.<init>(TestResult.java:122)

            Unassigned Unassigned
            sithmein Thorsten Meinl
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: