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

XmlPullParserException when reading corrupted fingerprint file.

    Details

    • Similar Issues:

      Description

      After a power failure a bunch of fingerprint files were corrupted and were just filled with 5kb of null chars. This caused any build that ran after to fail on the copyartifacts task. It should probably be made to handle parse exceptions.

      As I understand it there is a fingerprint cleanup thread that runs periodically, can it be triggered manually? and will it remove fingerprint files that can't be parsed?

      To fix the below error I just deleted all the corrupted files.

      ERROR: Failed to copy artifacts from Workspace Processor with filter: install/**
      hudson.util.IOException2: Failed to copy D:\jenkins\jobs\Workspace Processor\builds\2012-10-22_07-43-43\archive\install\Proxy\build.xml to D:\jenkins\jobs\Common\workspace\install\Proxy\build.xml
      at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyOne(FingerprintingCopyMethod.java:97)
      at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyAll(FingerprintingCopyMethod.java:64)
      at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:243)
      at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:215)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:807)
      at hudson.model.Build$BuildExecution.build(Build.java:199)
      at hudson.model.Build$BuildExecution.doRun(Build.java:160)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:589)
      at hudson.model.Run.execute(Run.java:1516)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:236)
      Caused by: hudson.util.IOException2: Unable to read D:\jenkins\fingerprints\0a\f0\9d4fd69dbb48671e2b504323d9b8.xml
      at hudson.XmlFile.read(XmlFile.java:139)
      at hudson.model.Fingerprint.load(Fingerprint.java:910)
      at hudson.model.Fingerprint.load(Fingerprint.java:898)
      at hudson.model.FingerprintMap.load(FingerprintMap.java:94)
      at hudson.model.FingerprintMap.load(FingerprintMap.java:45)
      at hudson.util.KeyedDataStorage.get(KeyedDataStorage.java:154)
      at hudson.model.FingerprintMap.get(FingerprintMap.java:79)
      at hudson.model.FingerprintMap.get(FingerprintMap.java:45)
      at hudson.util.KeyedDataStorage.getOrCreate(KeyedDataStorage.java:108)
      at hudson.model.FingerprintMap.getOrCreate(FingerprintMap.java:65)
      at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyOne(FingerprintingCopyMethod.java:90)
      ... 12 more
      Caused by: com.thoughtworks.xstream.io.StreamException: : only whitespace content allowed before start tag and not \u0 (position: START_DOCUMENT seen \u0... @1:1)
      at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:78)
      at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:154)
      at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:147)
      at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:126)
      at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveDown(AbstractPullReader.java:111)
      at com.thoughtworks.xstream.io.xml.XppReader.<init>(XppReader.java:48)
      at com.thoughtworks.xstream.io.xml.XppDriver.createReader(XppDriver.java:44)
      at com.thoughtworks.xstream.io.xml.XppDriver.createReader(XppDriver.java:49)
      at com.thoughtworks.xstream.XStream.fromXML(XStream.java:864)
      at hudson.XmlFile.read(XmlFile.java:137)
      ... 22 more
      Caused by: org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not \u0 (position: START_DOCUMENT seen \u0... @1:1)
      at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519)
      at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
      at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
      at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:63)
      ... 31 more

        Attachments

          Activity

          Hide
          cjo9900 cjo9900 added a comment -

          As you mention there is a clean up thread, however triggering it will not resolve the problem if there are corrupt fingerprint files.

          as when that runs it calls the same FingerPrint.load [1], as is called in the stack above and receives the same exception, which just causes it to log a warning [2], but does not delete the file.

          I would suggest that this is a core issue as much as copy artifact plugin one.
          Though the copy artifact plugin could be defensive and just not generate the fingerprints in these cases, and flag a warning in the logs. at [3].

          [1] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Fingerprint.java#L900
          [2] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/FingerprintCleanupThread.java#L102
          [3] https://github.com/jenkinsci/copyartifact-plugin/blob/master/src/main/java/hudson/plugins/copyartifact/FingerprintingCopyMethod.java#L98

          Show
          cjo9900 cjo9900 added a comment - As you mention there is a clean up thread, however triggering it will not resolve the problem if there are corrupt fingerprint files. as when that runs it calls the same FingerPrint.load [1] , as is called in the stack above and receives the same exception, which just causes it to log a warning [2] , but does not delete the file. I would suggest that this is a core issue as much as copy artifact plugin one. Though the copy artifact plugin could be defensive and just not generate the fingerprints in these cases, and flag a warning in the logs. at [3] . [1] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Fingerprint.java#L900 [2] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/FingerprintCleanupThread.java#L102 [3] https://github.com/jenkinsci/copyartifact-plugin/blob/master/src/main/java/hudson/plugins/copyartifact/FingerprintingCopyMethod.java#L98
          Hide
          andrewk Andrew Kujtan added a comment -

          Thanks for looking into this, I would vote to be more defensive here as it will break the build from something that is possibly unrelated as just one bad fingerprint file will break it. From what you have shown I do agree that this should probably be handled in core better as well.

          Show
          andrewk Andrew Kujtan added a comment - Thanks for looking into this, I would vote to be more defensive here as it will break the build from something that is possibly unrelated as just one bad fingerprint file will break it. From what you have shown I do agree that this should probably be handled in core better as well.
          Hide
          anilkumar_y108 anil kumar added a comment -

          09:56:07 [ERROR] BUILD ERROR
          09:56:07 [INFO] ------------------------------------------------------------------------
          09:56:07 [INFO] Error installing artifact's metadata: Error installing metadata: Error updating group repository metadata
          09:56:07
          09:56:07 only whitespace content allowed before start tag and not \u0 (position: START_DOCUMENT seen \u0... @1:1)
          09:56:07 [INFO] ------------------------------------------------------------------------
          09:56:07 [INFO] For more information, run Maven with the -e switch
          09:56:07 [INFO] ------------------------------------------------------------------------
          09:56:07 [INFO] Total time: 1 minute 43 seconds
          09:56:07 [INFO] Finished at: Mon May 06 09:56:08 IST 2013
          09:56:08 [INFO] Final Memory: 56M/135M
          09:56:08 [INFO] ------------------------------------------------------------------------
          09:56:08 ERROR: Asynchronous execution failure
          09:56:08 java.util.concurrent.ExecutionException: hudson.util.IOException2: Unable to read E:\jenkins\fingerprints\c4\c5\a77f9e61f33d80780176451d71c2.xml
          09:56:08 at hudson.remoting.Channel$3.adapt(Channel.java:679)
          09:56:08 at hudson.remoting.Channel$3.adapt(Channel.java:674)
          09:56:08 at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
          09:56:08 at hudson.maven.AbstractMavenBuilder.waitForAsynchronousExecutions(AbstractMavenBuilder.java:185)
          09:56:08 at hudson.maven.MavenBuilder.call(MavenBuilder.java:156)
          09:56:08 at hudson.maven.Maven2Builder.call(Maven2Builder.java:77)
          09:56:08 at hudson.maven.Maven2Builder.call(Maven2Builder.java:53)
          09:56:08 at hudson.remoting.UserRequest.perform(UserRequest.java:118)
          09:56:08 at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          09:56:08 at hudson.remoting.Request$2.run(Request.java:287)
          09:56:08 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
          09:56:08 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          09:56:08 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          09:56:08 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          09:56:08 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          09:56:08 at java.lang.Thread.run(Thread.java:662)
          09:56:08 Caused by: hudson.util.IOException2: Unable to read E:\jenkins\fingerprints\c4\c5\a77f9e61f33d80780176451d71c2.xml
          09:56:08 at hudson.XmlFile.read(XmlFile.java:135)
          09:56:08 at hudson.model.Fingerprint.load(Fingerprint.java:910)
          09:56:08 at hudson.model.Fingerprint.load(Fingerprint.java:898)
          09:56:08 at hudson.model.FingerprintMap.load(FingerprintMap.java:94)
          09:56:08 at hudson.model.FingerprintMap.load(FingerprintMap.java:45)
          09:56:08 at hudson.util.KeyedDataStorage.get(KeyedDataStorage.java:154)
          09:56:08 at hudson.model.FingerprintMap.get(FingerprintMap.java:79)
          09:56:08 at hudson.model.FingerprintMap.get(FingerprintMap.java:45)
          09:56:08 at hudson.util.KeyedDataStorage.getOrCreate(KeyedDataStorage.java:108)
          09:56:08 at hudson.model.FingerprintMap.getOrCreate(FingerprintMap.java:65)
          09:56:08 at hudson.maven.reporters.MavenFingerprinter$1.call(MavenFingerprinter.java:125)
          09:56:08 at hudson.maven.reporters.MavenFingerprinter$1.call(MavenFingerprinter.java:112)
          09:56:08 at hudson.maven.MavenBuild$ProxyImpl.execute(MavenBuild.java:389)
          09:56:08 at hudson.maven.MavenBuild$ProxyImpl2.execute(MavenBuild.java:462)
          09:56:08 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          09:56:08 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          09:56:08 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          09:56:08 at java.lang.reflect.Method.invoke(Unknown Source)
          09:56:08 at hudson.model.Executor$1.call(Executor.java:534)
          09:56:08 at hudson.util.InterceptingProxy$1.invoke(InterceptingProxy.java:23)
          09:56:08 at $Proxy44.execute(Unknown Source)
          09:56:08 at hudson.maven.MavenBuildProxy$Filter$AsyncInvoker.call(MavenBuildProxy.java:270)
          09:56:08 at hudson.remoting.UserRequest.perform(UserRequest.java:118)
          09:56:08 at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          09:56:08 at hudson.remoting.Request$2.run(Request.java:287)
          09:56:08 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
          09:56:08 at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
          09:56:08 at java.util.concurrent.FutureTask.run(Unknown Source)
          09:56:08 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
          09:56:08 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          09:56:08 at java.lang.Thread.run(Unknown Source)
          09:56:08 Caused by: com.thoughtworks.xstream.io.StreamException: : only whitespace content allowed before start tag and not \u0 (position: START_DOCUMENT seen \u0... @1:1)
          09:56:08 at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:78)
          09:56:08 at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:154)
          09:56:08 at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:147)
          09:56:08 at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:126)
          09:56:08 at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveDown(AbstractPullReader.java:111)
          09:56:08 at com.thoughtworks.xstream.io.xml.XppReader.<init>(XppReader.java:48)
          09:56:08 at com.thoughtworks.xstream.io.xml.XppDriver.createReader(XppDriver.java:44)
          09:56:08 at com.thoughtworks.xstream.io.xml.XppDriver.createReader(XppDriver.java:49)
          09:56:08 at com.thoughtworks.xstream.XStream.fromXML(XStream.java:864)
          09:56:08 at hudson.XmlFile.read(XmlFile.java:133)
          09:56:08 ... 30 more
          09:56:08 Caused by: org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not \u0 (position: START_DOCUMENT seen \u0... @1:1)

          For me also getting same error..Please help me how to resolve this issue..

          Show
          anilkumar_y108 anil kumar added a comment - 09:56:07 [ERROR] BUILD ERROR 09:56:07 [INFO] ------------------------------------------------------------------------ 09:56:07 [INFO] Error installing artifact's metadata: Error installing metadata: Error updating group repository metadata 09:56:07 09:56:07 only whitespace content allowed before start tag and not \u0 (position: START_DOCUMENT seen \u0... @1:1) 09:56:07 [INFO] ------------------------------------------------------------------------ 09:56:07 [INFO] For more information, run Maven with the -e switch 09:56:07 [INFO] ------------------------------------------------------------------------ 09:56:07 [INFO] Total time: 1 minute 43 seconds 09:56:07 [INFO] Finished at: Mon May 06 09:56:08 IST 2013 09:56:08 [INFO] Final Memory: 56M/135M 09:56:08 [INFO] ------------------------------------------------------------------------ 09:56:08 ERROR: Asynchronous execution failure 09:56:08 java.util.concurrent.ExecutionException: hudson.util.IOException2: Unable to read E:\jenkins\fingerprints\c4\c5\a77f9e61f33d80780176451d71c2.xml 09:56:08 at hudson.remoting.Channel$3.adapt(Channel.java:679) 09:56:08 at hudson.remoting.Channel$3.adapt(Channel.java:674) 09:56:08 at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55) 09:56:08 at hudson.maven.AbstractMavenBuilder.waitForAsynchronousExecutions(AbstractMavenBuilder.java:185) 09:56:08 at hudson.maven.MavenBuilder.call(MavenBuilder.java:156) 09:56:08 at hudson.maven.Maven2Builder.call(Maven2Builder.java:77) 09:56:08 at hudson.maven.Maven2Builder.call(Maven2Builder.java:53) 09:56:08 at hudson.remoting.UserRequest.perform(UserRequest.java:118) 09:56:08 at hudson.remoting.UserRequest.perform(UserRequest.java:48) 09:56:08 at hudson.remoting.Request$2.run(Request.java:287) 09:56:08 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 09:56:08 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 09:56:08 at java.util.concurrent.FutureTask.run(FutureTask.java:138) 09:56:08 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 09:56:08 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 09:56:08 at java.lang.Thread.run(Thread.java:662) 09:56:08 Caused by: hudson.util.IOException2: Unable to read E:\jenkins\fingerprints\c4\c5\a77f9e61f33d80780176451d71c2.xml 09:56:08 at hudson.XmlFile.read(XmlFile.java:135) 09:56:08 at hudson.model.Fingerprint.load(Fingerprint.java:910) 09:56:08 at hudson.model.Fingerprint.load(Fingerprint.java:898) 09:56:08 at hudson.model.FingerprintMap.load(FingerprintMap.java:94) 09:56:08 at hudson.model.FingerprintMap.load(FingerprintMap.java:45) 09:56:08 at hudson.util.KeyedDataStorage.get(KeyedDataStorage.java:154) 09:56:08 at hudson.model.FingerprintMap.get(FingerprintMap.java:79) 09:56:08 at hudson.model.FingerprintMap.get(FingerprintMap.java:45) 09:56:08 at hudson.util.KeyedDataStorage.getOrCreate(KeyedDataStorage.java:108) 09:56:08 at hudson.model.FingerprintMap.getOrCreate(FingerprintMap.java:65) 09:56:08 at hudson.maven.reporters.MavenFingerprinter$1.call(MavenFingerprinter.java:125) 09:56:08 at hudson.maven.reporters.MavenFingerprinter$1.call(MavenFingerprinter.java:112) 09:56:08 at hudson.maven.MavenBuild$ProxyImpl.execute(MavenBuild.java:389) 09:56:08 at hudson.maven.MavenBuild$ProxyImpl2.execute(MavenBuild.java:462) 09:56:08 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 09:56:08 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 09:56:08 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 09:56:08 at java.lang.reflect.Method.invoke(Unknown Source) 09:56:08 at hudson.model.Executor$1.call(Executor.java:534) 09:56:08 at hudson.util.InterceptingProxy$1.invoke(InterceptingProxy.java:23) 09:56:08 at $Proxy44.execute(Unknown Source) 09:56:08 at hudson.maven.MavenBuildProxy$Filter$AsyncInvoker.call(MavenBuildProxy.java:270) 09:56:08 at hudson.remoting.UserRequest.perform(UserRequest.java:118) 09:56:08 at hudson.remoting.UserRequest.perform(UserRequest.java:48) 09:56:08 at hudson.remoting.Request$2.run(Request.java:287) 09:56:08 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 09:56:08 at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) 09:56:08 at java.util.concurrent.FutureTask.run(Unknown Source) 09:56:08 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) 09:56:08 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 09:56:08 at java.lang.Thread.run(Unknown Source) 09:56:08 Caused by: com.thoughtworks.xstream.io.StreamException: : only whitespace content allowed before start tag and not \u0 (position: START_DOCUMENT seen \u0... @1:1) 09:56:08 at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:78) 09:56:08 at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:154) 09:56:08 at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:147) 09:56:08 at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:126) 09:56:08 at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveDown(AbstractPullReader.java:111) 09:56:08 at com.thoughtworks.xstream.io.xml.XppReader.<init>(XppReader.java:48) 09:56:08 at com.thoughtworks.xstream.io.xml.XppDriver.createReader(XppDriver.java:44) 09:56:08 at com.thoughtworks.xstream.io.xml.XppDriver.createReader(XppDriver.java:49) 09:56:08 at com.thoughtworks.xstream.XStream.fromXML(XStream.java:864) 09:56:08 at hudson.XmlFile.read(XmlFile.java:133) 09:56:08 ... 30 more 09:56:08 Caused by: org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not \u0 (position: START_DOCUMENT seen \u0... @1:1) For me also getting same error..Please help me how to resolve this issue..
          Hide
          ikedam ikedam added a comment -

          There's nothing copyartifact can do as it's the feature of Jenkins core.
          The lastest copyartifact provides disabled fingerprinting when copying artifacts, and it may avoid this problem (of course, useful only if you don't need fingerprinting).

          Show
          ikedam ikedam added a comment - There's nothing copyartifact can do as it's the feature of Jenkins core. The lastest copyartifact provides disabled fingerprinting when copying artifacts, and it may avoid this problem (of course, useful only if you don't need fingerprinting).

            People

            • Assignee:
              Unassigned
              Reporter:
              andrewk Andrew Kujtan
            • Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: