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

Maven job stuck when slave channel get disconnected

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I find a way to trigger a remoting problem using tcp fault injection with netem. I'm able to trigger this wait call at hudson.remoting.Request.call(Request.java:146):

      while(response==null && !channel.isInClosed())
        // I don't know exactly when this can happen, as pendingCalls are cleaned up by Channel,
        // but in production I've observed that in rare occasion it can block forever, even after a channel
        // is gone. So be defensive against that.
        wait(30*1000);
      

      When this wait is triggered, the running build is stuck and consumes a executor. It loops over and over on the wait.

      To reproduce, setup a SSH slave using the attached Dockerfile, and setup netem on the docker0 bridge like this:

      tc qdisc add dev docker0 root netem
      tc qdisc change dev docker0 root netem corrupt 1
      

      Testing requires to run the job one time before configuring netem, as netem settings are applied to all network streams, it could fail while downloading Maven dependencies. I just launched a Maven build of a example project to trigger the problem. It might be a Maven specific problem...

      To remove netem settings, just run tc qdisc del dev docker0 root.

      I've attached the Dockerfile, the command I used to launch it and a threaddump of a Jenkins stuck master.

        Attachments

        1. Dockerfile
          0.4 kB
        2. launch.sh
          0.0 kB
        3. stacktrace.txt
          44 kB

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/hudson/maven/AbstractMavenProcessFactory.java
            http://jenkins-ci.org/commit/maven-plugin/51b204897c19c9be3b03a0a80482d096ae1db3e3
            Log:
            Revert "[FIX JENKINS-26947] forcibly terminate Maven remoting channel when upstream channel get closed"
            [FIXED JENKINS-22252] Caused a regression.
            This reverts commit 47b28737803ef90bc7e6518e159df28471988bae.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/maven/AbstractMavenProcessFactory.java http://jenkins-ci.org/commit/maven-plugin/51b204897c19c9be3b03a0a80482d096ae1db3e3 Log: Revert " [FIX JENKINS-26947] forcibly terminate Maven remoting channel when upstream channel get closed" [FIXED JENKINS-22252] Caused a regression. This reverts commit 47b28737803ef90bc7e6518e159df28471988bae.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/hudson/maven/AbstractMavenProcessFactory.java
            http://jenkins-ci.org/commit/maven-plugin/e85502ac9b4e05f8ff8a476c795057a770cdc97f
            Log:
            Merge pull request #52 from jglick/IllegalAccessError-JENKINS-22252

            JENKINS-22252 Revert JENKINS-26947 fix

            Compare: https://github.com/jenkinsci/maven-plugin/compare/22dcb14846e2...e85502ac9b4e

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/maven/AbstractMavenProcessFactory.java http://jenkins-ci.org/commit/maven-plugin/e85502ac9b4e05f8ff8a476c795057a770cdc97f Log: Merge pull request #52 from jglick/IllegalAccessError- JENKINS-22252 JENKINS-22252 Revert JENKINS-26947 fix Compare: https://github.com/jenkinsci/maven-plugin/compare/22dcb14846e2...e85502ac9b4e
            Hide
            jglick Jesse Glick added a comment -

            Reverting fix.

            Show
            jglick Jesse Glick added a comment - Reverting fix.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            It is still applicable AFAICT though some related fixes have been applied on the Remoting side

            Show
            oleg_nenashev Oleg Nenashev added a comment - It is still applicable AFAICT though some related fixes have been applied on the Remoting side
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            No plan to work on it anytime soon

            Show
            oleg_nenashev Oleg Nenashev added a comment - No plan to work on it anytime soon

              People

              • Assignee:
                Unassigned
                Reporter:
                ydubreuil Yoann Dubreuil
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: