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

xUnit plugin may crash on invalid XML files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • other
    • None
    • Platform: All, OS: All

      This is a spin-off of issue 4305, which is roughly the same issue, but for the
      older cppunit plugin.
      The attached XML output file is an edit of a file that gave me problems. CppUnit
      crashes completely, which xUnit apparently doesn't. The build that was given
      this file resulted in these lines in the build console output:

      [xUnit] [CppUnit] - Processing 18 files with the pattern
      'build/*/unittest-.xml' relative to 'workspace'.

      [xUnit] [ERROR] - Couldn't convert the file
      'workspace\build\dir\unittest-01.xml' into a JUnit file.

      That's very good, and I was sent an email with this. However, the next build
      (with the offending XML fixed) resulted in this:

      FATAL: Unable to delete workspace\xunitTemp\file-1791802469.xml

      java.io.IOException: Unable to delete workspace\xunitTemp\file-1791802469.xml

      at hudson.Util.deleteFile(Util.java:225)

      at hudson.Util.deleteRecursive(Util.java:257)

      at hudson.Util.deleteContentsRecursive(Util.java:186)

      at hudson.Util.deleteRecursive(Util.java:256)

      at hudson.FilePath$9.invoke(FilePath.java:748)

      at hudson.FilePath$9.invoke(FilePath.java:746)

      at hudson.FilePath.act(FilePath.java:676)

      at hudson.FilePath.act(FilePath.java:660)

      at hudson.FilePath.deleteRecursive(FilePath.java:746)

      at
      com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:89)

      at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27)

      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:480)

      at
      hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:466)

      at
      hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:454)

      at hudson.model.Build$RunnerImpl.post2(Build.java:146)

      at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:438)

      at hudson.model.Run.run(Run.java:1129)

      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)

      at hudson.model.ResourceController.execute(ResourceController.java:93)

      at hudson.model.Executor.run(Executor.java:122)

      And indeed I cannot delete the temp file manually either. It seems that, despite
      the nice error message in previous build, something crashed internally and is
      keeping that file open. It is listed as 0 bytes long.
      I'm running Hudson 1.321, xUnit 0.1.3, on a Windows XP machine.

      Restarting Hudson cleared the problem, but that's not a good solution

            Unassigned Unassigned
            torbent torbent
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: