Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: jacoco-plugin
    • Labels:
      None
    • Environment:
      Windows server 2008, Jenkins 1.538
    • Similar Issues:

      Description

      Hi,

      Our logs get polluted by this - and get the Jenkins server to hang:

      INFO   | jvm 2    | 2013/11/06 13:48:11 | [Fatal Error] build.xml:1037:741: Character reference "&#
      INFO   | jvm 2    | 2013/11/06 13:48:11 | Nov 06, 2013 1:48:11 PM jenkins.diagnostics.ooom.Problem$Inspector scan
      INFO   | jvm 2    | 2013/11/06 13:48:11 | WARNING: Failed to inspect D:\build\hudson\jobs\ws-kredit-kreditansoegning trunk NB\modules\dk.nykredit.kredit.kreditansoegning$kreditansoegning-service\builds\828
      INFO   | jvm 2    | 2013/11/06 13:48:11 | org.xml.sax.SAXParseException; systemId: file:/D:/build/hudson/jobs/ws-kredit-kreditansoegning%20trunk%20NB/modules/dk.nykredit.kredit.kreditansoegning$kreditansoegning-service/builds/828/build.xml; lineNumber: 1037; columnNumber: 741; Character reference "&#
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(Unknown Source)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at jenkins.diagnostics.ooom.Problem$Inspector.loadBuildNumberFromBuildXml(Problem.java:295)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at jenkins.diagnostics.ooom.Problem$Inspector.scan(Problem.java:222)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at jenkins.diagnostics.ooom.Problem$Inspector.inspect(Problem.java:139)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at jenkins.diagnostics.ooom.Problem.<init>(Problem.java:61)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at jenkins.diagnostics.ooom.Problem.find(Problem.java:54)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at jenkins.diagnostics.ooom.OutOfOrderBuildDetector.execute(OutOfOrderBuildDetector.java:44)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at jenkins.diagnostics.ooom.OutOfOrderBuildDetector.execute(OutOfOrderBuildDetector.java:31)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at hudson.model.AsyncPeriodicWork$1.run(AsyncPeriodicWork.java:53)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at java.lang.Thread.run(Unknown Source)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | --------------- linked to ------------------
      INFO   | jvm 2    | 2013/11/06 13:48:11 | javax.xml.xpath.XPathExpressionException
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(Unknown Source)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at jenkins.diagnostics.ooom.Problem$Inspector.loadBuildNumberFromBuildXml(Problem.java:295)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at jenkins.diagnostics.ooom.Problem$Inspector.scan(Problem.java:222)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at jenkins.diagnostics.ooom.Problem$Inspector.inspect(Problem.java:139)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at jenkins.diagnostics.ooom.Problem.<init>(Problem.java:61)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at jenkins.diagnostics.ooom.Problem.find(Problem.java:54)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at jenkins.diagnostics.ooom.OutOfOrderBuildDetector.execute(OutOfOrderBuildDetector.java:44)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at jenkins.diagnostics.ooom.OutOfOrderBuildDetector.execute(OutOfOrderBuildDetector.java:31)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at hudson.model.AsyncPeriodicWork$1.run(AsyncPeriodicWork.java:53)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at java.lang.Thread.run(Unknown Source)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | Caused by: org.xml.sax.SAXParseException; systemId: file:/D:/build/hudson/jobs/ws-kredit-kreditansoegning%20trunk%20NB/modules/dk.nykredit.kredit.kreditansoegning$kreditansoegning-service/builds/828/build.xml; lineNumber: 1037; columnNumber: 741; Character reference "&#
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 	... 10 more
      INFO   | jvm 2    | 2013/11/06 13:48:11 | 
      

        Attachments

          Activity

          Hide
          mrebasti Marcelo Rebasti added a comment -

          clausfod,

          In the log only appears the build #828?

          Can you attach D:/build/hudson/jobs/ws-kredit-kreditansoegning%20trunk%20NB/modules/dk.nykredit.kredit.kreditansoegning$kreditansoegning-service/builds/828/build.xml to the issue?

          Marcelo Rebasti

          Show
          mrebasti Marcelo Rebasti added a comment - clausfod, In the log only appears the build #828? Can you attach D:/build/hudson/jobs/ws-kredit-kreditansoegning%20trunk%20NB/modules/dk.nykredit.kredit.kreditansoegning$kreditansoegning-service/builds/828/build.xml to the issue? Marcelo Rebasti
          Hide
          clausfod clausfod added a comment -

          @Marcelo Rebasti: Have you had time to look at the build.xml that I have attached

          Show
          clausfod clausfod added a comment - @Marcelo Rebasti: Have you had time to look at the build.xml that I have attached
          Hide
          mrebasti Marcelo Rebasti added a comment -

          clausfod,

          Sorry, this issue has took me a lot of time to reproduce it.

          The bug is a combination of claim-plugin and jacoco-plugin. When someone claims for a test failure, claim-plugin serializes the MavenModuleSetBuild with the test failure. This serialization includes all the plugins that the current job have configured.

          As your job have the jacoco-plugin configured, JacocoBuildAction it's serialized too. This class have a field called logger of type PrintStream that is serialized too with binary data, and this is what is breaking the xml. In a normal scenario, the PrintStream have to be empty, and this problem wouldn't happens. The logger instance is shared with the listener, and I think that other process was running and using that instance at the moment of claim the test failure.

          In order to fix your build.xml, you can delete manually the entire element <hudson.plugins.jacoco.JacocoBuildAction plugin="jacoco@1.0.13"> from D:/build/hudson/jobs/ws-kredit-kreditansoegning%20trunk%20NB/modules/dk.nykredit.kredit.kreditansoegning$kreditansoegning-service/builds/828/build.xml.

          I will send a PR to the jacoco-plugin, to prevent that the logger gets serialized.

          Regards.

          Marcelo Rebasti

          Show
          mrebasti Marcelo Rebasti added a comment - clausfod, Sorry, this issue has took me a lot of time to reproduce it. The bug is a combination of claim-plugin and jacoco-plugin. When someone claims for a test failure, claim-plugin serializes the MavenModuleSetBuild with the test failure. This serialization includes all the plugins that the current job have configured. As your job have the jacoco-plugin configured, JacocoBuildAction it's serialized too. This class have a field called logger of type PrintStream that is serialized too with binary data, and this is what is breaking the xml. In a normal scenario, the PrintStream have to be empty, and this problem wouldn't happens. The logger instance is shared with the listener, and I think that other process was running and using that instance at the moment of claim the test failure. In order to fix your build.xml, you can delete manually the entire element <hudson.plugins.jacoco.JacocoBuildAction plugin="jacoco@1.0.13"> from D:/build/hudson/jobs/ws-kredit-kreditansoegning%20trunk%20NB/modules/dk.nykredit.kredit.kreditansoegning$kreditansoegning-service/builds/828/build.xml. I will send a PR to the jacoco-plugin, to prevent that the logger gets serialized. Regards. Marcelo Rebasti
          Hide
          clausfod clausfod added a comment -

          Hi Marcelo,

          Thanks a lot for your help

          I have a lot of jobs with this error, and a lot of builds - so it's a hard job to delete this manually

          Is it possible to make a clean up job together with this task ?

          Best regards
          Claus Nielsen

          Show
          clausfod clausfod added a comment - Hi Marcelo, Thanks a lot for your help I have a lot of jobs with this error, and a lot of builds - so it's a hard job to delete this manually Is it possible to make a clean up job together with this task ? Best regards Claus Nielsen
          Hide
          mrebasti Marcelo Rebasti added a comment -

          I don't know if "Manage Old Data" will recognize the logger field as old data after the change, but I can give it a try and I'll tell you what happens.

          Show
          mrebasti Marcelo Rebasti added a comment - I don't know if "Manage Old Data" will recognize the logger field as old data after the change, but I can give it a try and I'll tell you what happens.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Marcelo Rebasti
          Path:
          src/main/java/hudson/plugins/jacoco/JacocoBuildAction.java
          http://jenkins-ci.org/commit/jacoco-plugin/c8090ab9df73a20f520557a590232b20348b22d6
          Log:
          [FIXED JENKINS-20440]
          Change to make JacocoBuildAction.logger transient. This will prevent the
          serialization of the PrintStream buffer.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Marcelo Rebasti Path: src/main/java/hudson/plugins/jacoco/JacocoBuildAction.java http://jenkins-ci.org/commit/jacoco-plugin/c8090ab9df73a20f520557a590232b20348b22d6 Log: [FIXED JENKINS-20440] Change to make JacocoBuildAction.logger transient. This will prevent the serialization of the PrintStream buffer.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Dominik Stadler
          Path:
          src/main/java/hudson/plugins/jacoco/JacocoBuildAction.java
          http://jenkins-ci.org/commit/jacoco-plugin/88345a6bc2d4226067f7934a105a73e5455894ae
          Log:
          Merge pull request #36 from mrebasti/jenkins-20440

          [FIXED JENKINS-20440] Don't try to serialize logger-PrintStream

          Compare: https://github.com/jenkinsci/jacoco-plugin/compare/1dae7270411f...88345a6bc2d4

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Dominik Stadler Path: src/main/java/hudson/plugins/jacoco/JacocoBuildAction.java http://jenkins-ci.org/commit/jacoco-plugin/88345a6bc2d4226067f7934a105a73e5455894ae Log: Merge pull request #36 from mrebasti/jenkins-20440 [FIXED JENKINS-20440] Don't try to serialize logger-PrintStream Compare: https://github.com/jenkinsci/jacoco-plugin/compare/1dae7270411f...88345a6bc2d4

            People

            • Assignee:
              mrebasti Marcelo Rebasti
              Reporter:
              clausfod clausfod
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: