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

PPTX File Conversion Service causes Sustained CPU Spike, OOME if the file contain charts

XMLWordPrintable

      Summary

      Uploading some PPTX files to Confluence can cause OutOfMemory error while generating preview.

      Steps to Reproduce

      1. Upload a Powerpoint file with 300 pages containing graphs/pictures to Confluence (attached, 9.87MB)
      2. Open file in preview window several times

      Expected Results

      Confluence should pre-calculate the resource commitment before previewing the document. Similar to CONFSERVER-45209

      Actual Results

      Confluence became unresponsive. The below exception is thrown in the catalina.out file:

      11-Jan-2018 14:19:12.170 SEVERE [http-nio-8090-ClientPoller-1] org.apache.tomcat.util.net.NioEndpoint$Poller.run
       java.lang.OutOfMemoryError: Java heap spaceException in thread "C3P0PooledConnectionPoolManager[identityToken->1bqxcmo9s1qzxzgfaa24s0|4be2e790]-HelperThread-#1" java.lang.OutOfMemoryError: Java heap space
      
      11-Jan-2018 14:20:25.883 SEVERE [http-nio-8090-ClientPoller-0] org.apache.tomcat.util.net.NioEndpoint$Poller.run
       java.lang.OutOfMemoryError: Java heap space
      

      Heap Dump Analysis

      Workaround

      Upgrade the Document Conversion add-on with the latest version, below

      • Download the right document-conversion-library-x.x.xx.jar
        Confluence version  Document Library  Version
        6.0 - 6.4 Document conversion 1.2.25 (mirror)

        after 6.4

        Document conversion 2.0.2.1 

       

      STEP TO REPLICATE

      1. Create a PPTX files and include multiple charts in the PPTX file.
      2. Attach the file in the Confluence page.
      3. Preview the file.

      EXPECTED BEHAVIOUR

      • The thumbnails for the PPTX file will load correctly.
      • The file will preview correctly in Confluence.

      ACTUAL BEHAVIOUR

      • Thumbnails for the file will not load.
      • The preview will take sometime depending on the number and complexity of the Charts inside the file.
      • Noticed a CPU SPIKE while previewing the file:
      • The following conversion thread found in the thread dump:
        "conversion-thread-0-internal" #192 daemon prio=5 tid=0x00007f06e81f0000 nid=0x39cb runnable [0x00007f066bbbd000]
           java.lang.Thread.State: RUNNABLE
        	at java.util.Vector.indexOf(Vector.java:382)
        	at java.text.AttributedString.addAttributeRunData(AttributedString.java:532)
        	at java.text.AttributedString.addAttributes(AttributedString.java:398)
        	at com.aspose.slides.ms.pbdb106a0.p6a2feef8.pa5e0ff62.r.do(Unknown Source)
        	at com.aspose.slides.ms.pbdb106a0.p6a2feef8.pa5e0ff62.r.break(Unknown Source)
        	at com.aspose.slides.ms.pbdb106a0.p6a2feef8.aw.do(Unknown Source)
        	at com.aspose.slides.ms.pbdb106a0.p6a2feef8.aw.do(Unknown Source)
        	at com.aspose.slides.ms.pbdb106a0.p6a2feef8.aw.do(Unknown Source)
        	at com.aspose.slides.p6a2feef8.af.do(Unknown Source)
        	- locked <0x00000007bac1a908> (a java.lang.Object)
        	at com.aspose.slides.hc.do(Unknown Source)
        	at com.aspose.slides.bvq.if(Unknown Source)
        	at com.aspose.slides.bvq.do(Unknown Source)
        	at com.aspose.slides.bvq.do(Unknown Source)
        	at com.aspose.slides.bvq.do(Unknown Source)
        	at com.aspose.slides.bvq.do(Unknown Source)
        	at com.aspose.slides.bvq.do(Unknown Source)
        	at com.aspose.slides.bvq.do(Unknown Source)
        	at com.aspose.slides.bvq.do(Unknown Source)
        	at com.aspose.slides.bvq.do(Unknown Source)
        	at com.aspose.slides.bvq. (Unknown Source)
        	at com.aspose.slides.TextFrame.do(Unknown Source)
        	at com.aspose.slides.TextFrame.do(Unknown Source)
        	at com.aspose.slides.TextFrame.else(Unknown Source)
        	at com.aspose.slides.buy.do(Unknown Source)
        	at com.aspose.slides.blj.int(Unknown Source)
        	at com.aspose.slides.rk.byte(Unknown Source)
        	at com.aspose.slides.aht.do(Unknown Source)
        	at com.aspose.slides.ta.int(Unknown Source)
        	at com.aspose.slides.ta.else(Unknown Source)
        	at com.aspose.slides.os.int(Unknown Source)
        	at com.aspose.slides.os.do(Unknown Source)
        	at com.aspose.slides.ta.int(Unknown Source)
        	at com.aspose.slides.ta.else(Unknown Source)
        	at com.aspose.slides.mu.do(Unknown Source)
        	at com.aspose.slides.ta.int(Unknown Source)
        	at com.aspose.slides.ta.else(Unknown Source)
        	at com.aspose.slides.it.int(Unknown Source)
        	at com.aspose.slides.Chart.do(Unknown Source)
        	at com.aspose.slides.GroupShape.do(Unknown Source)
        	at com.aspose.slides.Slide.for(Unknown Source)
        	at com.aspose.slides.Slide.do(Unknown Source)
        	at com.aspose.slides.Slide.do(Unknown Source)
        	at com.aspose.slides.bgv.do(Unknown Source)
        	at com.aspose.slides.bgv.if(Unknown Source)
        	at com.aspose.slides.Presentation.do(Unknown Source)
        	at com.aspose.slides.Presentation.if(Unknown Source)
        	at com.aspose.slides.Presentation.save(Unknown Source)
        	at com.atlassian.plugins.conversion.convert.image.SlidesConverter.convertDocDirect(SlidesConverter.java:83)
        	at com.atlassian.confluence.plugins.conversion.impl.runnable.JVMConversionRunnable.doWork(JVMConversionRunnable.java:83)
        	at com.atlassian.confluence.plugins.conversion.impl.runnable.ConversionRunnable.run(ConversionRunnable.java:36)
        	at com.atlassian.confluence.plugins.conversion.impl.runnable.JVMConversionRunnable.run(JVMConversionRunnable.java:22)
        	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        	at java.lang.Thread.run(Thread.java:745)
           Locked ownable synchronizers:
        	- 0x00000006e2064818> (a java.util.concurrent.ThreadPoolExecutor$Worker)
        

      UPD: investigation details here: https://bulldogwiki.internal.atlassian.com/wiki/display/CSE/Document+Conversion%3A+PSR-62

        1. cpuspike.png
          136 kB
          Dayana
        2. graphs_new.png
          574 kB
          Maksym Fedoryshyh
        3. graphs_old.png
          517 kB
          Maksym Fedoryshyh
        4. graphs_original.png
          1.82 MB
          Maksym Fedoryshyh
        5. new_conversion.png
          302 kB
          Maksym Fedoryshyh
        6. old_conversion.png
          381 kB
          Maksym Fedoryshyh
        7. testpptx.pptx
          140 kB
          Dayana
        8. uninstalled_fonts_new.png
          1.08 MB
          Maksym Fedoryshyh
        9. uninstalled_fonts_old.png
          1.17 MB
          Maksym Fedoryshyh
        10. uninstalled_fonts_original.png
          729 kB
          Maksym Fedoryshyh

              mfedoryshyn Maksym Fedoryshyh
              dazmi Dayana
              Votes:
              9 Vote for this issue
              Watchers:
              25 Start watching this issue

                Created:
                Updated:
                Resolved: