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

Running a job with a custom workspace set to eg. 'F:\' causes NullPointerException

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      2.223

      Description

      After upgrading fom ver 2.211 to ver 2.221 jobs with a drive as custom workspace throw a NullPointerException immediately:

       Running as SYSTEM
       [EnvInject] - Loading node environment variables.
       Baue auf Master in Arbeitsbereich F:\
       FATAL: null
       java.lang.NullPointerException
      	at hudson.FilePath.sibling(FilePath.java:1327)
      	at hudson.slaves.WorkspaceList.tempDir(WorkspaceList.java:306)
      	at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:868)
      	at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:852)
      	at hudson.scm.SCM.checkout(SCM.java:505)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1206)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
      	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
      	at hudson.model.Run.execute(Run.java:1856)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:428)
       ERROR: Build step failed with exception
      

        Attachments

          Issue Links

            Activity

            fsg Frank Schlottmann-Gödde created issue -
            fsg Frank Schlottmann-Gödde made changes -
            Field Original Value New Value
            Description After upgrading fom ver 2.211 to ver 2.221 jobs with a drive as custom workspace throw 
             a NullPointerException immediately:


            *00:00:00.002* Running as SYSTEM*00:00:00.002* [EnvInject] - Loading node environment variables.*00:00:00.003* Baue auf Master in Arbeitsbereich F:\*00:00:00.004* FATAL: null*00:00:00.005* java.lang.NullPointerException*00:00:00.005* at hudson.FilePath.sibling(FilePath.java:1327)*00:00:00.005* at hudson.slaves.WorkspaceList.tempDir(WorkspaceList.java:306)*00:00:00.005* at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:868)*00:00:00.005* at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:852)*00:00:00.005* at hudson.scm.SCM.checkout(SCM.java:505)*00:00:00.005* at hudson.model.AbstractProject.checkout(AbstractProject.java:1206)*00:00:00.005* at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)*00:00:00.005* at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)*00:00:00.005* at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)*00:00:00.005* at hudson.model.Run.execute(Run.java:1856)*00:00:00.005* at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)*00:00:00.005* at hudson.model.ResourceController.execute(ResourceController.java:97)*00:00:00.005* at hudson.model.Executor.run(Executor.java:428)*00:00:00.005* ERROR: Build step failed with exception
            After upgrading fom ver 2.211 to ver 2.221 jobs with a drive as custom workspace throw 
             a NullPointerException immediately:
            Running as SYSTEM
            [EnvInject] - Loading node environment variables.
            Baue auf Master in Arbeitsbereich F:\
            FATAL: null
            java.lang.NullPointerException
            at hudson.FilePath.sibling(FilePath.java:1327)
            at hudson.slaves.WorkspaceList.tempDir(WorkspaceList.java:306)
            at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:868)
            at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:852)
            at hudson.scm.SCM.checkout(SCM.java:505)
            at hudson.model.AbstractProject.checkout(AbstractProject.java:1206)
            at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
            at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
            at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
            at hudson.model.Run.execute(Run.java:1856)
            at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:428)
            ERROR: Build step failed with exception
            fsg Frank Schlottmann-Gödde made changes -
            Description After upgrading fom ver 2.211 to ver 2.221 jobs with a drive as custom workspace throw 
             a NullPointerException immediately:
            Running as SYSTEM
            [EnvInject] - Loading node environment variables.
            Baue auf Master in Arbeitsbereich F:\
            FATAL: null
            java.lang.NullPointerException
            at hudson.FilePath.sibling(FilePath.java:1327)
            at hudson.slaves.WorkspaceList.tempDir(WorkspaceList.java:306)
            at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:868)
            at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:852)
            at hudson.scm.SCM.checkout(SCM.java:505)
            at hudson.model.AbstractProject.checkout(AbstractProject.java:1206)
            at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
            at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
            at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
            at hudson.model.Run.execute(Run.java:1856)
            at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:428)
            ERROR: Build step failed with exception
            After upgrading fom ver 2.211 to ver 2.221 jobs with a drive as custom workspace throw 
             a NullPointerException immediately:


             Running as SYSTEM
             [EnvInject] - Loading node environment variables.
             Baue auf Master in Arbeitsbereich F:\
             FATAL: null
             java.lang.NullPointerException
             at hudson.FilePath.sibling(FilePath.java:1327)
             at hudson.slaves.WorkspaceList.tempDir(WorkspaceList.java:306)
             at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:868)
             at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:852)
             at hudson.scm.SCM.checkout(SCM.java:505)
             at hudson.model.AbstractProject.checkout(AbstractProject.java:1206)
             at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
             at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
             at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
             at hudson.model.Run.execute(Run.java:1856)
             at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
             at hudson.model.ResourceController.execute(ResourceController.java:97)
             at hudson.model.Executor.run(Executor.java:428)
             ERROR: Build step failed with exception
            oleg_nenashev Oleg Nenashev made changes -
            Labels regression
            Hide
            oleg_nenashev Oleg Nenashev added a comment -
            Show
            oleg_nenashev Oleg Nenashev added a comment - There is no recent changes in the codebase:  https://github.com/jenkinsci/jenkins/blame/master/core/src/main/java/hudson/FilePath.java#L1327  
            Show
            fsg Frank Schlottmann-Gödde added a comment - It is probably this: https://github.com/jenkinsci/jenkins/commit/84f66e3c4ee32b96585c580c325288d20aef104f
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Looks very plausible. AFAICT there is a bug in the code I may be able to fix quickly

            Show
            oleg_nenashev Oleg Nenashev added a comment - Looks very plausible. AFAICT there is a bug in the code I may be able to fix quickly
            oleg_nenashev Oleg Nenashev made changes -
            Assignee Oleg Nenashev [ oleg_nenashev ]
            oleg_nenashev Oleg Nenashev made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Link This issue is caused by JENKINS-60634 [ JENKINS-60634 ]
            jglick Jesse Glick made changes -
            Labels regression regression windows
            jglick Jesse Glick made changes -
            Description After upgrading fom ver 2.211 to ver 2.221 jobs with a drive as custom workspace throw 
             a NullPointerException immediately:


             Running as SYSTEM
             [EnvInject] - Loading node environment variables.
             Baue auf Master in Arbeitsbereich F:\
             FATAL: null
             java.lang.NullPointerException
             at hudson.FilePath.sibling(FilePath.java:1327)
             at hudson.slaves.WorkspaceList.tempDir(WorkspaceList.java:306)
             at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:868)
             at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:852)
             at hudson.scm.SCM.checkout(SCM.java:505)
             at hudson.model.AbstractProject.checkout(AbstractProject.java:1206)
             at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
             at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
             at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
             at hudson.model.Run.execute(Run.java:1856)
             at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
             at hudson.model.ResourceController.execute(ResourceController.java:97)
             at hudson.model.Executor.run(Executor.java:428)
             ERROR: Build step failed with exception
            After upgrading fom ver 2.211 to ver 2.221 jobs with a drive as custom workspace throw 
             a NullPointerException immediately:

            {code:none}
             Running as SYSTEM
             [EnvInject] - Loading node environment variables.
             Baue auf Master in Arbeitsbereich F:\
             FATAL: null
             java.lang.NullPointerException
            at hudson.FilePath.sibling(FilePath.java:1327)
            at hudson.slaves.WorkspaceList.tempDir(WorkspaceList.java:306)
            at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:868)
            at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:852)
            at hudson.scm.SCM.checkout(SCM.java:505)
            at hudson.model.AbstractProject.checkout(AbstractProject.java:1206)
            at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
            at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
            at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
            at hudson.model.Run.execute(Run.java:1856)
            at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:428)
             ERROR: Build step failed with exception
            {code}
            jglick Jesse Glick made changes -
            Description After upgrading fom ver 2.211 to ver 2.221 jobs with a drive as custom workspace throw 
             a NullPointerException immediately:

            {code:none}
             Running as SYSTEM
             [EnvInject] - Loading node environment variables.
             Baue auf Master in Arbeitsbereich F:\
             FATAL: null
             java.lang.NullPointerException
            at hudson.FilePath.sibling(FilePath.java:1327)
            at hudson.slaves.WorkspaceList.tempDir(WorkspaceList.java:306)
            at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:868)
            at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:852)
            at hudson.scm.SCM.checkout(SCM.java:505)
            at hudson.model.AbstractProject.checkout(AbstractProject.java:1206)
            at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
            at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
            at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
            at hudson.model.Run.execute(Run.java:1856)
            at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:428)
             ERROR: Build step failed with exception
            {code}
            After upgrading fom ver 2.211 to ver 2.221 jobs with a drive as custom workspace throw a {{NullPointerException}} immediately:

            {code:none}
             Running as SYSTEM
             [EnvInject] - Loading node environment variables.
             Baue auf Master in Arbeitsbereich F:\
             FATAL: null
             java.lang.NullPointerException
            at hudson.FilePath.sibling(FilePath.java:1327)
            at hudson.slaves.WorkspaceList.tempDir(WorkspaceList.java:306)
            at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:868)
            at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:852)
            at hudson.scm.SCM.checkout(SCM.java:505)
            at hudson.model.AbstractProject.checkout(AbstractProject.java:1206)
            at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
            at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
            at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
            at hudson.model.Run.execute(Run.java:1856)
            at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:428)
             ERROR: Build step failed with exception
            {code}
            Hide
            jglick Jesse Glick added a comment -

            FilePath.sibling is broken for root directories. Should probably just read something like

            FilePath parent = getParent();
            return parent != null ? parent.child(rel) : child(rel);
            

            Note that this setup probably caused errors in some circumstances even before JENKINS-60634, for example if you tried to use the Credentials Binding plugin with a secret file, but the recent change would have made it happen consistently.

            Show
            jglick Jesse Glick added a comment - FilePath.sibling is broken for root directories. Should probably just read something like FilePath parent = getParent(); return parent != null ? parent.child(rel) : child(rel); Note that this setup probably caused errors in some circumstances even before JENKINS-60634 , for example if you tried to use the Credentials Binding plugin with a secret file, but the recent change would have made it happen consistently.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            https://github.com/jenkinsci/jenkins/pull/4526 - my draft. It is a bit different from what Jesse suggested

            Show
            oleg_nenashev Oleg Nenashev added a comment - https://github.com/jenkinsci/jenkins/pull/4526  - my draft. It is a bit different from what Jesse suggested
            oleg_nenashev Oleg Nenashev made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "workflow-durable-task-step #129 (Web Link)" [ 24523 ]
            Hide
            jglick Jesse Glick added a comment -

            I filed a variant patch, plus a plugin one.

            Show
            jglick Jesse Glick added a comment - I filed a variant patch, plus a plugin one.
            jglick Jesse Glick made changes -
            Remote Link This issue links to "jenkins #4527 (Web Link)" [ 24524 ]
            jglick Jesse Glick made changes -
            Labels regression windows lts-candidate regression
            oleg_nenashev Oleg Nenashev made changes -
            Component/s workflow-durable-task-step-plugin [ 21715 ]
            jglick Jesse Glick made changes -
            Assignee Oleg Nenashev [ oleg_nenashev ] Jesse Glick [ jglick ]
            jglick Jesse Glick made changes -
            Released As 2.223
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            olivergondza Oliver Gondža made changes -
            Labels lts-candidate regression 2.222.1-fixed regression
            olivergondza Oliver Gondža made changes -
            Labels 2.222.1-fixed regression 2.222.1-rejected regression
            Hide
            olivergondza Oliver Gondža added a comment -

            Contrary to what the labels have indicated, this was not fixed in 2.222.1 nor in any other release of that LTS line.

            Show
            olivergondza Oliver Gondža added a comment - Contrary to what the labels have indicated, this was not fixed in 2.222.1 nor in any other release of that LTS line.

              People

              Assignee:
              jglick Jesse Glick
              Reporter:
              fsg Frank Schlottmann-Gödde
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: