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

Port allocation blocks jobs from executing concurrently

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: port-allocator-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.523, port-allocator 1.6
    • Similar Issues:

      Description

      I'm assigning one port in configuration, called Arquillian. When using version 1.6 of port allocator, only one job starts execution and others are blocked by it.

      Thread dump had following:

      "Executor #1 for virt-slave1 : executing Project #3464" Id=38 Group=main WAITING on hudson.model.Queue@67a7efcb
              at java.lang.Object.wait(Native Method)
              -  waiting on hudson.model.Queue@67a7efcb
              at java.lang.Object.wait(Object.java:503)
              at hudson.model.ResourceController.execute(ResourceController.java:80)
              at hudson.model.Executor.run(Executor.java:247)
      
      
      "Executor #5 for virt-slave1 : executing Project #3465" Id=42 Group=main WAITING on hudson.model.Queue@67a7efcb
              at java.lang.Object.wait(Native Method)
              -  waiting on hudson.model.Queue@67a7efcb
              at java.lang.Object.wait(Object.java:503)
              at hudson.model.ResourceController.execute(ResourceController.java:80)
              at hudson.model.Executor.run(Executor.java:247)
      
      "Executor #4 for virt-slave2 : executing Project #3463 / waiting for hudson.remoting.Channel@279eb40d:virt-slave2" Id=48 Group=main TIMED_WAITING on hudson.remoting.UserRequest@20f46461
              at java.lang.Object.wait(Native Method)
              -  waiting on hudson.remoting.UserRequest@20f46461
              at hudson.remoting.Request.call(Request.java:146)
              at hudson.remoting.Channel.call(Channel.java:722)
              at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:162)
              at com.sun.proxy.$Proxy32.join(Unknown Source)
              at hudson.Launcher$RemoteLauncher$ProcImpl.join(Launcher.java:925)
              at hudson.Launcher$ProcStarter.join(Launcher.java:360)
              at hudson.tasks.Maven.perform(Maven.java:327)
              at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
              at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
              at hudson.model.Build$BuildExecution.build(Build.java:199)
              at hudson.model.Build$BuildExecution.doRun(Build.java:160)
              at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
              at hudson.model.Run.execute(Run.java:1593)
              at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
              at hudson.model.ResourceController.execute(ResourceController.java:88)
              at hudson.model.Executor.run(Executor.java:247)
      
      Executor #5 for virt-slave1 : executing Project #3465
      
      "Executor #5 for virt-slave1 : executing Project #3465" Id=42 Group=main WAITING on hudson.model.Queue@67a7efcb
              at java.lang.Object.wait(Native Method)
              -  waiting on hudson.model.Queue@67a7efcb
              at java.lang.Object.wait(Object.java:503)
              at hudson.model.ResourceController.execute(ResourceController.java:80)
              at hudson.model.Executor.run(Executor.java:247)
      

      After adding https://github.com/jenkinsci/jenkins/pull/853, log got following lines:

      Jul 17, 2013 7:23:45 AM hudson.model.ResourceList _getConflict
      INFO: Collision with standalone port ARQUILLIAN(1)=1 and standalone port ARQUILLIAN(1)
      

      Downgrading to version 1.5 of port allocator solved the problem

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Richard Mortimer
          Path:
          src/main/java/org/jvnet/hudson/plugins/port_allocator/PortAllocator.java
          http://jenkins-ci.org/commit/port-allocator-plugin/d025ea2381780f3303572ba845bd828de37bdb5e
          Log:
          [FIXED JENKINS-18786] Port allocation blocks jobs from executing concurrently

          The fix for JENKINS-11255 uses Resources to block the execution of jobs
          requiring the same port configuration. However this does not take into
          account the node that the port is to be reserved on and also ranges of
          ports. Revert to the old behaviour for all but pooled ports.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Richard Mortimer Path: src/main/java/org/jvnet/hudson/plugins/port_allocator/PortAllocator.java http://jenkins-ci.org/commit/port-allocator-plugin/d025ea2381780f3303572ba845bd828de37bdb5e Log: [FIXED JENKINS-18786] Port allocation blocks jobs from executing concurrently The fix for JENKINS-11255 uses Resources to block the execution of jobs requiring the same port configuration. However this does not take into account the node that the port is to be reserved on and also ranges of ports. Revert to the old behaviour for all but pooled ports.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Richard Mortimer
          Path:
          src/main/java/org/jvnet/hudson/plugins/port_allocator/PortAllocator.java
          http://jenkins-ci.org/commit/port-allocator-plugin/cc37a51d4e7e06c9421c2a888337aa154d4e8e9a
          Log:
          Merge pull request #3 from oldelvet/jenkins-18786

          [FIXED JENKINS-18786] Port allocation blocks jobs from executing concurrently

          Compare: https://github.com/jenkinsci/port-allocator-plugin/compare/eb52ee640845...cc37a51d4e7e

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Richard Mortimer Path: src/main/java/org/jvnet/hudson/plugins/port_allocator/PortAllocator.java http://jenkins-ci.org/commit/port-allocator-plugin/cc37a51d4e7e06c9421c2a888337aa154d4e8e9a Log: Merge pull request #3 from oldelvet/jenkins-18786 [FIXED JENKINS-18786] Port allocation blocks jobs from executing concurrently Compare: https://github.com/jenkinsci/port-allocator-plugin/compare/eb52ee640845...cc37a51d4e7e
          Hide
          oldelvet Richard Mortimer added a comment -

          I have released 1.7 with my simple fix (pull/3) that has already been tested. Will release Peter's full fix including Pooled ports once Peter has had chance to test.

          Show
          oldelvet Richard Mortimer added a comment - I have released 1.7 with my simple fix (pull/3) that has already been tested. Will release Peter's full fix including Pooled ports once Peter has had chance to test.
          Hide
          pepov Peter Wilcsinszky added a comment -

          With pull request 4 it will be ok with pooled ports too, I've just tested it. Please merge that and release it as well!

          Show
          pepov Peter Wilcsinszky added a comment - With pull request 4 it will be ok with pooled ports too, I've just tested it. Please merge that and release it as well!
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: pepov
          Path:
          src/main/java/org/jvnet/hudson/plugins/port_allocator/PortAllocator.java
          http://jenkins-ci.org/commit/port-allocator-plugin/4af186b01585328bf0ae3299018f9872784c01d9
          Log:
          JENKINS-18786 remove ResourceActivity, that blocks jobs on different slaves

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: pepov Path: src/main/java/org/jvnet/hudson/plugins/port_allocator/PortAllocator.java http://jenkins-ci.org/commit/port-allocator-plugin/4af186b01585328bf0ae3299018f9872784c01d9 Log: JENKINS-18786 remove ResourceActivity, that blocks jobs on different slaves

            People

            Assignee:
            oldelvet Richard Mortimer
            Reporter:
            jyrkip Jyrki Puttonen
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: