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

Channel's executorService's pool should have a name

      In Jenkins thread dump I can see something like this:

      pool-4-thread-18865

      "pool-4-thread-18865" Id=375223 Group=main TIMED_WAITING on java.util.concurrent.SynchronousQueue$TransferStack@1412ebc5
      at sun.misc.Unsafe.park(Native Method)

      • waiting on java.util.concurrent.SynchronousQueue$TransferStack@1412ebc5
        at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:196)
        at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:424)
        at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
        at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:874)
        at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:955)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:917)
        at java.lang.Thread.run(Thread.java:662)

      pool-4-thread-18866

      "pool-4-thread-18866" Id=375224 Group=main BLOCKED on com.thoughtworks.xstream.mapper.AnnotationMapper$WeakHashSet@41deb94c owned by "pool-4-thread-18870" Id=375228

      My guess is, that these pools are the tread pools of the executors asssociated to channels as constructred e.g. in Launcher#main

      Would be nice, if theses pools/threads would have non-generic name - i.e. names which make it obvious where the threads come form

          [JENKINS-19004] Channel's executorService's pool should have a name

          kutzi added a comment -

          On a slightly related note I wonder if it is good that the the ExecutorService in Launcher#main is created as a cached thread pool executor.
          I guess that is reason for the insanely high thread numbers (18866+) and probably also worsens the impact of contention bugs like JENKINS-13154

          kutzi added a comment - On a slightly related note I wonder if it is good that the the ExecutorService in Launcher#main is created as a cached thread pool executor. I guess that is reason for the insanely high thread numbers (18866+) and probably also worsens the impact of contention bugs like JENKINS-13154

          kutzi added a comment -

          I think, I can answer my previously comment by myself:
          Limiting the number of the threads in the thread pool - no matter how high the number of threads would be - would always bear the danger of deadlocks

          kutzi added a comment - I think, I can answer my previously comment by myself: Limiting the number of the threads in the thread pool - no matter how high the number of threads would be - would always bear the danger of deadlocks

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          core/src/main/java/hudson/model/Computer.java
          http://jenkins-ci.org/commit/jenkins/de6bb5c500c0c60d876564608051248c19a558d7
          Log:
          JENKINS-19004 set name of remoting threads

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: core/src/main/java/hudson/model/Computer.java http://jenkins-ci.org/commit/jenkins/de6bb5c500c0c60d876564608051248c19a558d7 Log: JENKINS-19004 set name of remoting threads

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          core/src/main/java/hudson/model/Computer.java
          http://jenkins-ci.org/commit/jenkins/78b5121b21447d01ff6edb9d10bf8cd35cea094c
          Log:
          Merge pull request #895 from kutzi/JENKINS-19004-channel-executor-name

          JENKINS-19004 set name of remoting threads

          Compare: https://github.com/jenkinsci/jenkins/compare/711316a5bed0...78b5121b2144

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: core/src/main/java/hudson/model/Computer.java http://jenkins-ci.org/commit/jenkins/78b5121b21447d01ff6edb9d10bf8cd35cea094c Log: Merge pull request #895 from kutzi/ JENKINS-19004 -channel-executor-name JENKINS-19004 set name of remoting threads Compare: https://github.com/jenkinsci/jenkins/compare/711316a5bed0...78b5121b2144

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          src/main/java/hudson/remoting/Request.java
          http://jenkins-ci.org/commit/remoting/ae3ed9159adaddef444165e0660aa4d8d877bbcd
          Log:
          JENKINS-19004 set name for remoting threads

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: src/main/java/hudson/remoting/Request.java http://jenkins-ci.org/commit/remoting/ae3ed9159adaddef444165e0660aa4d8d877bbcd Log: JENKINS-19004 set name for remoting threads

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          src/main/java/hudson/remoting/Request.java
          http://jenkins-ci.org/commit/remoting/d43ea72d64af285de2cfaeadae4b5420fbe36b71
          Log:
          Merge pull request #17 from kutzi/JENKINS-19004-channel-executor-name

          JENKINS-19004 set name for remoting threads

          Compare: https://github.com/jenkinsci/remoting/compare/91f09c22bac8...d43ea72d64af

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: src/main/java/hudson/remoting/Request.java http://jenkins-ci.org/commit/remoting/d43ea72d64af285de2cfaeadae4b5420fbe36b71 Log: Merge pull request #17 from kutzi/ JENKINS-19004 -channel-executor-name JENKINS-19004 set name for remoting threads Compare: https://github.com/jenkinsci/remoting/compare/91f09c22bac8...d43ea72d64af

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2819
          JENKINS-19004 set name of remoting threads (Revision de6bb5c500c0c60d876564608051248c19a558d7)

          Result = SUCCESS
          Christoph Kutzinski : de6bb5c500c0c60d876564608051248c19a558d7
          Files :

          • core/src/main/java/hudson/model/Computer.java

          dogfood added a comment - Integrated in jenkins_main_trunk #2819 JENKINS-19004 set name of remoting threads (Revision de6bb5c500c0c60d876564608051248c19a558d7) Result = SUCCESS Christoph Kutzinski : de6bb5c500c0c60d876564608051248c19a558d7 Files : core/src/main/java/hudson/model/Computer.java

          Jesse Glick added a comment -

          Jesse Glick added a comment - Remoting fix integrated in: https://github.com/jenkinsci/jenkins/commit/4137c46182a0652d2eed2897a1e797bdc3f8c7f9

          Code changed in jenkins
          User: Oliver Gondža
          Path:
          http://jenkins-ci.org/commit/jenkins/5cf3e28c4885a86a4dad3463952e1aae34932f9c
          Log:
          [FIXED JENKINS-20093 JENKINS-19453 JENKINS-19004 JENKINS-8856] Noting retroactively

          Backported as 23424ea7dbced486963a73d6bf56e8367ab779dd

          Compare: https://github.com/jenkinsci/jenkins/compare/7d602d52b445...5cf3e28c4885

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: http://jenkins-ci.org/commit/jenkins/5cf3e28c4885a86a4dad3463952e1aae34932f9c Log: [FIXED JENKINS-20093 JENKINS-19453 JENKINS-19004 JENKINS-8856] Noting retroactively Backported as 23424ea7dbced486963a73d6bf56e8367ab779dd Compare: https://github.com/jenkinsci/jenkins/compare/7d602d52b445...5cf3e28c4885

          Daniel Beck added a comment -

          Reopening temporarily to note inclusion in LTS.

          Daniel Beck added a comment - Reopening temporarily to note inclusion in LTS.

            kutzi kutzi
            kutzi kutzi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: