Summary
REST api index/summary throws java.io.IOException exception
REST Doc: https://docs.atlassian.com/jira/REST/7.2.10/#api/2/index/summary
Java Doc: https://docs.atlassian.com/jira/7.2.10/com/atlassian/jira/index/summary/IndexSummarizer.html
Steps to Reproduce
- Trigger the REST call
Expected Results
No errors in the logs
Actual Results
REST call works, but the below exception is thrown in the atlassian-jira.log file:
2018-02-28 17:01:19,405 http-nio-8081-exec-11 INFO admin 1021x2645x1 lrl854 127.0.0.1 /rest/api/2/index/summary [c.a.j.index.ha.DefaultIndexRecoveryManager] Latest index date: {2018-02-28 15:29:01}, Latest DB date: {2018-02-28 15:29:01} 2018-02-28 17:01:19,415 http-nio-8081-exec-11 ERROR admin 1021x2645x1 lrl854 127.0.0.1 /rest/api/2/index/summary [c.a.j.issue.index.DefaultIndexManager] Error while resetting searcher: ISSUE message: java.io.IOException com.atlassian.jira.index.DelayCloseable$AlreadyClosedException: java.io.IOException at com.atlassian.jira.index.DelayCloseable$Helper.close(DelayCloseable.java:77) at com.atlassian.jira.index.DelayCloseSearcher.close(DelayCloseSearcher.java:57) at com.atlassian.jira.issue.index.SearcherCache.closeSearcher(SearcherCache.java:79) at com.atlassian.jira.issue.index.SearcherCache.closeSearchers(SearcherCache.java:60) at com.atlassian.jira.issue.index.DefaultIndexManager.flushThreadLocalSearchers(DefaultIndexManager.java:1020) at com.atlassian.jira.util.searchers.ThreadLocalSearcherCache.resetSearchers(ThreadLocalSearcherCache.java:31) ... 20 filtered at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25) ... 26 filtered at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException at com.atlassian.jira.index.DelayCloseable$AlreadyClosedException.<init>(DelayCloseable.java:37) ... 57 more
Notes
Under heavy load on Jira and execution of /rest/api/2/index/summary may close index that is still being read by another thread and as a result cause SIGSEGV like this
# A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007f66338faaea, pid=66449, tid=0x00007f4dd99f1700 # # JRE version: Java(TM) SE Runtime Environment (8.0_151-b12) (build 1.8.0_151-b12) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.151-b12 mixed mode linux-amd64 ) # Problematic frame: # J 8554 C2 org.apache.lucene.store.MMapDirectory$MMapIndexInput.readByte()B (81 bytes) @ 0x00007f66338faaea [0x00007f66338faaa0+0x4a]
More information why this is happening can be found here https://issues.apache.org/jira/browse/LUCENE-6943?focusedCommentId=15070960&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15070960
Workaround
Do not use /rest/api/2/index/summary
- is caused by
-
JRASERVER-66967 com.atlassian.jira.index.summary.DefaultIndexSummarizer#getCountOfIssuesInIndex closes issueSearcher
- Closed
- is related to
-
JRASERVER-65321 As an JIRA Datacenter Administrator I want check Lucene status and consistency
- Closed
- is blocked by
-
PSR-82 Loading...
- mentioned in
-
Page Loading...