Office Excel thread may hangs if xls file contains formulas

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 7.18.3, 7.19.0, 7.19.8
    • Component/s: Macros - Other Macros
    • None
    • 4
    • Severity 2 - Major

      Problem

      Office Excel (view-xls) macro does not load and its corresponding thread gets stuck if the file contains formulas.

      • Server example:
        04-Oct-2022 13:16:48.839 WARNING [Catalina-utility-2] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-nio-8090-exec-9] (id=[299]) has been active
         for [60,575] milliseconds (since [10/4/22 1:15 PM]) to serve the same request for [base-confluence-url/rest/office/1.0/view?name=TestPage&type=xlsx&pageID=117410009&_=1664882142025] and may be stuck (configured threshold for this StuckThreadDetectionValve is [60] seconds). There is/are [1] thread(s) in total that are
         monitored by this Valve and may be stuck.
        
                java.lang.Throwable
                        at com.aspose.cells.zod.a(Unknown Source)
                        at com.aspose.cells.zbgy.h(Unknown Source)
                        at com.aspose.cells.zbis.a(Unknown Source)
                        at com.aspose.cells.zbis.a(Unknown Source)
                        at com.aspose.cells.zgr.a(Unknown Source)
                        at com.aspose.cells.zadq.k(Unknown Source)
                        at com.aspose.cells.zadq.d(Unknown Source)
                        at com.aspose.cells.zafo.a(Unknown Source)
                        at com.aspose.cells.zafo.F(Unknown Source)
                        at com.aspose.cells.zafv.a(Unknown Source)
                        at com.aspose.cells.zafo.aa(Unknown Source)
                        at com.aspose.cells.zafo.a(Unknown Source)
                        at com.aspose.cells.zcgo.a(Unknown Source)
                        at com.aspose.cells.zaee.a(Unknown Source)
                        at com.aspose.cells.zaee.a(Unknown Source)
                        at com.aspose.cells.zaef.a(Unknown Source)
                        at com.aspose.cells.zaef.b(Unknown Source)
                        at com.aspose.cells.zaea.a(Unknown Source)
                        at com.aspose.cells.zaea.e(Unknown Source)
                        at com.aspose.cells.zadw$zf.k(Unknown Source)
                        at com.aspose.cells.zadw.d(Unknown Source)
                        at com.aspose.cells.zafo.a(Unknown Source)
                        at com.aspose.cells.zafo.f(Unknown Source)
                        at com.aspose.cells.zafv.a(Unknown Source)
                        at com.aspose.cells.zafo.aa(Unknown Source)
                        at com.aspose.cells.zafo.a(Unknown Source)
                        at com.aspose.cells.zcgo.a(Unknown Source)
                        at com.aspose.cells.zaee.a(Unknown Source)
                        at com.aspose.cells.zaee.a(Unknown Source)
                        at com.aspose.cells.zaef.a(Unknown Source)
                        at com.aspose.cells.zaef.b(Unknown Source)
                        at com.aspose.cells.zaee.b(Unknown Source)
                        at com.aspose.cells.Workbook.calculateFormula(Unknown Source)
                        at com.aspose.cells.Workbook.calculateFormula(Unknown Source)
                        at com.atlassian.plugins.conversion.convert.html.spreadsheet.SpreadsheetConverter.convert(SpreadsheetConverter.java:103)
                        at com.atlassian.plugins.conversion.convert.html.spreadsheet.SpreadsheetConverter.convertToHtml(SpreadsheetConverter.java:65)
                        at com.benryan.conversion.XlsConverter.doConversion(XlsConverter.java:38)
                        at com.benryan.conversion.DocConverter.execute(DocConverter.java:82)
                        at com.benryan.rest.ConverterMacroResource.getContent(ConverterMacroResource.java:88)
        
      • Data Center example:
        20-Apr-2023 20:42:58.311 WARNING [Catalina-utility-4] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-nio-8090-exec-14 url: /rest/office/1.0/view; user: admin] (id=[356]) has been active for [61,745] milliseconds (since [4/20/23, 8:41 PM]) to serve the same request for [https://instenv-86426-2lpb.instenv.internal.atlassian.com/rest/office/1.0/view?name=Financial+Details+v1.3+(with+Issues).xlsx&type=xlsx&pageID=2949122&_=1682023316052] and may be stuck (configured threshold for this StuckThreadDetectionValve is [60] seconds). There is/are [10] thread(s) in total that are monitored by this Valve and may be stuck.
        	java.lang.Throwable
        		at com.atlassian.confluence.impl.util.sandbox.SandboxProcess.execute(SandboxProcess.java:113)
        		at com.atlassian.confluence.impl.util.sandbox.SandboxLocalProcessPool.execute(SandboxLocalProcessPool.java:107)
        		at com.atlassian.confluence.impl.util.sandbox.ConfluenceSandboxPoolFactory$LazySandbox.execute(ConfluenceSandboxPoolFactory.java:70)
        		at com.atlassian.confluence.impl.util.sandbox.DefaultSandbox.execute(DefaultSandbox.java:41)
        		at com.benryan.conversion.OfficeConnectorConversionSandbox.execute(OfficeConnectorConversionSandbox.java:47)
        		at com.benryan.conversion.DocConverter.performConversionInSandbox(DocConverter.java:144)
        		at com.benryan.conversion.XlsConverter.doConversion(XlsConverter.java:36)
        		at com.benryan.conversion.DocConverter.execute(DocConverter.java:82)
        		at com.benryan.rest.ConverterMacroResource.getContent(ConverterMacroResource.java:88)
        

      Environment

      Validated on Confluence versions 7.18.x and 7.19.x, both Server and DC editions.

      Steps to Reproduce

      1. Attach the file Test.xls to a page
      2. Add the Office Excel macro and select that file
      3. Save the page

      Expected Results

      The page and the macro render as expected.

      Actual Results

      The page does not load anymore and the thread gets stuck infinitely. Only restarting the application will clear up that thread.

      Workaround

      N/A

      Notes

      This problem seems to be generated by Excel document which contains SUMPRODUCT formula. It could only be recreated with the provided file

            Assignee:
            Unassigned
            Reporter:
            Marco Salvi (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: