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

SingleLevelGroupByReport with Empty Filter Causes OOME

XMLWordPrintable

      Possibly related: JRASERVER-63315

      Problem

      When generating a report with an empty filter, the SingleLevelGroupByReport attempts to store all issues on a single page, consuming a massive amount of memory. When an empty JQL filter is provided, it attempts to store all issues available, resulting in OOME.

      http-nio-8080-exec-70    url:/secure/ConfigureReport.jspa
        at org.apache.lucene.store.DataInput.readString (DataInput.java:182)
        at org.apache.lucene.index.FieldsReader.addField (FieldsReader.java:431)
        at org.apache.lucene.index.FieldsReader.doc (FieldsReader.java:261)
        at org.apache.lucene.index.SegmentReader.document (SegmentReader.java:471)
        at org.apache.lucene.index.DirectoryReader.document (DirectoryReader.java:564)
        at org.apache.lucene.index.IndexReader.document (IndexReader.java:844)
        at com.atlassian.jira.issue.statistics.util.OneDimensionalDocIssueHitCollector.getDocument (OneDimensionalDocIssueHitCollector.java:53)
        at com.atlassian.jira.issue.statistics.util.OneDimensionalDocIssueHitCollector.collectWithTerms (OneDimensionalDocIssueHitCollector.java:45)
        at com.atlassian.jira.issue.statistics.util.AbstractOneDimensionalHitCollector.collect (AbstractOneDimensionalHitCollector.java:166)
        at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.searchAndSort (LuceneSearchProvider.java:349)
        at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.searchAndSort (LuceneSearchProvider.java:140)
        at sun.reflect.GeneratedMethodAccessor1725.invoke (Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke (Method.java:498)
        at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke (ContextClassLoaderSettingInvocationHandler.java:26)
        at com.sun.proxy.$Proxy47.searchAndSort (Unknown Source)
        at sun.reflect.GeneratedMethodAccessor1725.invoke (Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke (Method.java:498)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection (AopUtils.java:317)
        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke (ServiceInvoker.java:56)
        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke (ServiceInvoker.java:60)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed (DelegatingIntroductionInterceptor.java:133)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke (DelegatingIntroductionInterceptor.java:121)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (ReflectiveMethodInvocation.java:179)
        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged (ServiceTCCLInterceptor.java:70)
        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke (ServiceTCCLInterceptor.java:53)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (ReflectiveMethodInvocation.java:179)
        at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke (LocalBundleContextAdvice.java:57)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed (DelegatingIntroductionInterceptor.java:133)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke (DelegatingIntroductionInterceptor.java:121)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke (JdkDynamicAopProxy.java:207)
        at com.sun.proxy.$Proxy2163.searchAndSort (Unknown Source)
        at com.atlassian.jira.plugin.corereports.report.impl.SingleLevelGroupByReport.searchMapIssueKeys (SingleLevelGroupByReport.java:100)
        at com.atlassian.jira.plugin.corereports.report.impl.SingleLevelGroupByReport.getOptions (SingleLevelGroupByReport.java:85)
        at com.atlassian.jira.plugin.corereports.report.impl.SingleLevelGroupByReport.generateReportHtml (SingleLevelGroupByReport.java:126)
        at com.atlassian.jira.plugin.corereports.web.action.ConfigureReport.doExecute (ConfigureReport.java:172)
        at webwork.action.ActionSupport.execute (ActionSupport.java:165)
        at com.atlassian.jira.action.JiraActionSupport.execute (JiraActionSupport.java:63)
        at webwork.interceptor.DefaultInterceptorChain.proceed (DefaultInterceptorChain.java:39)
        at webwork.interceptor.NestedInterceptorChain.proceed (NestedInterceptorChain.java:31)
        at webwork.interceptor.ChainedInterceptor.intercept (ChainedInterceptor.java:16)
        at webwork.interceptor.DefaultInterceptorChain.proceed (DefaultInterceptorChain.java:35)
        at webwork.dispatcher.GenericDispatcher.executeAction (GenericDispatcher.java:225)
        at webwork.dispatcher.GenericDispatcher.executeAction (GenericDispatcher.java:154)
      

      Workaround

      Change the "Disable empty JQL queries" admin setting (it was introduced as part of https://jira.atlassian.com/browse/JRASERVER-65602):

      With this turned on, empty filter will return no results and will not cause memory pressure on instances with large number of issues.

        1. image-2024-10-16-15-06-17-744.png
          7 kB
          Bartosz Radaczyński
        2. image-2024-10-16-16-14-57-291.png
          7 kB
          Bartosz Radaczyński
        3. Screen_Shot_2017-06-29_at_9_55_33_AM.png
          45 kB
          David Chan
        4. Screen Shot 2017-06-29 at 09.55.13.png
          64 kB
          David Chan

              aea6bfd9e5b3 Bartosz Radaczyński
              dchan David Chan
              Votes:
              14 Vote for this issue
              Watchers:
              23 Start watching this issue

                Created:
                Updated:
                Resolved: