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

fingerprint are truncated

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Environment:
      Oracle JDK 1.7.0_25, Jenkins Server 1.509.3 RC1 (builds on master + 1 slave)
    • Similar Issues:

      Description

      Since ~24h I have various corrupted fingerprints. Each time the file is truncated.
      I attach a sample.
      The job trying to load it display a large error misleading for developers that may don't see the real error in the build.
      Example : https://ci.exoplatform.org/job/platform-ui-master-ci/539/consoleFull

      Waiting for Jenkins to finish collecting data
      ERROR: Asynchronous execution failure
      java.util.concurrent.ExecutionException: hudson.util.IOException2: Unable to read /srv/jenkins/fingerprints/14/a9/7327d5753400da072a897d5688d5.xml
      	at hudson.remoting.Channel$4.adapt(Channel.java:705)
      	at hudson.remoting.Channel$4.adapt(Channel.java:700)
      	at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
      	at hudson.maven.AbstractMavenBuilder.waitForAsynchronousExecutions(AbstractMavenBuilder.java:185)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:105)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:66)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      	at java.lang.Thread.run(Thread.java:662)
      Caused by: hudson.util.IOException2: Unable to read /srv/jenkins/fingerprints/14/a9/7327d5753400da072a897d5688d5.xml
      	at hudson.XmlFile.read(XmlFile.java:147)
      	at hudson.model.Fingerprint.load(Fingerprint.java:981)
      	at hudson.model.Fingerprint.load(Fingerprint.java:969)
      	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.maven.reporters.MavenFingerprinter$1.call(MavenFingerprinter.java:125)
      	at hudson.maven.reporters.MavenFingerprinter$1.call(MavenFingerprinter.java:112)
      	at hudson.maven.MavenBuild$ProxyImpl.execute(MavenBuild.java:404)
      	at hudson.maven.MavenBuild$ProxyImpl2.execute(MavenBuild.java:477)
      	at sun.reflect.GeneratedMethodAccessor140.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at hudson.model.Executor$1.call(Executor.java:543)
      	at hudson.util.InterceptingProxy$1.invoke(InterceptingProxy.java:23)
      	at com.sun.proxy.$Proxy45.execute(Unknown Source)
      	at hudson.maven.MavenBuildProxy$Filter$AsyncInvoker.call(MavenBuildProxy.java:270)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:724)
      Caused by: com.thoughtworks.xstream.converters.ConversionException:  : no more data available - expected end tags </entry></usages></fingerprint> to close start tag <entry> from line 4123 and start tag <usages> from line 6 and start tag <fingerprint> from line 2, parser stopped on TEXT seen ...</ranges>\n    </entry... @4126:12 :  : no more data available - expected end tags </entry></usages></fingerprint> to close start tag <entry> from line 4123 and start tag <usages> from line 6 and start tag <fingerprint> from line 2, parser stopped on TEXT seen ...</ranges>\n    </entry... @4126:12
      ---- Debugging information ----
      message             :  : no more data available - expected end tags </entry></usages></fingerprint> to close start tag <entry> from line 4123 and start tag <usages> from line 6 and start tag <fingerprint> from line 2, parser stopped on TEXT seen ...</ranges>\n    </entry... @4126:12
      cause-exception     : com.thoughtworks.xstream.io.StreamException
      cause-message       :  : no more data available - expected end tags </entry></usages></fingerprint> to close start tag <entry> from line 4123 and start tag <usages> from line 6 and start tag <fingerprint> from line 2, parser stopped on TEXT seen ...</ranges>\n    </entry... @4126:12
      class               : java.util.Hashtable
      required-type       : java.util.Hashtable
      converter-type      : com.thoughtworks.xstream.converters.collections.MapConverter
      path                : /fingerprint/usages/entry[1030]
      line number         : 4126
      class[1]            : hudson.model.Fingerprint
      converter-type[1]   : hudson.util.RobustReflectionConverter
      version             : null
      -------------------------------
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
      	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
      	at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:333)
      	at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:275)
      	at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:222)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
      	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
      	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
      	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1061)
      	at hudson.util.XStream2.unmarshal(XStream2.java:109)
      	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1045)
      	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:925)
      	at hudson.XmlFile.read(XmlFile.java:143)
      	... 29 more
      Caused by: com.thoughtworks.xstream.io.StreamException:  : no more data available - expected end tags </entry></usages></fingerprint> to close start tag <entry> from line 4123 and start tag <usages> from line 6 and start tag <fingerprint> from line 2, parser stopped on TEXT seen ...</ranges>\n    </entry... @4126:12
      	at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:126)
      	at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:148)
      	at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:141)
      	at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:118)
      	at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveUp(AbstractPullReader.java:113)
      	at com.thoughtworks.xstream.io.ReaderWrapper.moveUp(ReaderWrapper.java:40)
      	at com.thoughtworks.xstream.io.path.PathTrackingReader.moveUp(PathTrackingReader.java:42)
      	at com.thoughtworks.xstream.converters.collections.MapConverter.populateMap(MapConverter.java:79)
      	at com.thoughtworks.xstream.converters.collections.MapConverter.populateMap(MapConverter.java:72)
      	at com.thoughtworks.xstream.converters.collections.MapConverter.unmarshal(MapConverter.java:67)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
      	... 45 more
      Caused by: java.io.EOFException: no more data available - expected end tags </entry></usages></fingerprint> to close start tag <entry> from line 4123 and start tag <usages> from line 6 and start tag <fingerprint> from line 2, parser stopped on TEXT seen ...</ranges>\n    </entry... @4126:12
      	at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3035)
      	at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
      	at org.xmlpull.mxp1.MXParser.parseEndTag(MXParser.java:1671)
      	at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1131)
      	at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
      	at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:109)
      	... 55 more
      channel stopped
      

        Attachments

          Issue Links

            Activity

            Hide
            aheritier Arnaud Héritier added a comment -

            Probably related to JENKINS-16301, I just upgraded few days ago from 1.480.3 where I didn't have this problem

            Show
            aheritier Arnaud Héritier added a comment - Probably related to JENKINS-16301 , I just upgraded few days ago from 1.480.3 where I didn't have this problem
            Hide
            aheritier Arnaud Héritier added a comment -

            Few minutes before having issues with a new truncated fingerprint i can see :

            INFO: Started Fingerprint cleanup
            

            coincidence ?
            Note that it's long to execute :

            Sep 08, 2013 6:54:20 AM hudson.model.AsyncPeriodicWork$1 run
            INFO: Started Fingerprint cleanup
            ...
            INFO: Finished Fingerprint cleanup. 6622578 ms
            Sep 09, 2013 6:54:20 AM hudson.model.AsyncPeriodicWork$1 run
            INFO: Started Fingerprint cleanup
            ...
            INFO: Finished Fingerprint cleanup. 9042842 ms
            
            Show
            aheritier Arnaud Héritier added a comment - Few minutes before having issues with a new truncated fingerprint i can see : INFO: Started Fingerprint cleanup coincidence ? Note that it's long to execute : Sep 08, 2013 6:54:20 AM hudson.model.AsyncPeriodicWork$1 run INFO: Started Fingerprint cleanup ... INFO: Finished Fingerprint cleanup. 6622578 ms Sep 09, 2013 6:54:20 AM hudson.model.AsyncPeriodicWork$1 run INFO: Started Fingerprint cleanup ... INFO: Finished Fingerprint cleanup. 9042842 ms
            Hide
            jglick Jesse Glick added a comment -

            Blocking JENKINS-16301, not depending on it.

            Show
            jglick Jesse Glick added a comment - Blocking JENKINS-16301 , not depending on it.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            changelog.html
            core/src/main/java/hudson/model/Fingerprint.java
            core/src/main/java/hudson/model/FingerprintCleanupThread.java
            http://jenkins-ci.org/commit/jenkins/7790dbcabfcfe3aeb8db54cf13673036e0548d34
            Log:
            [FIXED JENKINS-19515] Try to avoid truncation of fingerprint storage files.
            1. Use AtomicFileWriter on the hypothesis that an exception during save() caused truncation.
            2. Improve logging from the cleanup thread since that may be related to the root cause.
            3. Regardless of the cause, recover more gracefully by deleting any truncated file rather than throwing the error up.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/model/Fingerprint.java core/src/main/java/hudson/model/FingerprintCleanupThread.java http://jenkins-ci.org/commit/jenkins/7790dbcabfcfe3aeb8db54cf13673036e0548d34 Log: [FIXED JENKINS-19515] Try to avoid truncation of fingerprint storage files. 1. Use AtomicFileWriter on the hypothesis that an exception during save() caused truncation. 2. Improve logging from the cleanup thread since that may be related to the root cause. 3. Regardless of the cause, recover more gracefully by deleting any truncated file rather than throwing the error up.
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #2865
            [FIXED JENKINS-19515] Try to avoid truncation of fingerprint storage files. (Revision 7790dbcabfcfe3aeb8db54cf13673036e0548d34)

            Result = UNSTABLE
            Jesse Glick : 7790dbcabfcfe3aeb8db54cf13673036e0548d34
            Files :

            • core/src/main/java/hudson/model/Fingerprint.java
            • changelog.html
            • core/src/main/java/hudson/model/FingerprintCleanupThread.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #2865 [FIXED JENKINS-19515] Try to avoid truncation of fingerprint storage files. (Revision 7790dbcabfcfe3aeb8db54cf13673036e0548d34) Result = UNSTABLE Jesse Glick : 7790dbcabfcfe3aeb8db54cf13673036e0548d34 Files : core/src/main/java/hudson/model/Fingerprint.java changelog.html core/src/main/java/hudson/model/FingerprintCleanupThread.java
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/hudson/model/Fingerprint.java
            core/src/main/java/hudson/model/FingerprintCleanupThread.java
            http://jenkins-ci.org/commit/jenkins/3d9e5bbdccd0ed924f30d5097871e3f83b53d94c
            Log:
            [FIXED JENKINS-19515] Try to avoid truncation of fingerprint storage files.
            1. Use AtomicFileWriter on the hypothesis that an exception during save() caused truncation.
            2. Improve logging from the cleanup thread since that may be related to the root cause.
            3. Regardless of the cause, recover more gracefully by deleting any truncated file rather than throwing the error up.
            (cherry picked from commit 7790dbcabfcfe3aeb8db54cf13673036e0548d34)

            Conflicts:
            changelog.html

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/Fingerprint.java core/src/main/java/hudson/model/FingerprintCleanupThread.java http://jenkins-ci.org/commit/jenkins/3d9e5bbdccd0ed924f30d5097871e3f83b53d94c Log: [FIXED JENKINS-19515] Try to avoid truncation of fingerprint storage files. 1. Use AtomicFileWriter on the hypothesis that an exception during save() caused truncation. 2. Improve logging from the cleanup thread since that may be related to the root cause. 3. Regardless of the cause, recover more gracefully by deleting any truncated file rather than throwing the error up. (cherry picked from commit 7790dbcabfcfe3aeb8db54cf13673036e0548d34) Conflicts: changelog.html

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                aheritier Arnaud Héritier
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: