High CPU threads (100% spikes) not released when importing or attaching a Word file with charts

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 6.15.4, 6.15.7, 7.4.0, 7.4.1
    • Component/s: Editor - Attachment
    • 16
    • Severity 3 - Minor
    • 3

      Problem

      When importing a docx file with charts attached to a Confluence server, it will cause the CPU usage to spike to 100%. In order to get the threads released, we need to shutdown/kill the Confluence Java process.

      This is noticed while adding the Word file as attachment as well.

      Environment

      Reproducible in both 7.4.0 and 6.15.7.

      Steps to Reproduce

      • Insert the docx file attached to a Confluence page in a local v7.4.0 instance and using the insert menu (please have a look at the video mp4 attached).

      Expected Results

      The CPU usage should go down once the insert is completed.

      Actual Results

      The CPU usage is not released and Confluence needs to be restarted.

      Sample Stack Trace from a runaway RUNNABLE thread that has hit this condition:

      "https-jsse-nio2-8443-exec-76" #80661 daemon prio=5 os_prio=0 tid=0x00007fc09b228000 nid=0x3449 runnable [0x00007fc12dab9000]
         java.lang.Thread.State: RUNNABLE
      	at java.awt.geom.Path2D$Float.pointCrossings(Path2D.java:552)
      	at java.awt.geom.Path2D.contains(Path2D.java:2126)
      	at asposewobfuscated.zzLL.<init>(Unknown Source)
      	at asposewobfuscated.zzLL.<init>(Unknown Source)
      	at asposewobfuscated.zzZ.zzZ(Unknown Source)
      	at asposewobfuscated.zzZ.zzZ(Unknown Source)
      	at asposewobfuscated.zzSX.visitPathEnd(Unknown Source)
      	at asposewobfuscated.zzZT.zzZ(Unknown Source)
      	at asposewobfuscated.zzB.zzZ(Unknown Source)
      	at asposewobfuscated.zzF.zzZ(Unknown Source)
      	at asposewobfuscated.zzB.zzZ(Unknown Source)
      	at asposewobfuscated.zzF.zzZ(Unknown Source)
      	at asposewobfuscated.zzB.zzZ(Unknown Source)
      	at asposewobfuscated.zzF.zzZ(Unknown Source)
      	at asposewobfuscated.zzB.zzZ(Unknown Source)
      	at asposewobfuscated.zzF.zzZ(Unknown Source)
      	at asposewobfuscated.zzB.zzZ(Unknown Source)
      	at asposewobfuscated.zzF.zzZ(Unknown Source)
      	at asposewobfuscated.zzSX.zzZ(Unknown Source)
      	at asposewobfuscated.zzSX.zzZ(Unknown Source)
      	at asposewobfuscated.zzM9.zzZ(Unknown Source)
      	at asposewobfuscated.zzM9.zzS(Unknown Source)
      	at asposewobfuscated.zzM9.<init>(Unknown Source)
      	at com.aspose.words.zzFD.zzfh(Unknown Source)
      	at com.aspose.words.zzFD.zzjy(Unknown Source)
      	at com.aspose.words.zzFB.zzZ(Unknown Source)
      	at com.aspose.words.zzCA.zzJ(Unknown Source)
      	at com.aspose.words.zzCA.zzZ(Unknown Source)
      	at com.aspose.words.zzE8.zzZ(Unknown Source)
      	at com.aspose.words.zzE8.zzZ(Unknown Source)
      	at com.aspose.words.zzE8.zzY(Unknown Source)
      	at com.aspose.words.ShapeRenderer.<init>(Unknown Source)
      	at com.aspose.words.ShapeBase.getShapeRenderer(Unknown Source)
      	at com.atlassian.plugins.conversion.confluence.dom.doc2wiki.Doc2Wiki.visitShapeStart(Doc2Wiki.java:428)
      	at com.aspose.words.Shape.zzZ(Unknown Source)
      	at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
      	at com.aspose.words.Shape.accept(Unknown Source)
      	at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
      	at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
      	at com.aspose.words.Paragraph.accept(Unknown Source)
      	at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
      	at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
      	at com.aspose.words.Body.accept(Unknown Source)
      	at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
      	at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
      	at com.aspose.words.Section.accept(Unknown Source)
      	at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
      	at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
      	at com.aspose.words.Document.accept(Unknown Source)
      	at com.atlassian.plugins.conversion.confluence.importing.WordImport.doImport(WordImport.java:54)
      

      When attachment is being previewed a similar stack trace is seen.

      "conversion-thread-0-internal" #237 daemon prio=1 os_prio=31 cpu=1203733.85ms elapsed=1214.38s tid=0x00007f989fbd2000 nid=0x2c703 runnable  [0x0000700019cc1000]
         java.lang.Thread.State: RUNNABLE
      	at com.aspose.words.zzKL.zzZ(Unknown Source)
      	at com.aspose.words.zzKL.zzZ(Unknown Source)
      	at com.aspose.words.zzKL.prepare(Unknown Source)
      	at com.aspose.words.zzKL.zzxb(Unknown Source)
      	at com.aspose.words.zzL7.zzZ(Unknown Source)
      	at com.aspose.words.zzL3.zzoL(Unknown Source)
      	at com.aspose.words.zzKQ.zzZ(Unknown Source)
      	at com.aspose.words.zzKY.zzZ(Unknown Source)
      	at com.aspose.words.zzCA.zzJ(Unknown Source)
      	at com.aspose.words.zzCA.zzZ(Unknown Source)
      	at com.aspose.words.zzE8.zzZ(Unknown Source)
      	at com.aspose.words.zzE8.zzZ(Unknown Source)
      	at com.aspose.words.zzZQP.zzX(Unknown Source)
      	at com.aspose.words.zzZQP.zzY(Unknown Source)
      	at com.aspose.words.zzZ3T.getSize(Unknown Source)
      	at com.aspose.words.zzZ3T.zzZri(Unknown Source)
      	at com.aspose.words.zzZ3S.getWidth(Unknown Source)
      	at com.aspose.words.zzZ3U.zzv1(Unknown Source)
      	at com.aspose.words.zzZ4P.getWidth(Unknown Source)
      	at com.aspose.words.zzZQ1.zzZQz(Unknown Source)
      	at com.aspose.words.zzZQ1.zzW(Unknown Source)
      	at com.aspose.words.zzZQ7.zzV(Unknown Source)
      	at com.aspose.words.zzZQ6.zzZ(Unknown Source)
      	at com.aspose.words.zzW8.zzZ(Unknown Source)
      	at com.aspose.words.zzZ52.zzZ(Unknown Source)
      	at com.aspose.words.zzXJ.zzwh(Unknown Source)
      	at com.aspose.words.zzXJ.zzY(Unknown Source)
      	at com.aspose.words.zzZDK.zzZDD(Unknown Source)
      	at com.aspose.words.zzZDK.zzU(Unknown Source)
      	at com.aspose.words.zzZD1.zzx(Unknown Source)
      	at com.aspose.words.zzZ36.zzS9(Unknown Source)
      	at com.aspose.words.zzBI.zzXH(Unknown Source)
      	at com.aspose.words.zzBJ.zzax(Unknown Source)
      	at com.aspose.words.zzZR8.zzZ(Unknown Source)
      	at com.aspose.words.Document.updatePageLayout(Unknown Source)
      	at com.aspose.words.zz71.perform(Unknown Source)
      	at com.aspose.words.zz72.zzNv(Unknown Source)
      	at com.aspose.words.zz4B.zzZh(Unknown Source)
      	at com.aspose.words.zz4B.zzZ(Unknown Source)
      	at com.aspose.words.zz4B.zzZQ(Unknown Source)
      	at com.aspose.words.Document.zzZ(Unknown Source)
      	at com.aspose.words.Document.zzZ(Unknown Source)
      	at com.aspose.words.Document.zzZ(Unknown Source)
      	at com.aspose.words.Document.save(Unknown Source)
      	at com.atlassian.plugins.conversion.convert.image.WordsConverter.convertDocDirect(WordsConverter.java:131)
      	at com.atlassian.confluence.plugins.conversion.impl.runnable.JVMConversionRunnable.doWork(JVMConversionRunnable.java:84)
      	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(java.base@11.0.11/Executors.java:515)
      	at java.util.concurrent.FutureTask.run(java.base@11.0.11/FutureTask.java:264)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.11/ThreadPoolExecutor.java:1128)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.11/ThreadPoolExecutor.java:628)
      	at java.lang.Thread.run(java.base@11.0.11/Thread.java:829)
      

      Workaround

      • Few workarounds are working in 7.4.0 such as saving the file as either a DOC or as a PDF file instead of DOCX. Then the import will not cause CPU spikes.
        Instead of importing the document from the insert menu. You can use the "..." menu from the page to attach the .docx file there and it will not cause CPU spikes.
      • Remove the charts from the file prior to upload.
      • Issue with uploading file as attachment doesn't happen in recent versions Confluence like v7.11 and above.

      Notes

      I have attached the recording where I show the workarounds

      • import the DOCX document from the "..." menu on the page, browsing the Attachments and attaching the document there (not inserting it inside the page)
      • how the PDF and DOC version insertion is working fine whereas it is causing high CPU usages for the DOCX file.

              Assignee:
              Unassigned
              Reporter:
              Pascal Oberle
              Votes:
              6 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: