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

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

XMLWordPrintable

    • 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

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

              Created:
              Updated:
              Resolved: