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

Trilead-SSH2 fails with NPE when calling Connection#getReasonClosedCause()

    XMLWordPrintable

Details

    • Jenkins 2.157, TrileadSSH build-217-jenkins-14

    Description

      Just caught it in SSH Slaves plugin tests on my local machine:

      Caused by: java.lang.NullPointerException
      	at com.trilead.ssh2.Connection.getReasonClosedCause(Connection.java:1556)
      	at hudson.plugins.sshslaves.SSHLauncher.reportTransportLoss(SSHLauncher.java:1420)
      	at hudson.plugins.sshslaves.SSHLauncher.afterDisconnect(SSHLauncher.java:1343)
      	at hudson.slaves.SlaveComputer$3.run(SlaveComputer.java:603)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      Tirlead code does not check whether "this.tm" field is null before returning getReasonClosedCause from "this.tm". Just a minor defect

      Attachments

        Activity

          oleg_nenashev Oleg Nenashev created issue -
          oleg_nenashev Oleg Nenashev made changes -
          Field Original Value New Value
          Summary Trilead-SSH2 fails with NPE when Trilead-SSH2 fails with NPE when calling Connection#getReasonClosedCause()
          oleg_nenashev Oleg Nenashev made changes -
          Issue Type Task [ 3 ] Bug [ 1 ]
          oleg_nenashev Oleg Nenashev made changes -
          Remote Link This issue links to "https://github.com/jenkinsci/trilead-ssh2/pull/25 (Web Link)" [ 17894 ]
          oleg_nenashev Oleg Nenashev made changes -
          Assignee Michael Clarke [ mc1arke ] Oleg Nenashev [ oleg_nenashev ]
          oleg_nenashev Oleg Nenashev made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          oleg_nenashev Oleg Nenashev made changes -
          Status In Progress [ 3 ] In Review [ 10005 ]
          ifernandezcalvo Ivan Fernandez Calvo made changes -
          Remote Link This issue links to "PR-core (Web Link)" [ 22133 ]
          oleg_nenashev Oleg Nenashev made changes -
          Released As Jenkins 2.157, TrileadSSH build-217-jenkins-14
          Resolution Fixed [ 1 ]
          Status In Review [ 10005 ] Resolved [ 5 ]

          People

            oleg_nenashev Oleg Nenashev
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: