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

Mailer fails to send an email whe thre's a project with broken commits

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      When mailer tries to determine email user's email address, it searches for it in various places. Some resolvers can throw an exception during the search (e.g. git, one example is bellow) which results in failure of the search and consequently failure of the the build. The search should handle these case more gracefully.

      ERROR: Publisher hudson.tasks.Mailer aborted due to exception
      java.lang.RuntimeException: No author in changeset ee602dc8116843c09f46beb374071a1547c1120b
      	at hudson.plugins.git.GitChangeSet.getAuthor(GitChangeSet.java:240)
      	at hudson.model.AbstractBuild.hasParticipant(AbstractBuild.java:357)
      	at hudson.model.AbstractProject.hasParticipant(AbstractProject.java:1383)
      	at hudson.model.User.getProjects(User.java:402)
      	at hudson.scm.MailAddressResolverImpl.findMailAddressFor(MailAddressResolverImpl.java:19)
      	at hudson.tasks.MailAddressResolver.resolve(MailAddressResolver.java:100)
      	at hudson.tasks.Mailer$UserProperty.getAddress(Mailer.java:495)
      	at hudson.tasks.MailSender.buildCulpritList(MailSender.java:408)
      	at hudson.tasks.MailSender.createEmptyMail(MailSender.java:368)
      	at hudson.tasks.MailSender.createBackToNormalMail(MailSender.java:190)
      	at hudson.tasks.MailSender.getMail(MailSender.java:181)
      	at hudson.tasks.MailSender.execute(MailSender.java:115)
      	at hudson.tasks.Mailer.perform(Mailer.java:110)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:697)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:672)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:650)
      	at hudson.model.Build$RunnerImpl.post2(Build.java:162)
      	at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:619)
      	at hudson.model.Run.run(Run.java:1429)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:238)
      

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Vojtech Juranek
          Path:
          core/src/main/java/hudson/model/AbstractBuild.java
          http://jenkins-ci.org/commit/jenkins/4f272d4b6d2c5868bbe1a86dc0789edb6fbf6b37
          Log:
          [FIXED JENKINS-13564] If there is any problem when searching for user partipication in the build, end up more gracefully.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vojtech Juranek Path: core/src/main/java/hudson/model/AbstractBuild.java http://jenkins-ci.org/commit/jenkins/4f272d4b6d2c5868bbe1a86dc0789edb6fbf6b37 Log: [FIXED JENKINS-13564] If there is any problem when searching for user partipication in the build, end up more gracefully.
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #1672
          [FIXED JENKINS-13564] If there is any problem when searching for user partipication in the build, end up more gracefully. (Revision 4f272d4b6d2c5868bbe1a86dc0789edb6fbf6b37)

          Result = SUCCESS
          Vojtech Juranek : 4f272d4b6d2c5868bbe1a86dc0789edb6fbf6b37
          Files :

          • core/src/main/java/hudson/model/AbstractBuild.java
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #1672 [FIXED JENKINS-13564] If there is any problem when searching for user partipication in the build, end up more gracefully. (Revision 4f272d4b6d2c5868bbe1a86dc0789edb6fbf6b37) Result = SUCCESS Vojtech Juranek : 4f272d4b6d2c5868bbe1a86dc0789edb6fbf6b37 Files : core/src/main/java/hudson/model/AbstractBuild.java
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_ui-changes_branch #26
          [FIXED JENKINS-13564] If there is any problem when searching for user partipication in the build, end up more gracefully. (Revision 4f272d4b6d2c5868bbe1a86dc0789edb6fbf6b37)

          Result = SUCCESS
          Vojtech Juranek : 4f272d4b6d2c5868bbe1a86dc0789edb6fbf6b37
          Files :

          • core/src/main/java/hudson/model/AbstractBuild.java
          Show
          dogfood dogfood added a comment - Integrated in jenkins_ui-changes_branch #26 [FIXED JENKINS-13564] If there is any problem when searching for user partipication in the build, end up more gracefully. (Revision 4f272d4b6d2c5868bbe1a86dc0789edb6fbf6b37) Result = SUCCESS Vojtech Juranek : 4f272d4b6d2c5868bbe1a86dc0789edb6fbf6b37 Files : core/src/main/java/hudson/model/AbstractBuild.java
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          core/src/main/java/hudson/model/Computer.java
          http://jenkins-ci.org/commit/jenkins/c3a19670d5400d805a7096a5b69df0ec14c532cd
          Log:
          JENKINS-13564 make the method self-correcting

          If for some reason the numExecutors field gets out of sync with executors.size() (for example this can happen if an executor swallowed an interrupt signal without properly processing it), then a further attempt to call setNumExecutors results in a no-op.

          Given that these things can get out of sync, a smarter thing to do is to always compare where we are (the "executors" variable) and where we'd like to be (numExecutors), and make corrective actions.

          This particularly affects a zombie computer. The sequence to kill a Computer first involves waiting for all the executors to quit. If setNumExecutors(0) becomes no-op, a zombine computer never gets killed.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: core/src/main/java/hudson/model/Computer.java http://jenkins-ci.org/commit/jenkins/c3a19670d5400d805a7096a5b69df0ec14c532cd Log: JENKINS-13564 make the method self-correcting If for some reason the numExecutors field gets out of sync with executors.size() (for example this can happen if an executor swallowed an interrupt signal without properly processing it), then a further attempt to call setNumExecutors results in a no-op. Given that these things can get out of sync, a smarter thing to do is to always compare where we are (the "executors" variable) and where we'd like to be (numExecutors), and make corrective actions. This particularly affects a zombie computer. The sequence to kill a Computer first involves waiting for all the executors to quit. If setNumExecutors(0) becomes no-op, a zombine computer never gets killed.
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #2421
          JENKINS-13564 make the method self-correcting (Revision c3a19670d5400d805a7096a5b69df0ec14c532cd)

          Result = SUCCESS
          kohsuke : c3a19670d5400d805a7096a5b69df0ec14c532cd
          Files :

          • core/src/main/java/hudson/model/Computer.java
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #2421 JENKINS-13564 make the method self-correcting (Revision c3a19670d5400d805a7096a5b69df0ec14c532cd) Result = SUCCESS kohsuke : c3a19670d5400d805a7096a5b69df0ec14c532cd Files : core/src/main/java/hudson/model/Computer.java

            People

            Assignee:
            vjuranek vjuranek
            Reporter:
            vjuranek vjuranek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: