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

Leaking ircbot OutputThreads

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Fixed
    • ircbot-plugin
    • we are running on Jenkins Jenkins ver. 1.565.3 with irc plugin 2.25 / CentOS 6.5 / OpenJdk 1.6

    Description

      Hi Everybody,

      We have a Jenkins instance that connects to a irc server over ipsec, the Jenkins server after running for over a week, ends up with about 300 OutputThreads for the irc-plugin .

      The connection to the irc server is bit flaky , so it seems to get disconnected from time to time, our theory is that the OutputThreads are not getting interrupted after the connection is lost and re-established.

      So everytime we reconnect another Outputthread is leaked.

      When we take jstack dump on the jenkins process this is what we see below (I truncated the output to reduce the size of the email), please let me know if any further info is need to throubleshoot this issue:

      Thanks in advance,
      Luciano


      "bot283-output" daemon prio=10 tid=0x00007fd518159800 nid=0x7b3 waiting on condition [0x00007fd3d62e1000]
      java.lang.Thread.State: WAITING (parking)
      at sun.misc.Unsafe.park(Native Method)

      • parking to wait for <0x00000005912d31b0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)
        at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:386)
        at org.pircbotx.OutputThread.run(OutputThread.java:101)


      "bot282-output" daemon prio=10 tid=0x00007fd518158800 nid=0x7ff0 waiting on condition [0x00007fd3ca6a5000]
      java.lang.Thread.State: WAITING (parking)
      at sun.misc.Unsafe.park(Native Method)

      • parking to wait for <0x0000000590b18d98> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)
        at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:386)
        at org.pircbotx.OutputThread.run(OutputThread.java:101)


      "bot281-output" daemon prio=10 tid=0x00007fd518157800 nid=0x75c9 waiting on condition [0x00007fd3cebea000]
      java.lang.Thread.State: WAITING (parking)
      at sun.misc.Unsafe.park(Native Method)

      • parking to wait for <0x0000000590219238> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)
        at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:386)
        at org.pircbotx.OutputThread.run(OutputThread.java:101)


      "bot280-output" daemon prio=10 tid=0x00007fd518156800 nid=0x6f40 waiting on condition [0x00007fd3c9f9e000]
      java.lang.Thread.State: WAITING (parking)
      at sun.misc.Unsafe.park(Native Method)

      • parking to wait for <0x0000000587ad2da0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)
        at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:386)
        at org.pircbotx.OutputThread.run(OutputThread.java:101)

      Attachments

        Issue Links

          Activity

            kutzi kutzi added a comment -

            Could you attach the full stack dump, please?

            kutzi kutzi added a comment - Could you attach the full stack dump, please?

            I have attached the full stack dump.

            lrfurtado Luciano Furtado added a comment - I have attached the full stack dump.
            kutzi kutzi added a comment -

            I think I have a fix for this. Would you like to test https://dl.dropboxusercontent.com/u/25863594/ircbot.hpi
            ?

            kutzi kutzi added a comment - I think I have a fix for this. Would you like to test https://dl.dropboxusercontent.com/u/25863594/ircbot.hpi ?

            Code changed in jenkins
            User: Christoph Kutzinski
            Path:
            src/main/java/hudson/plugins/ircbot/v2/IRCConnection.java
            http://jenkins-ci.org/commit/ircbot-plugin/98b0105a743d062abf957c285cdded06fedd3fa3
            Log:
            Proper freeing of resources (e.g. output-thread) when connection is
            closed JENKINS-25349
            Don't know why I disabled this initially.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: src/main/java/hudson/plugins/ircbot/v2/IRCConnection.java http://jenkins-ci.org/commit/ircbot-plugin/98b0105a743d062abf957c285cdded06fedd3fa3 Log: Proper freeing of resources (e.g. output-thread) when connection is closed JENKINS-25349 Don't know why I disabled this initially.

            People

              kutzi kutzi
              lrfurtado Luciano Furtado
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: