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

race conditions in Triggers

    XMLWordPrintable

    Details

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

      Description

      I saw it before, but seems JENKINS-29792 exposed it more obviously.

      1) Trigger has no synchronisation for calling run/stop after start() that initialises 'job' variable or any other plugin specified fields that can be used in run/stop
      2) Seems UI config submit always calls stop() even if trigger wasn't start, so either some API handlers/checks should exist, either stop/run must do null check and simply skip execution.

        Attachments

          Issue Links

            Activity

            Hide
            integer Kanstantsin Shautsou added a comment -

            Sent PRs to all found issues.

            Show
            integer Kanstantsin Shautsou added a comment - Sent PRs to all found issues.
            Hide
            integer Kanstantsin Shautsou added a comment -

            Another part of traces is Action pages that contributing createProjectAction() and expecting job exist. But this issues existed before and many Trigger plugins bypassed it by skipping createProjectActions() if job is null

            Show
            integer Kanstantsin Shautsou added a comment - Another part of traces is Action pages that contributing createProjectAction() and expecting job exist. But this issues existed before and many Trigger plugins bypassed it by skipping createProjectActions() if job is null
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Kanstantsin Shautsou
            Path:
            src/main/java/com/cloudbees/jenkins/GitHubPushTrigger.java
            http://jenkins-ci.org/commit/github-plugin/18aca714ac992d6c08fa4999fd09cd0e396ff50b
            Log:
            [FIXED JENKINS-29787] Fix NPE for race condition.

            See JENKINS-29794 for details.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kanstantsin Shautsou Path: src/main/java/com/cloudbees/jenkins/GitHubPushTrigger.java http://jenkins-ci.org/commit/github-plugin/18aca714ac992d6c08fa4999fd09cd0e396ff50b Log: [FIXED JENKINS-29787] Fix NPE for race condition. See JENKINS-29794 for details.
            Hide
            integer Kanstantsin Shautsou added a comment -

            Don't see other places, closing as fixed for now.

            Show
            integer Kanstantsin Shautsou added a comment - Don't see other places, closing as fixed for now.
            Hide
            integer Kanstantsin Shautsou added a comment -

            Linked one more issue

            Show
            integer Kanstantsin Shautsou added a comment - Linked one more issue
            Hide
            linkmjb Matthew Bates added a comment -

            I've started to see this problem again, after upgrading to Jenkins 2.19.4

            Show
            linkmjb Matthew Bates added a comment - I've started to see this problem again, after upgrading to Jenkins 2.19.4
            Hide
            integer Kanstantsin Shautsou added a comment -

            Without details it empty words.

            Show
            integer Kanstantsin Shautsou added a comment - Without details it empty words.

              People

              Assignee:
              integer Kanstantsin Shautsou
              Reporter:
              integer Kanstantsin Shautsou
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: