Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-20965

DVCS webhook processing fail with the "There is already an active ThreadEventsCapture" error

      Issue Summary

      Jira's DVCS webhooks respond with the HTTP 500 error and the error message There is already an active ThreadEventsCapture

      Steps to Reproduce

      Could not reproduce

      Expected Results

      The webhooks reaching /rest/bitbucket/1.0/webhook/github are processed normally.

      Actual Results

      The processing fails for some threads.

      Enabling the com.atlassian.jira.plugins.dvcs package as DEBUG, we can see the messages in the logs:

      2021-05-21 17:07:16,075+0000 http-nio-8080-exec-52 DEBUG anonymous 102x1234x5 - X.X.X.X /rest/bitbucket/1.0/webhook/github [c.a.j.p.d.r.external.v1.HookResource] Received GitHub pull_request event
      2021-05-21 17:07:16,076+0000 http-nio-8080-exec-52 DEBUG anonymous 102x1234x5 - X.X.X.X /rest/bitbucket/1.0/webhook/github [c.a.j.p.dvcs.service.RepositoryServiceImpl] Finding repository with URL [https://github.com/myorg/myrepo] for organization [22]
      2021-05-21 17:07:16,090+0000 http-nio-8080-exec-52 DEBUG anonymous 102x1234x5 - X.X.X.X /rest/bitbucket/1.0/webhook/github [c.a.j.p.d.r.external.v1.HookResource] Failed to execute web-hook
      java.lang.IllegalStateException: There is already an active ThreadEventsCapture
      	at com.atlassian.jira.plugins.dvcs.event.ThreadEvents.startCapturing(ThreadEvents.java:45)
      	at com.atlassian.jira.plugins.dvcs.rest.webhook.GitHubHookProcessor.processPullRequest(GitHubHookProcessor.java:231)
      	at com.atlassian.jira.plugins.dvcs.rest.webhook.GitHubHookProcessor.lambda$savePullRequest$5(GitHubHookProcessor.java:221)
      	at java.base/java.util.Optional.ifPresent(Optional.java:183)
      	at com.atlassian.jira.plugins.dvcs.rest.webhook.GitHubHookProcessor.savePullRequest(GitHubHookProcessor.java:221)
      	at com.atlassian.jira.plugins.dvcs.rest.external.v1.HookResource.handlePullRequestEvent(HookResource.java:136)
      	at com.atlassian.jira.plugins.dvcs.rest.external.v1.HookResource.lambda$githubHookEndpoint$2(HookResource.java:120)
      	at com.atlassian.jira.plugins.dvcs.rest.external.v1.HookResource.handleRequest(HookResource.java:156)
      	at com.atlassian.jira.plugins.dvcs.rest.external.v1.HookResource.githubHookEndpoint(HookResource.java:116)
      

      Workaround

      None. Restarting the server should get the webhook processing working again, but the issue is prone to return in the affected environments.

          Form Name

            [JSWSERVER-20965] DVCS webhook processing fail with the "There is already an active ThreadEventsCapture" error

            I would like to request a higher priority for this issue. Our staff is having their daily function impaired by this error. They cannot trust the info in Jira regarding GitHub to be correct, meetings are disrupted and confusion reigns, in the end they have to manually check GitHub every time they wonder about code changes. This happens many times per day and staff end up spending extra hours every week to double check information.

            Deiser Service Team added a comment - I would like to request a higher priority for this issue. Our staff is having their daily function impaired by this error. They cannot trust the info in Jira regarding GitHub to be correct, meetings are disrupted and confusion reigns, in the end they have to manually check GitHub every time they wonder about code changes. This happens many times per day and staff end up spending extra hours every week to double check information.

            Raju Kadam added a comment -

            Workaround doesn't seem to be doing anything helpful to get rid of this error. Can you please take a look at the error up close to get the resolution.

            Raju Kadam added a comment - Workaround doesn't seem to be doing anything helpful to get rid of this error. Can you please take a look at the error up close to get the resolution.

            Joyce A added a comment -

            Are there plans to fix this item?  The Workaround did not work for us.

            Joyce A added a comment - Are there plans to fix this item?  The Workaround did not work for us.

              1c017edd2c81 awojtasik
              5fb7769fcbc7 Allan Gandelman
              Affected customers:
              54 This affects my team
              Watchers:
              34 Start watching this issue

                Created:
                Updated:
                Resolved: