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

robot-plugin throws an Maximum attribute size limit (524288) exceeded when parsing output.xml

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • robot-plugin
    • None
    • Jenkins core version 2.387.3, robot-plugin 3.0.1

      While jenkins ran RobotPublisher 
      error was start 

      ```
      Robot results publisher started...
      -Parsing output xml:Finished: Uploading to xxxxx
      Failed!
      java.io.IOException: Parsing of output xml failed!
      at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:102)
      at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:52)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3578)
      at hudson.remoting.UserRequest.perform(UserRequest.java:211)
      at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      at hudson.remoting.Request$2.run(Request.java:376)
      at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:119)
      at java.base/java.lang.Thread.run(Thread.java:829)
      Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from ip-10-128-84-250.ap-southeast-1.compute.internal/10.128.84.250:51596
      at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784)
      at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
      at hudson.remoting.Channel.call(Channel.java:1000)
      at hudson.FilePath.act(FilePath.java:1192)
      at hudson.FilePath.act(FilePath.java:1181)
      at hudson.plugins.robot.RobotParser.parse(RobotParser.java:48)
      at hudson.plugins.robot.RobotPublisher.parse(RobotPublisher.java:245)
      at hudson.plugins.robot.RobotPublisher.perform(RobotPublisher.java:267)
      at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
      at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101)
      at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71)
      at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      ... 1 more
      Caused by: javax.xml.stream.XMLStreamException: Maximum attribute size limit (524288) exceeded
      at com.ctc.wstx.sr.StreamScanner.constructLimitViolation(StreamScanner.java:2479)
      at com.ctc.wstx.sr.StreamScanner.verifyLimit(StreamScanner.java:2472)
      at com.ctc.wstx.sr.BasicStreamReader._checkAttributeLimit(BasicStreamReader.java:2058)
      at com.ctc.wstx.sr.BasicStreamReader.parseAttrValue(BasicStreamReader.java:2038)
      at com.ctc.wstx.sr.BasicStreamReader.handleNsAttrs(BasicStreamReader.java:3153)
      at com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:3050)
      at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2928)
      at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1122)
      at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:455)
      at hudson.plugins.robot.RobotParser$RobotParserCallable.processTest(RobotParser.java:295)
      at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:153)
      at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:151)
      at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:151)
      at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:151)
      at hudson.plugins.robot.RobotParser$RobotParserCallable.parseResult(RobotParser.java:121)
      at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:97)
      ... 11 more[Pipeline] stage[Pipeline] { (Send regression result to GCHAT)[Pipeline] echojava.lang.NullPointerException: Cannot get property 'totalCount' on null object
      ```

      It look like jenkins core version 2.387.3 was update new xml parsing version
      that check Maximum attribute size limit to prevent some dos.

      https://fasterxml.github.io/woodstox/javadoc/5.0/com/ctc/wstx/api/WstxInputProperties.html#P_MAX_ATTRIBUTE_SIZE

      should robot-plugin have some logic like sonar? ->  https://sonarsource.atlassian.net/browse/SONARJAVA-3142

          [JENKINS-71548] robot-plugin throws an Maximum attribute size limit (524288) exceeded when parsing output.xml

          Adam added a comment - - edited

          We are also getting a similar issue.

          11:57:52  -Parsing output xml:
          11:57:59  Failed!
          11:57:59  java.io.IOException: Parsing of output xml failed!
          11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:102)
          11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:52)
          11:57:59    at hudson.FilePath.act(FilePath.java:1198)
          11:57:59    at hudson.FilePath.act(FilePath.java:1181)
          11:57:59    at hudson.plugins.robot.RobotParser.parse(RobotParser.java:48)
          11:57:59    at hudson.plugins.robot.RobotPublisher.parse(RobotPublisher.java:245)
          11:57:59    at hudson.plugins.robot.RobotPublisher.perform(RobotPublisher.java:267)
          11:57:59    at hudson.plugins.robot.RobotStepExecution.run(RobotStepExecution.java:32)
          11:57:59    at hudson.plugins.robot.RobotStepExecution.run(RobotStepExecution.java:15)
          11:57:59    at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
          11:57:59    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
          11:57:59    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
          11:57:59    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
          11:57:59    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
          11:57:59    at java.base/java.lang.Thread.run(Thread.java:833)
          11:57:59  Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[4710422,15083]
          11:57:59  Message: JAXP00010004: The accumulated size of entities is "50,000,001" that exceeded the "50,000,000" limit set by "FEATURE_SECURE_PROCESSING".
          11:57:59    at java.xml/com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:652)
          11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:497)
          11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:482)
          11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:482)
          11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.processTest(RobotParser.java:302)
          11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:153)
          11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:151)
          11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.parseResult(RobotParser.java:121)
          11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:97) 

          Adam added a comment - - edited We are also getting a similar issue. 11:57:52  -Parsing output xml: 11:57:59  Failed! 11:57:59  java.io.IOException: Parsing of output xml failed! 11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:102) 11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:52) 11:57:59    at hudson.FilePath.act(FilePath.java:1198) 11:57:59    at hudson.FilePath.act(FilePath.java:1181) 11:57:59    at hudson.plugins.robot.RobotParser.parse(RobotParser.java:48) 11:57:59    at hudson.plugins.robot.RobotPublisher.parse(RobotPublisher.java:245) 11:57:59    at hudson.plugins.robot.RobotPublisher.perform(RobotPublisher.java:267) 11:57:59    at hudson.plugins.robot.RobotStepExecution.run(RobotStepExecution.java:32) 11:57:59    at hudson.plugins.robot.RobotStepExecution.run(RobotStepExecution.java:15) 11:57:59    at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) 11:57:59    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) 11:57:59    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 11:57:59    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) 11:57:59    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) 11:57:59    at java.base/java.lang. Thread .run( Thread .java:833) 11:57:59  Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[4710422,15083] 11:57:59  Message: JAXP00010004: The accumulated size of entities is "50,000,001" that exceeded the "50,000,000" limit set by "FEATURE_SECURE_PROCESSING" . 11:57:59    at java.xml/com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:652) 11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:497) 11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:482) 11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:482) 11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.processTest(RobotParser.java:302) 11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:153) 11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:151) 11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.parseResult(RobotParser.java:121) 11:57:59    at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:97)

          Aleksi Simell added a comment -

          Hi nineza0001 and wra1fp,

          and sorry for the delay. Just to make sure, how big are your output.xml files? The plugin has been reported to successfully parse multi GB output.xml files, so could this be setting limitation on your Jenkins as suggested by this SO ticket?

          Aleksi Simell added a comment - Hi nineza0001 and wra1fp , and sorry for the delay. Just to make sure, how big are your output.xml files? The plugin has been reported to successfully parse multi GB output.xml files, so could this be setting limitation on your Jenkins as suggested by this SO ticket?

          Adam added a comment -

          aleksisimell Our files are around 2GB. The failure doesn't occur all the time but we still occasionally this. I will check the linked issue and see if that will help

          Adam added a comment - aleksisimell Our files are around 2GB. The failure doesn't occur all the time but we still occasionally this. I will check the linked issue and see if that will help

          Aleksi Simell added a comment -

          wra1fp, any news on this? Did the links help you with your issue?

          Aleksi Simell added a comment - wra1fp , any news on this? Did the links help you with your issue?

          Adam added a comment - - edited

          aleksisimell I have been monitoring it and we haven't seen it since I used those extra commands. I will let you know if it happens again. Thank you

          Would be nice if Jenkins had an easier way to set this, Maybe one day they will add it to the settings interface

          Adam added a comment - - edited aleksisimell I have been monitoring it and we haven't seen it since I used those extra commands. I will let you know if it happens again. Thank you Would be nice if Jenkins had an easier way to set this, Maybe one day they will add it to the settings interface

          Aleksi Simell added a comment -

          Closing as not a defect. Please reopen if still an issue.

          Aleksi Simell added a comment - Closing as not a defect. Please reopen if still an issue.

            aleksisimell Aleksi Simell
            nineza0001 Nomklao
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: