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

Make ircbot interrupteble

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Would this thread dump be something that could not be interrupted?

       
      WAITING on java.util.concurrent.CountDownLatch$Sync@241036ba
      	at sun.misc.Unsafe.park(Native Method)
      	-  waiting on java.util.concurrent.CountDownLatch$Sync@241036ba
      	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:969)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1281)
      	at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:207)
      	at org.pircbotx.Channel.getMode(Channel.java:127)
      	at hudson.plugins.ircbot.v2.IRCConnection.send(IRCConnection.java:276)
      	at hudson.plugins.ircbot.v2.IRCConnection.send(IRCConnection.java:268)
      	at hudson.plugins.im.IMPublisher.sendNotification(IMPublisher.java:379)
      	at hudson.plugins.im.IMPublisher.notifyChatsOnBuildEnd(IMPublisher.java:585)
      	at hudson.plugins.im.IMPublisher.notifyOnBuildEnd(IMPublisher.java:304)
      	at hudson.plugins.im.IMPublisher.perform(IMPublisher.java:291)
      	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
      	at hudson.model.Build$BuildExecution.post2(Build.java:183)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
      	at hudson.model.Run.execute(Run.java:1770)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:89)
      	at hudson.model.Executor.run(Executor.java:240)
      

      The parent problem is described in https://issues.jenkins-ci.org/browse/JENKINS-22042

        Attachments

          Issue Links

            Activity

            helmo Herman van Rink created issue -
            Hide
            ikedam ikedam added a comment -

            Please report followings:

            • Versions of your Jenkins, instant-messaging-plugin, ircbot-plugin.
            • Was there log outputs? Especially, I expect there was a log like "There was an error sending notification to: XXXX".
            • What happens if you click "x" of a build when the build stucks with ircbot? (that is, abort the build by yourself)
              • As long as I know, the first click works like build-timeout plugin.
              • There's a case that the first click is ignored. In that case, the second click forcibly aborts the build.
            Show
            ikedam ikedam added a comment - Please report followings: Versions of your Jenkins, instant-messaging-plugin, ircbot-plugin. Was there log outputs? Especially, I expect there was a log like "There was an error sending notification to: XXXX". What happens if you click "x" of a build when the build stucks with ircbot? (that is, abort the build by yourself) As long as I know, the first click works like build-timeout plugin. There's a case that the first click is ignored. In that case, the second click forcibly aborts the build.
            ikedam ikedam made changes -
            Field Original Value New Value
            Component/s instant-messaging-plugin [ 15637 ]
            Component/s ircbot-plugin [ 15550 ]
            Issue Type Bug [ 1 ] Improvement [ 4 ]
            Summary CountDownLatch interruptable? Make ircbot interrupteble
            Hide
            helmo Herman van Rink added a comment - - edited
            • Jenkins ver. 1.580.2
            • instant-messaging plugin 1.32
            • ircbot plugin 2.25
            • build timeout plugin 1.14.1
              I upgraded from 1.14.0 after the last hanging jobs)

            The last regular output is as you expected: IRC notifier plugin: Sending notification to: #aegir
            Some more log is already pasted in https://issues.jenkins-ci.org/browse/JENKINS-22042

            From what I can remember the cancel button did work for individual jobs.

            Show
            helmo Herman van Rink added a comment - - edited Jenkins ver. 1.580.2 instant-messaging plugin 1.32 ircbot plugin 2.25 build timeout plugin 1.14.1 I upgraded from 1.14.0 after the last hanging jobs) The last regular output is as you expected: IRC notifier plugin: Sending notification to: #aegir Some more log is already pasted in https://issues.jenkins-ci.org/browse/JENKINS-22042 From what I can remember the cancel button did work for individual jobs.
            Hide
            ikedam ikedam added a comment -

            Build-timeout plugin works only for build steps, not for post-build steps.
            And build-timeout plugin never interrupts ircbot-plugin (I don't know anything about ircbot-plugin, but I suspect ircbot-plugin works as post-build step).
            Please see JENKINS-16875 for more details.

            instant-messaging-plugin may ignore InturruptedException here:
            https://github.com/jenkinsci/instant-messaging-plugin/blob/instant-messaging-1.32/src/main/java/hudson/plugins/im/IMPublisher.java#L316
            That may cause aborting operations ignored when there are multiple targets configured to send messages, but I'm not sure as I don't use those plugins.

            What you can do:

            • To update this issue to report a bug that builds cannot be aborted when ircbot (to be exact, instant-messaging) has multiple targets.
              • I highly recommend you to describe detailed steps to reproduce the problem to let maintainers of those plugins know what happens.
            • To update this issue to request a timeout feature for ircbot-plugin.
            • Or, to close this issue as "Not A Defect".
            Show
            ikedam ikedam added a comment - Build-timeout plugin works only for build steps, not for post-build steps. And build-timeout plugin never interrupts ircbot-plugin (I don't know anything about ircbot-plugin, but I suspect ircbot-plugin works as post-build step). Please see JENKINS-16875 for more details. instant-messaging-plugin may ignore InturruptedException here: https://github.com/jenkinsci/instant-messaging-plugin/blob/instant-messaging-1.32/src/main/java/hudson/plugins/im/IMPublisher.java#L316 That may cause aborting operations ignored when there are multiple targets configured to send messages, but I'm not sure as I don't use those plugins. What you can do: To update this issue to report a bug that builds cannot be aborted when ircbot (to be exact, instant-messaging) has multiple targets. I highly recommend you to describe detailed steps to reproduce the problem to let maintainers of those plugins know what happens. To update this issue to request a timeout feature for ircbot-plugin. Or, to close this issue as "Not A Defect".
            helmo Herman van Rink made changes -
            Link This issue is related to JENKINS-22042 [ JENKINS-22042 ]
            Hide
            helmo Herman van Rink added a comment -

            Thanks ikedam,

            In our case we don't have multiple targets.
            And the IRC notification is done as a post-build step

            I'll close this one and amend https://issues.jenkins-ci.org/browse/JENKINS-22042

            Show
            helmo Herman van Rink added a comment - Thanks ikedam, In our case we don't have multiple targets. And the IRC notification is done as a post-build step I'll close this one and amend https://issues.jenkins-ci.org/browse/JENKINS-22042
            helmo Herman van Rink made changes -
            Resolution Not A Defect [ 7 ]
            Status Open [ 1 ] Resolved [ 5 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 160559 ] JNJira + In-Review [ 196478 ]

              People

              Assignee:
              kohsuke Kohsuke Kawaguchi
              Reporter:
              helmo Herman van Rink
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: