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

race conditions in Triggers

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Fixed
    • core
    • None

    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

            Sent PRs to all found issues.

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

            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

            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

            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.

            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.

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

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

            Linked one more issue

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

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

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

            Without details it empty words.

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

            People

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

              Dates

                Created:
                Updated:
                Resolved: