-
Bug
-
Resolution: Fixed
-
High (View bug fix roadmap)
-
8.5.6, 8.14.1, 8.16.1, 8.17.1, 8.18.2, 8.20.1, 8.20.2, 8.20.6
-
8.05
-
30
-
Severity 3 - Minor
-
67
-
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 |
---|
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.