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

Improve diagnostics: Failed to write into slave jar cache

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: remoting
    • Labels:
      None
    • Similar Issues:

      Description

      Slave got stuck in a state unable to load any classes/resources from master.

      The jar was not written nor the C1 directory was created. I suspect the failure to create directory is silently ignored at https://github.com/jenkinsci/remoting/blob/3622f876e1b1f7548c9e7db0d4d09b76d80c87cc/src/main/java/hudson/remoting/FileSystemJarCache.java#L67

      java.lang.Error: Failed to load resources META-INF/services/org.codehaus.groovy.transform.ASTTransformation
        at hudson.remoting.RemoteClassLoader.findResources(RemoteClassLoader.java:441)
        at java.lang.ClassLoader.getResources(ClassLoader.java:1185)
        at java.lang.ClassLoader.getResources(ClassLoader.java:1181)
        at org.codehaus.groovy.transform.ASTTransformationVisitor.doAddGlobalTransforms(ASTTransformationVisitor.java:194)
        at org.codehaus.groovy.transform.ASTTransformationVisitor.addGlobalTransforms(ASTTransformationVisitor.java:187)
        at org.codehaus.groovy.transform.ASTTransformationVisitor.addPhaseOperations(ASTTransformationVisitor.java:150)
        at org.codehaus.groovy.control.CompilationUnit.<init>(CompilationUnit.java:186)
        at org.codehaus.groovy.control.CompilationUnit.<init>(CompilationUnit.java:118)
        at groovy.lang.GroovyClassLoader.createCompilationUnit(GroovyClassLoader.java:476)
        at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:290)
        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:281)
        at groovy.lang.GroovyShell.parseClass(GroovyShell.java:731)
        at groovy.lang.GroovyShell.parse(GroovyShell.java:743)
        at groovy.lang.GroovyShell.evaluate(GroovyShell.java:578)
        at groovy.lang.GroovyShell.evaluate(GroovyShell.java:618)
        at groovy.lang.GroovyShell.evaluate(GroovyShell.java:589)
        at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:142)
        at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:114)
        at hudson.remoting.UserRequest.perform(UserRequest.java:121)
        at hudson.remoting.UserRequest.perform(UserRequest.java:49)
        at hudson.remoting.Request$2.run(Request.java:326)
        at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        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:745)
      Caused by: java.util.concurrent.ExecutionException: java.io.IOException: Failed to write to /mnt/hudson_workspace/.slave-jar-cache/C1/0C4793948699B26CD895B765D03C6A.jar
        at hudson.remoting.AsyncFutureImpl.get(AsyncFutureImpl.java:75)
        at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
        at hudson.remoting.RemoteClassLoader.findResources(RemoteClassLoader.java:437)
        ... 25 more
      Caused by: java.io.IOException: Failed to write to /mnt/hudson_workspace/.slave-jar-cache/C1/0C4793948699B26CD895B765D03C6A.jar
        at hudson.remoting.FileSystemJarCache.retrieve(FileSystemJarCache.java:112)
        at hudson.remoting.JarCacheSupport$1.run(JarCacheSupport.java:64)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
        ... 1 more
      Caused by: java.io.IOException: No such file or directory
        at java.io.UnixFileSystem.createFileExclusively(Native Method)
        at java.io.File.createTempFile(File.java:2001)
        at hudson.remoting.FileSystemJarCache.retrieve(FileSystemJarCache.java:69)
        ... 5 more
      

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oliver Gondža
            Path:
            pom.xml
            src/main/java/hudson/remoting/FileSystemJarCache.java
            src/main/java/hudson/remoting/InitializeJarCacheMain.java
            src/main/java/hudson/remoting/Util.java
            src/test/java/hudson/remoting/FileSystemJarCacheTest.java
            src/test/java/hudson/remoting/UtilTest.java
            http://jenkins-ci.org/commit/remoting/62aad35f64c46d0c41a5d464ccba8c78b784f9d7
            Log:
            Improve diagnostics for JarCache write errors (JENKINS-36947) (#91)

            Improve diagnostics for JarCache write errors (related to JENKINS-36947)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: pom.xml src/main/java/hudson/remoting/FileSystemJarCache.java src/main/java/hudson/remoting/InitializeJarCacheMain.java src/main/java/hudson/remoting/Util.java src/test/java/hudson/remoting/FileSystemJarCacheTest.java src/test/java/hudson/remoting/UtilTest.java http://jenkins-ci.org/commit/remoting/62aad35f64c46d0c41a5d464ccba8c78b784f9d7 Log: Improve diagnostics for JarCache write errors ( JENKINS-36947 ) (#91) Improve diagnostics for JarCache write errors (related to JENKINS-36947 )
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Oliver Gondža I suppose it's a diagnostics issue, and JENKINS-37057 represents the real cause. Right?

            Show
            oleg_nenashev Oleg Nenashev added a comment - Oliver Gondža I suppose it's a diagnostics issue, and JENKINS-37057 represents the real cause. Right?
            Hide
            olivergondza Oliver Gondža added a comment -

            Correct

            Show
            olivergondza Oliver Gondža added a comment - Correct
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            So this one can be closed, I suppose

            Show
            oleg_nenashev Oleg Nenashev added a comment - So this one can be closed, I suppose
            Hide
            olivergondza Oliver Gondža added a comment -

            Yes, we will fix the causes as they appear.

            Show
            olivergondza Oliver Gondža added a comment - Yes, we will fix the causes as they appear.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            CHANGELOG.md
            http://jenkins-ci.org/commit/remoting/b8f10d80982989a701a3ad946e6fbc01f4b6a403
            Log:
            Changelog: Update link to JENKINS-36947 in 2.61

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: CHANGELOG.md http://jenkins-ci.org/commit/remoting/b8f10d80982989a701a3ad946e6fbc01f4b6a403 Log: Changelog: Update link to JENKINS-36947 in 2.61

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              olivergondza Oliver Gondža
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: