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

When matrix job kills children for a failed job emails from email-ext are sometimes not sent

    Details

    • Similar Issues:

      Description

      When one child of a matrix job dies, all other children are killed. There appears to be a race condition between this and when email-ext is able to send email, because when this happens I sometimes don't get email. I have a degenerate case here where I have a matrix job with exactly 1 child. When the build completed it was unstable. However the child wasn't able to send email because it was killed too soon.

      Output from master job:
      20:31:36 Triggering mac
      20:45:51 mac completed with result UNSTABLE
      20:45:51 Interrupting #43
      20:45:52 Finished: UNSTABLE

      Output from slave:
      20:45:43 [DRY] Collecting duplicate code analysis files...
      20:45:44 [WARNINGS] Parsing warnings in console log with parsers [GNU compiler 4 (gcc)]
      20:45:46 [WARNINGS] GNU compiler 4 (gcc) : Found 67 warnings.
      20:45:47 [TASKS] Scanning workspace files for tasks...
      20:45:47 [TASKS] Found 3 open tasks.
      20:45:48 Archiving artifacts
      20:45:49 Recording test results
      20:45:51 Build step 'Publish JUnit test result report' changed build result to UNSTABLE
      20:45:51 Email was triggered for: Unstable
      20:45:51 Sending email for trigger: Unstable
      20:45:52 ERROR: Could not send email as a part of the post-build publishers.
      20:45:52 java.lang.InterruptedException
      20:45:52 at java.lang.Object.wait(Native Method)
      20:45:52 at hudson.remoting.Request.call(Request.java:127)
      20:45:52 at hudson.remoting.Channel.call(Channel.java:681)
      20:45:52 at hudson.EnvVars.getRemote(EnvVars.java:202)
      20:45:52 at hudson.model.Computer.getEnvironment(Computer.java:821)
      20:45:52 at hudson.model.Run.getEnvironment(Run.java:1825)
      20:45:52 at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:809)
      20:45:52 at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:295)
      20:45:52 at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:235)
      20:45:52 at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:227)
      20:45:52 at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:189)
      20:45:52 at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
      20:45:52 at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:694)
      20:45:52 at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:669)
      20:45:52 at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:647)
      20:45:52 at hudson.model.Build$RunnerImpl.cleanUp(Build.java:171)
      20:45:52 at hudson.model.Run.run(Run.java:1448)
      20:45:52 at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
      20:45:52 at hudson.model.ResourceController.execute(ResourceController.java:88)
      20:45:52 at hudson.model.Executor.run(Executor.java:230)
      20:45:52 Finished: UNSTABLE

        Attachments

          Issue Links

            Activity

            jpschewe jpschewe created issue -
            laurit Lauri Tulmin made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-12256 [ JENKINS-12256 ]
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Fixed components

            Show
            oleg_nenashev Oleg Nenashev added a comment - Fixed components
            oleg_nenashev Oleg Nenashev made changes -
            Assignee Alex Earl [ slide_o_mix ]
            Component/s email-ext [ 15538 ]
            Component/s matrix-project [ 18765 ]
            Component/s matrix [ 15501 ]
            Hide
            slide_o_mix Alex Earl added a comment -

            The email-ext plugin can catch an interruptedexception, but what this means is that tokens in the email which come from the environment of the job won't work since the plugin is not able to get the envvars.

            Show
            slide_o_mix Alex Earl added a comment - The email-ext plugin can catch an interruptedexception, but what this means is that tokens in the email which come from the environment of the job won't work since the plugin is not able to get the envvars.
            Hide
            slide_o_mix Alex Earl added a comment -

            What version of email-ext is being used?

            Show
            slide_o_mix Alex Earl added a comment - What version of email-ext is being used?
            Hide
            jpschewe jpschewe added a comment -

            When the issue was filed it was the current version of email-ext. I'm currently at 2.37.2 on Jenkins 1.532.2. I haven't seen this happen recently.

            Show
            jpschewe jpschewe added a comment - When the issue was filed it was the current version of email-ext. I'm currently at 2.37.2 on Jenkins 1.532.2. I haven't seen this happen recently.
            Hide
            slide_o_mix Alex Earl added a comment -

            Ok, I'll close it out. Reopen if it comes back. I was never able to reproduce it. For future bugs, please put a specific release number.

            Show
            slide_o_mix Alex Earl added a comment - Ok, I'll close it out. Reopen if it comes back. I was never able to reproduce it. For future bugs, please put a specific release number.
            slide_o_mix Alex Earl made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Cannot Reproduce [ 5 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 141936 ] JNJira + In-Review [ 189889 ]

              People

              • Assignee:
                slide_o_mix Alex Earl
                Reporter:
                jpschewe jpschewe
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: