Uploaded image for project: 'Jira Software Server and Data Center'
  1. Jira Software Server and Data Center
  2. JSWSERVER-20612

Dev.Status can get stuck paging over issue updates from Bitbucket Server, Bamboo or Fecru and cause excessive load on database

    XMLWordPrintable

    Details

      Description

      Issue Summary

      Whenever Jira misses enough issue updates from dev.tools so they don't fit into single fetch that Guaranteed Deliver does, it'll get stuck looping over results over and over.

      Steps to Reproduce

      1. Make Jira to miss enough updates from Bitbucket Server/Bamboo/FeCru so there are more than 50 issues to fetch
      2. Wait for Guaranteed delivery job to run

      Expected Results

      Jira catches up with missed updates.

      Actual Results

      Jira's stuck looping over the first page over and over
      Example of the thread dump with the stack trace:

      "Caesium-1-4" #442 daemon prio=5 os_prio=0 tid=0x00007fef0815d800 nid=0x1b93 runnable [0x00007fef0ccf3000]
         java.lang.Thread.State: RUNNABLE
      	at java.net.SocketInputStream.socketRead0(Native Method)
      ....
      	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1978)
      	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:309)
      	- locked <0x00000007b4fc0268> (a org.postgresql.core.v3.QueryExecutorImpl)
      	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:446)
      	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:370)
      ...
      	at org.ofbiz.core.entity.jdbc.SQLProcessor.executeQuery(SQLProcessor.java:527)
      	at org.ofbiz.core.entity.GenericDAO.createEntityListIterator(GenericDAO.java:877)
      	at org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:857)
      	at org.ofbiz.core.entity.GenericDAO.selectByCondition(GenericDAO.java:795)
      	at org.ofbiz.core.entity.GenericDAO.selectByCondition(GenericDAO.java:775)
      	at org.ofbiz.core.entity.GenericHelperDAO.findByCondition(GenericHelperDAO.java:198)
      	at org.ofbiz.core.entity.GenericDelegator.findByCondition(GenericDelegator.java:1091)
      	at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findByCondition(DefaultOfBizDelegator.java:154)
      	at com.atlassian.jira.ofbiz.WrappingOfBizDelegator.findByCondition(WrappingOfBizDelegator.java:240)
      	at com.atlassian.jira.issue.managers.DefaultIssueManager.getPreviousIssueKeysForMovedIssues(DefaultIssueManager.java:453)
      	at com.atlassian.jira.issue.managers.DefaultIssueManager.getAllIssueKeys(DefaultIssueManager.java:439)
      	at com.atlassian.jira.issue.managers.RequestCachingIssueManager.getAllIssueKeys(RequestCachingIssueManager.java:175)
      ....
      	at com.atlassian.jira.plugin.devstatus.provider.IssueDataRequest.createRequest(IssueDataRequest.java:40)
      	at com.atlassian.jira.plugin.devstatus.provider.DefaultCachingProviderHelper.refresh(DefaultCachingProviderHelper.java:104)
      	at com.atlassian.jira.plugin.devstatus.provider.DefaultCachingProviderHelper.refreshProvider(DefaultCachingProviderHelper.java:68)
      	at com.atlassian.jira.plugin.devstatus.provider.DefaultDevSummaryPollService.handlePollingSuccess(DefaultDevSummaryPollService.java:71)
      	at com.atlassian.jira.plugin.devstatus.provider.DefaultDevSummaryPollService.lambda$performPull$1(DefaultDevSummaryPollService.java:52)
      	at com.atlassian.jira.plugin.devstatus.provider.DefaultDevSummaryPollService$$Lambda$11148/932905286.apply(Unknown Source)
      	at com.atlassian.jira.plugin.devstatus.provider.source.applink.PollResult$PollResultSuccess.fold(PollResult.java:51)
      	at com.atlassian.jira.plugin.devstatus.provider.DefaultDevSummaryPollService.performPull(DefaultDevSummaryPollService.java:50)
      	at com.atlassian.jira.plugin.devstatus.provider.DevSummaryUpdateJob$$Lambda$11014/704142687.accept(Unknown Source)
      ...
      	at com.atlassian.jira.plugin.devstatus.provider.DevSummaryUpdateJob.runJob(DevSummaryUpdateJob.java:85)
      ...
      	at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.run(SchedulerQueueWorker.java:35)
      	at java.lang.Thread.run(Thread.java:748)
      
      • Note: DefaultDevSummaryPollService.performPull, this method is stuck in endless loop.

      Workaround

      • Restart Jira to stop the thread with loop
      • To prevent future problems:
        • Change the system property for number of issues to be fetched. Set jira.devstatus.guaranteed.delivery.fetch.size to values of 500 or even higher.
        • Note: for system property changes to be applied a restart of Jira is required.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              aermolenko aner
              Reporter:
              aermolenko aner
              Votes:
              2 Vote for this issue
              Watchers:
              18 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: