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

NPE in CliGitAPIImpl.launchCommandIn() caused by InterruptedException

    • 4.7.0

      We occasionaly experience failed git checkouts when an InterruptedException is raised to abort a job. This causes a job to have the result FAILURE instead of ABORTED. 

      InterruptedException doesn't have a message and the code in CliGitAPIImpl accesses the message without null check. Two example stack traces (line numbers originate from plugin build from https://github.com/jenkinsci/git-client-plugin/pull/1103, git-client:4.6.1-rc3518.4c581ea_f4c3d):

      ERROR: Checkout failed
      java.lang.NullPointerException
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:871)
      at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1222)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1305)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
      at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
      at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
      at hudson.model.ResourceController.execute(ResourceController.java:101)
      at hudson.model.Executor.run(Executor.java:442)
      ERROR: Maximum checkout retry attempts reached, aborting
      Finished: FAILURE

      ERROR: Checkout failed
      java.lang.NullPointerException
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2766)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2761)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2051)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2063)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:1115)
      at hudson.plugins.git.GitAPI.revParse(GitAPI.java:419)
      at hudson.plugins.git.util.DefaultBuildChooser.getCandidateRevisions(DefaultBuildChooser.java:60)
      at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1148)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1306)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
      at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
      at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
      at hudson.model.ResourceController.execute(ResourceController.java:101)
      at hudson.model.Executor.run(Executor.java:442)
      ERROR: Maximum checkout retry attempts reached, aborting
      Finished: FAILURE

       

      Caused by this code section:

      } catch (GitException | InterruptedException e) {
          if (e.getMessage().contains("unsupported option \"accept-new\"")) { // causing NPE if getMessage() returns null
              listener.getLogger().println(HyperlinkNote.encodeTo("https://plugins.jenkins.io/git-client/#plugin-content-ssh-host-key-                     verification","If you are using OpenSSH < 7.6 please choose another strategy to verify ssh host key in 'Manage Jenkins' -> 'Configure Global Security' -> 'Git Host Key Verification Configuration'"));}throw e;
       

          [JENKINS-72819] NPE in CliGitAPIImpl.launchCommandIn() caused by InterruptedException

          Christoph Kulla created issue -
          Christoph Kulla made changes -
          Description Original: We occasionaly experience failed git checkouts when an InterruptedException is raised to abort a job. This causes a job to have the result FAILURE instead of ABORTED. 

          InterruptedException doesn't have a message and the code in CliGitAPIImpl accesses the message without null check. Two example stack traces (line numbers originate from plugin build from [https://github.com/jenkinsci/git-client-plugin/pull/1103):]
          git-client:4.6.1-rc3518.4c581ea_f4c3d

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:871)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1222)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1305)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2766)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2761)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2051)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2063)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:1115)
          at hudson.plugins.git.GitAPI.revParse(GitAPI.java:419)
          at hudson.plugins.git.util.DefaultBuildChooser.getCandidateRevisions(DefaultBuildChooser.java:60)
          at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1148)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1306)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE
          New: We occasionaly experience failed git checkouts when an InterruptedException is raised to abort a job. This causes a job to have the result FAILURE instead of ABORTED. 

          InterruptedException doesn't have a message and the code in CliGitAPIImpl accesses the message without null check. Two example stack traces (line numbers originate from plugin build from [https://github.com/jenkinsci/git-client-plugin/pull/1103. |https://github.com/jenkinsci/git-client-plugin/pull/1103):]git-client:4.6.1-rc3518.4c581ea_f4c3d):

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:871)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1222)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1305)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2766)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2761)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2051)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2063)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:1115)
          at hudson.plugins.git.GitAPI.revParse(GitAPI.java:419)
          at hudson.plugins.git.util.DefaultBuildChooser.getCandidateRevisions(DefaultBuildChooser.java:60)
          at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1148)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1306)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE
          Christoph Kulla made changes -
          Description Original: We occasionaly experience failed git checkouts when an InterruptedException is raised to abort a job. This causes a job to have the result FAILURE instead of ABORTED. 

          InterruptedException doesn't have a message and the code in CliGitAPIImpl accesses the message without null check. Two example stack traces (line numbers originate from plugin build from [https://github.com/jenkinsci/git-client-plugin/pull/1103. |https://github.com/jenkinsci/git-client-plugin/pull/1103):]git-client:4.6.1-rc3518.4c581ea_f4c3d):

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:871)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1222)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1305)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2766)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2761)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2051)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2063)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:1115)
          at hudson.plugins.git.GitAPI.revParse(GitAPI.java:419)
          at hudson.plugins.git.util.DefaultBuildChooser.getCandidateRevisions(DefaultBuildChooser.java:60)
          at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1148)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1306)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE
          New: We occasionaly experience failed git checkouts when an InterruptedException is raised to abort a job. This causes a job to have the result FAILURE instead of ABORTED. 

          InterruptedException doesn't have a message and the code in CliGitAPIImpl accesses the message without null check. Two example stack traces (line numbers originate from plugin build from [https://github.com/jenkinsci/git-client-plugin/pull/1103, |https://github.com/jenkinsci/git-client-plugin/pull/1103):]git-client:4.6.1-rc3518.4c581ea_f4c3d):

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:871)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1222)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1305)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2766)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2761)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2051)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2063)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:1115)
          at hudson.plugins.git.GitAPI.revParse(GitAPI.java:419)
          at hudson.plugins.git.util.DefaultBuildChooser.getCandidateRevisions(DefaultBuildChooser.java:60)
          at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1148)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1306)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE

           

          Caused by this code section:

           
          } catch (GitException | InterruptedException e) {
          if (e.getMessage().contains("unsupported option \"accept-new\"")) { // causing NPE in getMessage() returns null
          listener.getLogger().println(HyperlinkNote.encodeTo("https://plugins.jenkins.io/git-client/#plugin-content-ssh-host-key-verification",
          "If you are using OpenSSH < 7.6 please choose another strategy to verify ssh host key in 'Manage Jenkins' -> 'Configure Global Security' -> 'Git Host Key Verification Configuration'"));
          }
          throw e;
           
          Christoph Kulla made changes -
          Description Original: We occasionaly experience failed git checkouts when an InterruptedException is raised to abort a job. This causes a job to have the result FAILURE instead of ABORTED. 

          InterruptedException doesn't have a message and the code in CliGitAPIImpl accesses the message without null check. Two example stack traces (line numbers originate from plugin build from [https://github.com/jenkinsci/git-client-plugin/pull/1103, |https://github.com/jenkinsci/git-client-plugin/pull/1103):]git-client:4.6.1-rc3518.4c581ea_f4c3d):

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:871)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1222)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1305)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2766)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2761)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2051)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2063)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:1115)
          at hudson.plugins.git.GitAPI.revParse(GitAPI.java:419)
          at hudson.plugins.git.util.DefaultBuildChooser.getCandidateRevisions(DefaultBuildChooser.java:60)
          at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1148)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1306)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE

           

          Caused by this code section:

           
          } catch (GitException | InterruptedException e) {
          if (e.getMessage().contains("unsupported option \"accept-new\"")) { // causing NPE in getMessage() returns null
          listener.getLogger().println(HyperlinkNote.encodeTo("https://plugins.jenkins.io/git-client/#plugin-content-ssh-host-key-verification",
          "If you are using OpenSSH < 7.6 please choose another strategy to verify ssh host key in 'Manage Jenkins' -> 'Configure Global Security' -> 'Git Host Key Verification Configuration'"));
          }
          throw e;
           
          New: We occasionaly experience failed git checkouts when an InterruptedException is raised to abort a job. This causes a job to have the result FAILURE instead of ABORTED. 

          InterruptedException doesn't have a message and the code in CliGitAPIImpl accesses the message without null check. Two example stack traces (line numbers originate from plugin build from [https://github.com/jenkinsci/git-client-plugin/pull/1103, |https://github.com/jenkinsci/git-client-plugin/pull/1103):]git-client:4.6.1-rc3518.4c581ea_f4c3d):

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:871)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1222)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1305)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2766)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2761)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2051)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2063)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:1115)
          at hudson.plugins.git.GitAPI.revParse(GitAPI.java:419)
          at hudson.plugins.git.util.DefaultBuildChooser.getCandidateRevisions(DefaultBuildChooser.java:60)
          at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1148)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1306)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE

           

          Caused by this code section:
          {{} catch (GitException | InterruptedException e) {}}
          {{{}if (e.getMessage().contains("unsupported option \"accept-new\"")) { // causing NPE in getMessage() returns null{}}}{{{}listener.getLogger().println(HyperlinkNote.encodeTo("https://plugins.jenkins.io/git-client/#plugin-content-ssh-host-key-verification",{}}}{{{}"If you are using OpenSSH < 7.6 please choose another strategy to verify ssh host key in 'Manage Jenkins' -> 'Configure Global Security' -> 'Git Host Key Verification Configuration'"));{}}}{{{}}{}}}{{{}throw e;{}}}
          {{ }}
          Christoph Kulla made changes -
          Description Original: We occasionaly experience failed git checkouts when an InterruptedException is raised to abort a job. This causes a job to have the result FAILURE instead of ABORTED. 

          InterruptedException doesn't have a message and the code in CliGitAPIImpl accesses the message without null check. Two example stack traces (line numbers originate from plugin build from [https://github.com/jenkinsci/git-client-plugin/pull/1103, |https://github.com/jenkinsci/git-client-plugin/pull/1103):]git-client:4.6.1-rc3518.4c581ea_f4c3d):

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:871)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1222)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1305)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2766)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2761)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2051)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2063)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:1115)
          at hudson.plugins.git.GitAPI.revParse(GitAPI.java:419)
          at hudson.plugins.git.util.DefaultBuildChooser.getCandidateRevisions(DefaultBuildChooser.java:60)
          at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1148)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1306)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE

           

          Caused by this code section:
          {{} catch (GitException | InterruptedException e) {}}
          {{{}if (e.getMessage().contains("unsupported option \"accept-new\"")) { // causing NPE in getMessage() returns null{}}}{{{}listener.getLogger().println(HyperlinkNote.encodeTo("https://plugins.jenkins.io/git-client/#plugin-content-ssh-host-key-verification",{}}}{{{}"If you are using OpenSSH < 7.6 please choose another strategy to verify ssh host key in 'Manage Jenkins' -> 'Configure Global Security' -> 'Git Host Key Verification Configuration'"));{}}}{{{}}{}}}{{{}throw e;{}}}
          {{ }}
          New: We occasionaly experience failed git checkouts when an InterruptedException is raised to abort a job. This causes a job to have the result FAILURE instead of ABORTED. 

          InterruptedException doesn't have a message and the code in CliGitAPIImpl accesses the message without null check. Two example stack traces (line numbers originate from plugin build from [https://github.com/jenkinsci/git-client-plugin/pull/1103, |https://github.com/jenkinsci/git-client-plugin/pull/1103):]git-client:4.6.1-rc3518.4c581ea_f4c3d):

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:871)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1222)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1305)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2766)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2761)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2051)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2063)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:1115)
          at hudson.plugins.git.GitAPI.revParse(GitAPI.java:419)
          at hudson.plugins.git.util.DefaultBuildChooser.getCandidateRevisions(DefaultBuildChooser.java:60)
          at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1148)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1306)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE

           

          Caused by this code section:


          {{} catch (GitException | InterruptedException e) {}}
          {{    if (e.getMessage().contains("unsupported option \"accept-new\"")) { // causing NPE in getMessage() returns null}}
          {{{}        listener.getLogger().println(HyperlinkNote.encodeTo("[https://plugins.jenkins.io/git-client/#plugin-content-ssh-host-key-]                     verification",{}}}{{{}"If you are using OpenSSH < 7.6 please choose another strategy to verify ssh host key in 'Manage Jenkins' -> 'Configure Global Security' -> 'Git Host Key Verification Configuration'"));{}}}{{{}}{}}}{{{}throw e;{}}}
          {{ }}
          Christoph Kulla made changes -
          Issue Type Original: Improvement [ 4 ] New: Bug [ 1 ]
          Christoph Kulla made changes -
          Description Original: We occasionaly experience failed git checkouts when an InterruptedException is raised to abort a job. This causes a job to have the result FAILURE instead of ABORTED. 

          InterruptedException doesn't have a message and the code in CliGitAPIImpl accesses the message without null check. Two example stack traces (line numbers originate from plugin build from [https://github.com/jenkinsci/git-client-plugin/pull/1103, |https://github.com/jenkinsci/git-client-plugin/pull/1103):]git-client:4.6.1-rc3518.4c581ea_f4c3d):

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:871)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1222)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1305)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2766)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2761)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2051)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2063)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:1115)
          at hudson.plugins.git.GitAPI.revParse(GitAPI.java:419)
          at hudson.plugins.git.util.DefaultBuildChooser.getCandidateRevisions(DefaultBuildChooser.java:60)
          at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1148)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1306)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE

           

          Caused by this code section:


          {{} catch (GitException | InterruptedException e) {}}
          {{    if (e.getMessage().contains("unsupported option \"accept-new\"")) { // causing NPE in getMessage() returns null}}
          {{{}        listener.getLogger().println(HyperlinkNote.encodeTo("[https://plugins.jenkins.io/git-client/#plugin-content-ssh-host-key-]                     verification",{}}}{{{}"If you are using OpenSSH < 7.6 please choose another strategy to verify ssh host key in 'Manage Jenkins' -> 'Configure Global Security' -> 'Git Host Key Verification Configuration'"));{}}}{{{}}{}}}{{{}throw e;{}}}
          {{ }}
          New: We occasionaly experience failed git checkouts when an InterruptedException is raised to abort a job. This causes a job to have the result FAILURE instead of ABORTED. 

          InterruptedException doesn't have a message and the code in CliGitAPIImpl accesses the message without null check. Two example stack traces (line numbers originate from plugin build from [https://github.com/jenkinsci/git-client-plugin/pull/1103, |https://github.com/jenkinsci/git-client-plugin/pull/1103):]git-client:4.6.1-rc3518.4c581ea_f4c3d):

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:871)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1222)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1305)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE

          ERROR: Checkout failed
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2766)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2761)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2051)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2063)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:1115)
          at hudson.plugins.git.GitAPI.revParse(GitAPI.java:419)
          at hudson.plugins.git.util.DefaultBuildChooser.getCandidateRevisions(DefaultBuildChooser.java:60)
          at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1148)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1306)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          ERROR: Maximum checkout retry attempts reached, aborting
          Finished: FAILURE

           

          Caused by this code section:

          {{} catch (GitException | InterruptedException e) {}}
          {{    if (e.getMessage().contains("unsupported option \"accept-new\"")) { // causing NPE if getMessage() returns null}}
          {{{}        listener.getLogger().println(HyperlinkNote.encodeTo("[https://plugins.jenkins.io/git-client/#plugin-content-ssh-host-key-]                     verification",{}}}{{{}"If you are using OpenSSH < 7.6 please choose another strategy to verify ssh host key in 'Manage Jenkins' -> 'Configure Global Security' -> 'Git Host Key Verification Configuration'"));{}}}{{{}}{}}}{{{}throw e;{}}}
          {{ }}
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-72830 [ JENKINS-72830 ]
          Mark Waite made changes -
          Released As New: 4.7.0
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Fixed but Unreleased [ 10203 ]

            markewaite Mark Waite
            ckullabosch Christoph Kulla
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: