Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-59425

XLSX files are not converted in the sandbox, and can get stuck and run CPU to 100%

    XMLWordPrintable

Details

    Description

      Issue Summary

      In Confluence Data Center 6.10 and above, the document conversion process should be handled by a "sandbox" - an external process pool that can crash or be timed out without impacting Confluence.  However, it appears that some spreadsheets that contain graphs can still be converted the old way, and can become stuck, eventually running cpu up to 100%.

      Steps to Reproduce

      1. Install Confluence Data Center 6.10 or above
      2. Attach an XLS or XLSX that contains a graph to a page.

      Expected Results

      When viewing the file in preview mode, Confluence should render the preview using the sandbox.

      Actual Results

      Confluence will skip the sandbox, and attempt to generate the thumbnail using an HTTP thread, which may become permanently stuck, requiring a re-start. The thread should report as stuck the Tomcat logs:

      catalina.out
      23-Jan-2020 08:16:24.416 WARNING [Catalina-utility-2] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-nio-0.0.0.0-8090-exec-62] (id=[1760]) has been active for [69,192] milliseconds (since [1/23/20 8:15 AM]) to serve the same request for [https://confluence.example.com/display/ABC123/Test+Page?src=contextnavpagetreemode] and may be stuck (configured threshold for this StuckThreadDetectionValve is [60] seconds). There is/are [2] thread(s) in total that are monitored by this Valve and may be stuck.
      	java.lang.Throwable
      		at sun.java2d.pisces.Renderer.curveBreakIntoLinesAndAdd(Renderer.java:259)
      		at sun.java2d.pisces.Renderer.curveTo(Renderer.java:395)
      		at sun.java2d.pisces.Stroker.emitCurveTo(Stroker.java:487)
      		at sun.java2d.pisces.Stroker.drawRoundCap(Stroker.java:277)
      		at sun.java2d.pisces.Stroker.finish(Stroker.java:441)
      		at sun.java2d.pisces.Stroker.moveTo(Stroker.java:348)
      		at sun.java2d.pisces.Dasher.goTo(Dasher.java:155)
      		at sun.java2d.pisces.Dasher.lineTo(Dasher.java:210)
      		at sun.java2d.pipe.RenderingEngine.feedConsumer(RenderingEngine.java:366)
      		at sun.java2d.pisces.PiscesRenderingEngine.pathTo(PiscesRenderingEngine.java:484)
      		at sun.java2d.pisces.PiscesRenderingEngine.strokeTo(PiscesRenderingEngine.java:363)
      		at sun.java2d.pisces.PiscesRenderingEngine.strokeTo(PiscesRenderingEngine.java:163)
      		at sun.java2d.pisces.PiscesRenderingEngine.getAATileGenerator(PiscesRenderingEngine.java:562)
      ...
      

      The above thread will never report as completed, even after hours. Thread dumps will show the exact same stack trace as the above, indicating that Confluence is getting stuck during the conversion process.

      Workaround

      If you already have stuck threads such as the above, the only resolution is to re-start Confluence to release those threads.

      To prevent this from happening again, we recommend removing graphs from any XLS documents contained on pages. If you need to review pages to see which have graphs on them, it would be safest to Disable the XLS view file module to prevent any further performance issues while accessing these pages:

      1. -> General configuration -> Manage Apps
      2. Select System from the drop down menu and search for Office Connector
      3. Select the Office Connector Plugin and expand. Click the + sign to reveal the underlying modules
      4. Find the viewxls and viewxls-legacy modules and click Disable

      At that point, visit the page noted in the stuck thread error log, and check for any XLSX or XLS files that may contain graphs. Remove the graph, delete the attachment from Confluence, and re-upload the version without graphs.

      Attachments

        Issue Links

          Activity

            People

              ttranminh Tam Tran
              jbentrup Jason B
              Votes:
              4 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: