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

Job hangs trying to resolve Perforce emails, in a non-perforce job

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      We upgraded from Jenkins 1.445 to 1.565, and we have a number of jobs configured for subversion, and some configured for perforce.

      This one job in particular, failed (after I had to kill the p4 executable on the build agent, and then ultimately the build agent itself) when it tried to generate an email list to send emails out. It appears to be attempting to get users emails from perforce, even though this one job in particular is in no way configured to use Perforce.

      ERROR: Publisher hudson.tasks.Mailer aborted due to exception
      java.lang.NullPointerException
      	at hudson.model.Slave.createLauncher(Slave.java:359)
      	at hudson.plugins.perforce.PerforceMailResolver.findPerforceMailAddressFor(PerforceMailResolver.java:74)
      	at hudson.plugins.perforce.PerforceMailResolver.findMailAddressFor(PerforceMailResolver.java:25)
      	at hudson.tasks.MailAddressResolver.resolve(MailAddressResolver.java:112)
      	at hudson.tasks.Mailer$UserProperty.getAddress(Mailer.java:547)
      	at hudson.tasks.MailSender.buildCulpritList(MailSender.java:407)
      	at hudson.tasks.MailSender.createEmptyMail(MailSender.java:367)
      	at hudson.tasks.MailSender.createBackToNormalMail(MailSender.java:176)
      	at hudson.tasks.MailSender.getMail(MailSender.java:167)
      	at hudson.tasks.MailSender.execute(MailSender.java:101)
      	at hudson.tasks.Mailer.perform(Mailer.java:137)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:745)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:709)
      	at hudson.model.Build$BuildExecution.post2(Build.java:182)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:658)
      	at hudson.model.Run.execute(Run.java:1731)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:231)
      

      Only once I had disabled the Perforce plugin entirely, would the job complete without hanging.

        Attachments

          Activity

          Hide
          slide_o_mix Alex Earl added a comment -

          This is not a bug in email-ext. Email-ext uses the MailAddressResolver from the Mailer plugin to try and resolve email addresses. The perforce plugin implements a MailAddressResolver, it should probably check if Perforce is setup for the current job.

          Show
          slide_o_mix Alex Earl added a comment - This is not a bug in email-ext. Email-ext uses the MailAddressResolver from the Mailer plugin to try and resolve email addresses. The perforce plugin implements a MailAddressResolver, it should probably check if Perforce is setup for the current job.
          Hide
          davyboyhayes davyboyhayes added a comment -

          Perforce is definitely not defined (I have checked the jobs config.xml for configuration) for this job.

          Show
          davyboyhayes davyboyhayes added a comment - Perforce is definitely not defined (I have checked the jobs config.xml for configuration) for this job.
          Hide
          slide_o_mix Alex Earl added a comment -

          Right, so the PerforceMailResolver should probably check that before trying to resolve the email address.

          Show
          slide_o_mix Alex Earl added a comment - Right, so the PerforceMailResolver should probably check that before trying to resolve the email address.
          Hide
          davyboyhayes davyboyhayes added a comment - - edited

          Agreed, will forward on to Rob Petti (nvm, it already has been)

          Show
          davyboyhayes davyboyhayes added a comment - - edited Agreed, will forward on to Rob Petti (nvm, it already has been)
          Hide
          rpetti Rob Petti added a comment -

          MailAddressResolvers are not given any indication what project they are resolving email addresses for. There's no way to skip it if the job running email-ext isn't configured for perforce, so it's forced to scan all of the projects configured for PerforceSCM objects.

          Show
          rpetti Rob Petti added a comment - MailAddressResolvers are not given any indication what project they are resolving email addresses for. There's no way to skip it if the job running email-ext isn't configured for perforce, so it's forced to scan all of the projects configured for PerforceSCM objects.
          Hide
          davyboyhayes davyboyhayes added a comment - - edited

          So what could have changed between these versions. I know that if I revert my snapshot of Jenkins prior to upgrading, everything builds fine, yet when I upgrade to these versions, everything goes grinds to a halt. Do you think this is an issue for the Mailer plugin then?

          Show
          davyboyhayes davyboyhayes added a comment - - edited So what could have changed between these versions. I know that if I revert my snapshot of Jenkins prior to upgrading, everything builds fine, yet when I upgrade to these versions, everything goes grinds to a halt. Do you think this is an issue for the Mailer plugin then?
          Hide
          slide_o_mix Alex Earl added a comment -

          The bundled mailer plugin might be a different version, can you verify if there are any updates available for Mailer in the update center?

          Show
          slide_o_mix Alex Earl added a comment - The bundled mailer plugin might be a different version, can you verify if there are any updates available for Mailer in the update center?
          Hide
          rpetti Rob Petti added a comment -

          Can you revert, then upgrade each plugin one-by-one? That would seem to be the best way to tease out why it's hanging.

          Show
          rpetti Rob Petti added a comment - Can you revert, then upgrade each plugin one-by-one? That would seem to be the best way to tease out why it's hanging.
          Hide
          kohsuke Kohsuke Kawaguchi added a comment - - edited

          In addition, the mailer plugin shouldn't let a problem in MailAddressResolver affect the caller.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - - edited In addition, the mailer plugin shouldn't let a problem in MailAddressResolver affect the caller.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          src/main/java/hudson/tasks/MailAddressResolver.java
          http://jenkins-ci.org/commit/mailer-plugin/c5497e08f35e18ae5a37ace9139a651363d8658e
          Log:
          JENKINS-23256

          Don't let a problem in MailAddressResolver affect the innocent caller

          Compare: https://github.com/jenkinsci/mailer-plugin/compare/38c84e2320ee...c5497e08f35e

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: src/main/java/hudson/tasks/MailAddressResolver.java http://jenkins-ci.org/commit/mailer-plugin/c5497e08f35e18ae5a37ace9139a651363d8658e Log: JENKINS-23256 Don't let a problem in MailAddressResolver affect the innocent caller Compare: https://github.com/jenkinsci/mailer-plugin/compare/38c84e2320ee...c5497e08f35e
          Hide
          davyboyhayes davyboyhayes added a comment -

          I will take snapshots of the build machine and master and test these out on Monday, rolling back to the previous build and attempt to roll individual plugins forward to eek out what caused the problem.

          Show
          davyboyhayes davyboyhayes added a comment - I will take snapshots of the build machine and master and test these out on Monday, rolling back to the previous build and attempt to roll individual plugins forward to eek out what caused the problem.
          Hide
          slide_o_mix Alex Earl added a comment -

          Any updates on this?

          Show
          slide_o_mix Alex Earl added a comment - Any updates on this?
          Hide
          davyboyhayes davyboyhayes added a comment -

          Alas, time and tide waits for no man, neither do companies. I was unable to dedicate time towards this, and our configuration has moved on beyond this where we no longer have Perforce jobs configured.

          As I am unable to assist any further (and I'm the reporter) I'm happy to close the issue as Won't Do.

          Show
          davyboyhayes davyboyhayes added a comment - Alas, time and tide waits for no man, neither do companies. I was unable to dedicate time towards this, and our configuration has moved on beyond this where we no longer have Perforce jobs configured. As I am unable to assist any further (and I'm the reporter) I'm happy to close the issue as Won't Do.

            People

            • Assignee:
              Unassigned
              Reporter:
              davyboyhayes davyboyhayes
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: