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

NPE when job started while delivery in progress to stream

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • clearcase-plugin
    • None
    • Server: Centos 5.3
      Slave: Centos 4.7
      ClearCase: 7.0.1
      ClearCase Plugin: 1.3.3
      Hudson: 1.387

    Description

      If a builds starts while someone is in the process of delivering to the integration stream the build will immediately fail with an error like the one below.
      I have noticed this occur several times over the course of the past week

      09:20:59 [builder_RavenPlatMain_Cavium_Uboot] $ cleartool lsactivity -fmt '\"%[headline]p\" \"%[stream]p\" \"%u\" \"%[contrib_acts]p\" \n' deliver.rmeyer_RavenPlatMain_10.20101205.090923
      09:21:00 "deliver rmeyer_RavenPlatMain_10 on 12/05/10 09:09:23." "RavenPlatMain_Int" "vobadm" "Tools-fixing_chassis_rpm_with_xe80_platform rebase.rmeyer_RavenPlatMain_10.20101205.074249"
      09:21:00 [builder_RavenPlatMain_Cavium_Uboot] $ cleartool lsactivity -fmt '\"%[headline]p\" \"%[stream]p\" \"%u\" \n' Tools-fixing_chassis_rpm_with_xe80_platform
      09:21:00 FATAL: null
      09:21:00 "Tools-fixing chassis rpm with xe80 platform" "rmeyer_RavenPlatMain_10" "rmeyer"
      09:21:00 java.lang.NullPointerException
      09:21:00 at java.util.regex.Matcher.getTextLength(Unknown Source)
      09:21:00 at java.util.regex.Matcher.reset(Unknown Source)
      09:21:00 at java.util.regex.Matcher.<init>(Unknown Source)
      09:21:00 at java.util.regex.Pattern.matcher(Unknown Source)
      09:21:00 at hudson.plugins.clearcase.util.ClearToolFormatHandler.checkLine(ClearToolFormatHandler.java:69)
      09:21:00 at hudson.plugins.clearcase.ucm.UcmHistoryAction.callLsActivity(UcmHistoryAction.java:130)
      09:21:00 at hudson.plugins.clearcase.ucm.UcmHistoryAction.callLsActivity(UcmHistoryAction.java:148)
      09:21:00 at hudson.plugins.clearcase.ucm.UcmHistoryAction.buildChangelog(UcmHistoryAction.java:113)
      09:21:00 at hudson.plugins.clearcase.history.AbstractHistoryAction.getChanges(AbstractHistoryAction.java:83)
      09:21:00 at hudson.plugins.clearcase.AbstractClearCaseScm.saveChangeLog(AbstractClearCaseScm.java:515)
      09:21:00 at hudson.plugins.clearcase.AbstractClearCaseScm.checkout(AbstractClearCaseScm.java:490)
      09:21:00 at hudson.model.AbstractProject.checkout(AbstractProject.java:1119)
      09:21:00 at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:480)
      09:21:00 at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:412)
      09:21:00 at hudson.model.Run.run(Run.java:1325)
      09:21:00 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      09:21:00 at hudson.model.ResourceController.execute(ResourceController.java:88)
      09:21:00 at hudson.model.Executor.run(Executor.java:139)

      Attachments

        Activity

          Fixed in trunk

          vlatombe Vincent Latombe added a comment - Fixed in trunk
          peterkline peterkline added a comment -

          Vincent,

          Thanks for the quick fix. We will install this tonight and see how it goes. I assume this just handles the check but doesn't resolve the issue of a build starting while a deliver is in progress. Wouldn't the best course of action be that the clearcase plugin detects the stream status and doesn't allow a build if a deliver is in progress or give the administrator the option to not allow builds in this situation?

          Thanks again for the quick turn around!

          peterkline peterkline added a comment - Vincent, Thanks for the quick fix. We will install this tonight and see how it goes. I assume this just handles the check but doesn't resolve the issue of a build starting while a deliver is in progress. Wouldn't the best course of action be that the clearcase plugin detects the stream status and doesn't allow a build if a deliver is in progress or give the administrator the option to not allow builds in this situation? Thanks again for the quick turn around!

          I just added a null-check in case the output from lsactivity is empty.
          Preventing a build while a deliver (or a rebase) is ongoing is something I have had in mind for a while, but this is rather an improvement/new feature.

          vlatombe Vincent Latombe added a comment - I just added a null-check in case the output from lsactivity is empty. Preventing a build while a deliver (or a rebase) is ongoing is something I have had in mind for a while, but this is rather an improvement/new feature.
          peterkline peterkline added a comment -

          great. Thanks.

          peterkline peterkline added a comment - great. Thanks.

          People

            vlatombe Vincent Latombe
            peterkline peterkline
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: