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

            integer Kanstantsin Shautsou created issue -
            integer Kanstantsin Shautsou made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-29792 [ JENKINS-29792 ]
            integer Kanstantsin Shautsou made changes -
            Link This issue is related to JENKINS-29790 [ JENKINS-29790 ]
            integer Kanstantsin Shautsou made changes -
            Link This issue is related to JENKINS-29787 [ JENKINS-29787 ]
            integer Kanstantsin Shautsou made changes -
            Link This issue is related to JENKINS-29698 [ JENKINS-29698 ]
            integer Kanstantsin Shautsou made changes -
            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 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.
            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.
            integer Kanstantsin Shautsou made changes -
            Assignee Kanstantsin Shautsou [ integer ]
            integer Kanstantsin Shautsou made changes -
            Status Open [ 1 ] In Progress [ 3 ]

            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.
            integer Kanstantsin Shautsou made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]

            Linked one more issue

            integer Kanstantsin Shautsou added a comment - Linked one more issue
            integer Kanstantsin Shautsou made changes -
            Link This issue is related to JENKINS-29876 [ JENKINS-29876 ]
            integer Kanstantsin Shautsou made changes -
            Link This issue is related to JENKINS-30145 [ JENKINS-30145 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 164870 ] JNJira + In-Review [ 197567 ]
            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: