Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-74683

JiraIndexCommitThread error caused by ConcurrentModificationException in logs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 9.7.0
    • 8.0.0, 9.4.0, 8.13.27, 9.5.0, 8.20.16
    • Indexing

    Description

      Issue Summary

      This is reproducible on Data Center: yes

      The following error and stack trace occur in Jira log file occasionally.

      2021-05-31 01:27:40,319+0000 JiraIndexCommitThread-44 ERROR      [c.a.jira.index.PeriodicIndexWriterCommitScheduler] Error(s) during the commit of index writers. Aborting until next scheduled attempt
      java.util.ConcurrentModificationException
      	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1445)
      	at java.util.HashMap$KeyIterator.next(HashMap.java:1469)
      	at java.util.AbstractCollection.addAll(AbstractCollection.java:343)
      	at com.atlassian.jira.index.PeriodicIndexWriterCommitScheduler.commitWriters(PeriodicIndexWriterCommitScheduler.java:111)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at com.atlassian.jira.util.thread.JiraThreadLocalUtils.lambda$wrap$1(JiraThreadLocalUtils.java:156)
      	at java.lang.Thread.run(Thread.java:748)
       

      The root cause of this error is concurrency bug introduced in 8.0 and unless it's happening every minute its impact on performance and data integrity is negligible.

      Only known side effect is slight increase of period of missing data in case https://jira.atlassian.com/browse/JRASERVER-74304 happens(note JRASERVER-74304 is fixed in 9.4.1/9.5.1+ and the fix is planned be backported to 8.20 in a couple of weeks). In such case, if there's index snapshot creation triggered within 30 seconds after the error occurred, the snapshot might be missing up to 60s of recent issue updates.

      Steps to Reproduce

      There are no known steps to reproduce. The probability of this error occurring grows with intensity of operations on issues happening on instance.

      Expected Results

      No error occurs. Index changes are flushed to disk every 30 seconds.

      Actual Results

      Error occurs. Index operarions from last 30 seconds are not flushed to disk and scheduled for retry. Next run of JiraIndexCommitThread attempts to flush the pending changes again 30 seconds later.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

       

      Attachments

        Issue Links

          Activity

            People

              mswinarski Maciej Swinarski (Inactive)
              jreczycki Jakub Reczycki
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: