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

NPE that makes a successful build get marked as failure (SauceOnDemandBuildWrapper.getCurrentHostName)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Incomplete
    • Component/s: sauce-ondemand-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 1.619
      Sauce plugin 1.129
    • Similar Issues:

      Description

      The job runs, all tests pass, sauce job also looks normal/success..
      Jenkins job reports Build Success in console and the tests reports show all passed.
      Even so the job is marked as a failure.

      I looked in the logs an I noticed this - which might be the culprit.

      Feb 01, 2016 8:09:40 PM hudson.triggers.SafeTimerTask run
      SEVERE: Timer task hudson.plugins.build_timeout.BuildTimeoutWrapper$EnvironmentImpl$TimeoutTimerTask@68416dbd failed
      java.lang.NullPointerException
              at hudson.plugins.sauce_ondemand.SauceOnDemandBuildWrapper.getCurrentHostName(SauceOnDemandBuildWrapper.java:466)
              at hudson.plugins.sauce_ondemand.SauceOnDemandBuildWrapper.access$600(SauceOnDemandBuildWrapper.java:78)
              at hudson.plugins.sauce_ondemand.SauceOnDemandBuildWrapper$1.getHostName(SauceOnDemandBuildWrapper.java:340)
              at hudson.plugins.sauce_ondemand.SauceOnDemandBuildWrapper$1.buildEnvVars(SauceOnDemandBuildWrapper.java:317)
              at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:944)
              at hudson.plugins.build_timeout.operations.WriteDescriptionOperation.perform(WriteDescriptionOperation.java:65)
              at hudson.plugins.build_timeout.BuildTimeoutWrapper$EnvironmentImpl$TimeoutTimerTask.doRun(BuildTimeoutWrapper.java:142)
              at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
              at java.util.TimerThread.mainLoop(Timer.java:555)
              at java.util.TimerThread.run(Timer.java:505)
      
      Feb 01, 2016 8:12:02 PM com.saucelabs.ci.sauceconnect.AbstractSauceTunnelManager logMessage
      INFO: Decremented process count for ..., now 0
      Feb 01, 2016 8:12:02 PM com.saucelabs.ci.sauceconnect.AbstractSauceTunnelManager logMessage
      INFO: Flushing Sauce Connect Input Stream
      Feb 01, 2016 8:12:02 PM com.saucelabs.ci.sauceconnect.AbstractSauceTunnelManager logMessage
      INFO: Flushing Sauce Connect Error Stream
      Feb 01, 2016 8:12:02 PM com.saucelabs.ci.sauceconnect.AbstractSauceTunnelManager logMessage
      INFO: Closing Sauce Connect process
      Feb 01, 2016 8:12:06 PM com.saucelabs.ci.sauceconnect.AbstractSauceTunnelManager logMessage
      INFO: Sauce Connect stopped for: ...
      Feb 01, 2016 8:12:06 PM hudson.model.Run execute
      INFO: my_job #1118 main build action completed: FAILURE
      

      I noticed there are newer versions which I might test, but I didn't see anything like this mentioned as fixed in the changelogs.

        Attachments

          Activity

          costescuandrei Andrei Costescu created issue -
          costescuandrei Andrei Costescu made changes -
          Field Original Value New Value
          Description The job runs, all tests pass, sauce job also looks normal/success..
          Jenkins job reports Build Success and the tests reports show all passed.
          Even so the job is marked as a failure.

          I looked in the logs an I noticed this - which might be the culprit.
          {code}Feb 01, 2016 8:09:40 PM hudson.triggers.SafeTimerTask run
          SEVERE: Timer task hudson.plugins.build_timeout.BuildTimeoutWrapper$EnvironmentImpl$TimeoutTimerTask@68416dbd failed
          java.lang.NullPointerException
                  at hudson.plugins.sauce_ondemand.SauceOnDemandBuildWrapper.getCurrentHostName(SauceOnDemandBuildWrapper.java:466)
                  at hudson.plugins.sauce_ondemand.SauceOnDemandBuildWrapper.access$600(SauceOnDemandBuildWrapper.java:78)
                  at hudson.plugins.sauce_ondemand.SauceOnDemandBuildWrapper$1.getHostName(SauceOnDemandBuildWrapper.java:340)
                  at hudson.plugins.sauce_ondemand.SauceOnDemandBuildWrapper$1.buildEnvVars(SauceOnDemandBuildWrapper.java:317)
                  at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:944)
                  at hudson.plugins.build_timeout.operations.WriteDescriptionOperation.perform(WriteDescriptionOperation.java:65)
                  at hudson.plugins.build_timeout.BuildTimeoutWrapper$EnvironmentImpl$TimeoutTimerTask.doRun(BuildTimeoutWrapper.java:142)
                  at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
                  at java.util.TimerThread.mainLoop(Timer.java:555)
                  at java.util.TimerThread.run(Timer.java:505)

          Feb 01, 2016 8:12:02 PM com.saucelabs.ci.sauceconnect.AbstractSauceTunnelManager logMessage
          INFO: Decremented process count for ..., now 0
          Feb 01, 2016 8:12:02 PM com.saucelabs.ci.sauceconnect.AbstractSauceTunnelManager logMessage
          INFO: Flushing Sauce Connect Input Stream
          Feb 01, 2016 8:12:02 PM com.saucelabs.ci.sauceconnect.AbstractSauceTunnelManager logMessage
          INFO: Flushing Sauce Connect Error Stream
          Feb 01, 2016 8:12:02 PM com.saucelabs.ci.sauceconnect.AbstractSauceTunnelManager logMessage
          INFO: Closing Sauce Connect process
          Feb 01, 2016 8:12:06 PM com.saucelabs.ci.sauceconnect.AbstractSauceTunnelManager logMessage
          INFO: Sauce Connect stopped for: ...
          Feb 01, 2016 8:12:06 PM hudson.model.Run execute
          INFO: my_job #1118 main build action completed: FAILURE
          {code}

          I noticed there are newer versions which I might test, but I didn't see anything like this mentioned as fixed in the changelogs.
          The job runs, all tests pass, sauce job also looks normal/success..
          Jenkins job reports Build Success in console and the tests reports show all passed.
          Even so the job is marked as a failure.

          I looked in the logs an I noticed this - which might be the culprit.
          {code}Feb 01, 2016 8:09:40 PM hudson.triggers.SafeTimerTask run
          SEVERE: Timer task hudson.plugins.build_timeout.BuildTimeoutWrapper$EnvironmentImpl$TimeoutTimerTask@68416dbd failed
          java.lang.NullPointerException
                  at hudson.plugins.sauce_ondemand.SauceOnDemandBuildWrapper.getCurrentHostName(SauceOnDemandBuildWrapper.java:466)
                  at hudson.plugins.sauce_ondemand.SauceOnDemandBuildWrapper.access$600(SauceOnDemandBuildWrapper.java:78)
                  at hudson.plugins.sauce_ondemand.SauceOnDemandBuildWrapper$1.getHostName(SauceOnDemandBuildWrapper.java:340)
                  at hudson.plugins.sauce_ondemand.SauceOnDemandBuildWrapper$1.buildEnvVars(SauceOnDemandBuildWrapper.java:317)
                  at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:944)
                  at hudson.plugins.build_timeout.operations.WriteDescriptionOperation.perform(WriteDescriptionOperation.java:65)
                  at hudson.plugins.build_timeout.BuildTimeoutWrapper$EnvironmentImpl$TimeoutTimerTask.doRun(BuildTimeoutWrapper.java:142)
                  at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
                  at java.util.TimerThread.mainLoop(Timer.java:555)
                  at java.util.TimerThread.run(Timer.java:505)

          Feb 01, 2016 8:12:02 PM com.saucelabs.ci.sauceconnect.AbstractSauceTunnelManager logMessage
          INFO: Decremented process count for ..., now 0
          Feb 01, 2016 8:12:02 PM com.saucelabs.ci.sauceconnect.AbstractSauceTunnelManager logMessage
          INFO: Flushing Sauce Connect Input Stream
          Feb 01, 2016 8:12:02 PM com.saucelabs.ci.sauceconnect.AbstractSauceTunnelManager logMessage
          INFO: Flushing Sauce Connect Error Stream
          Feb 01, 2016 8:12:02 PM com.saucelabs.ci.sauceconnect.AbstractSauceTunnelManager logMessage
          INFO: Closing Sauce Connect process
          Feb 01, 2016 8:12:06 PM com.saucelabs.ci.sauceconnect.AbstractSauceTunnelManager logMessage
          INFO: Sauce Connect stopped for: ...
          Feb 01, 2016 8:12:06 PM hudson.model.Run execute
          INFO: my_job #1118 main build action completed: FAILURE
          {code}

          I noticed there are newer versions which I might test, but I didn't see anything like this mentioned as fixed in the changelogs.
          Hide
          costescuandrei Andrei Costescu added a comment -

          I think I found an explanation. Builds that failed took > 40 min (42 min for example). And the build timeout plugin is configured at 40 min.
          I noticed that the builds that pass are 39m, 38m, or even some of the 40m ... (others with 40m fail)
          So it times out close to job's normal end time. Maybe right when sauce plugin does it's cleanup.

          But it's strange that I don't get notified that it timed out in the console or somewhere (in job history as usual for example).
          Maybe that is caused by this NPE.

          Show
          costescuandrei Andrei Costescu added a comment - I think I found an explanation. Builds that failed took > 40 min (42 min for example). And the build timeout plugin is configured at 40 min. I noticed that the builds that pass are 39m, 38m, or even some of the 40m ... (others with 40m fail) So it times out close to job's normal end time. Maybe right when sauce plugin does it's cleanup. But it's strange that I don't get notified that it timed out in the console or somewhere (in job history as usual for example). Maybe that is caused by this NPE.
          Hide
          halkeye Gavin Mogan added a comment -

          Andrei A I would recommend upgrading and checking if its still a problem. There has been some major refactoring done since then and hopefully should fix things.

          Show
          halkeye Gavin Mogan added a comment - Andrei A I would recommend upgrading and checking if its still a problem. There has been some major refactoring done since then and hopefully should fix things.
          halkeye Gavin Mogan made changes -
          Resolution Incomplete [ 4 ]
          Status Open [ 1 ] Resolved [ 5 ]
          halkeye Gavin Mogan made changes -
          Assignee Jack Moxon [ jsmoxon ] Gavin Mogan [ halkeye ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 168392 ] JNJira + In-Review [ 198418 ]

            People

            Assignee:
            halkeye Gavin Mogan
            Reporter:
            costescuandrei Andrei Costescu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: