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

Powerpoint PPTX file does not generate previews

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Low Low
    • None
    • 7.11.2, 7.11.3, 7.12.0, 7.12.2
    • None

      Issue Summary

      Attaching the following sample Powerpoint file samplepptx.pptx to a Confluence DC page. Confluence will be unable to generate a preview file.

      Steps to Reproduce

      1. Deploy Confluence DC with at least 2GB Max Heap Size
      2. Upload attached samplepptx.pptx
      3. Publish the page

      Expected Results

      1. Confluence kicks off the Sandbox process
      2. Moments later, the preview of the PPTX file should be generated

      The same attached PPTX file works seamlessly with the defaults of Confluence 7.9.3 DC

      Actual Results

      1. Confluence kicks off the Sandbox process
      2. Moments later, the back end atlassian-confluence.log will show the Sandbox crashing:
        2021-06-11 14:41:40,519 WARN [ForkJoinPool.commonPool-worker-11] [plugins.conversion.impl.FileSystemConversionState] markAsError Creating error file: /Users/myuser/shared-home/atlassian-confluence-7.11.2-dc/dcl-document/128/98/98378/98379_4.err
         -- url: /c7112/display/PD/test+page+7.11.2+PPTX+test | traceId: 18b2b85377047f3a | userName: admin | referer: http://localhost:27112/c7112/pages/resumedraft.action?draftId=98380&draftShareId=e2607d7a-c85e-4325-a30a-dc78ecceee0e&
        2021-06-11 14:41:43,542 WARN [sandbox-terminator] [impl.util.sandbox.DefaultSandboxPool] lambda$startTerminator$0 Request has taken 33142ms exceeds limit 30000ms terminating sandbox
         -- referer: http://localhost:27112/c7112/pages/resumedraft.action?draftId=98380&draftShareId=e2607d7a-c85e-4325-a30a-dc78ecceee0e& | url: /c7112/rest/tinymce/1/macro/placeholder | traceId: ab59ec8b71fb32fe | userName: admin
        2021-06-11 14:41:43,550 WARN [ForkJoinPool.commonPool-worker-11] [plugins.conversion.impl.LocalFileSystemConversionResultSupplier] lambda$performConversionInSandbox$2 Error when performing conversion com.atlassian.confluence.plugins.conversion.impl.LocalFileSystemConversionResultSupplier$3@4754d1b[attachment=/download/attachments/98378/samplepptx.pptx?version=4&modificationDate=1623385184310&api=v2,conversionType=DOCUMENT] in the sandbox
         -- url: /c7112/display/PD/test+page+7.11.2+PPTX+test | traceId: 18b2b85377047f3a | userName: admin | referer: http://localhost:27112/c7112/pages/resumedraft.action?draftId=98380&draftShareId=e2607d7a-c85e-4325-a30a-dc78ecceee0e&
        java.util.concurrent.CompletionException: com.atlassian.confluence.util.sandbox.SandboxTimeoutException: Sandbox request has been killed because it exceeded time limit of 30 seconds
        	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
        	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
        	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1592)
        	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        	at java.lang.Thread.run(Thread.java:748)
        Caused by: com.atlassian.confluence.util.sandbox.SandboxTimeoutException: Sandbox request has been killed because it exceeded time limit of 30 seconds
        	at com.atlassian.confluence.impl.util.sandbox.SandboxProcess.tryToThrowSpecificException(SandboxProcess.java:227)
        	at com.atlassian.confluence.impl.util.sandbox.SandboxProcess.execute(SandboxProcess.java:159)
        	at com.atlassian.confluence.impl.util.sandbox.DefaultSandboxPool.execute(DefaultSandboxPool.java:116)
        	at com.atlassian.confluence.impl.util.sandbox.ConfluenceSandboxPoolFactory$LazySandbox.execute(ConfluenceSandboxPoolFactory.java:72)
        	at com.atlassian.confluence.impl.util.sandbox.DefaultSandbox.execute(DefaultSandbox.java:41)
        	at com.atlassian.confluence.plugins.conversion.impl.sandbox.LocalDocumentConversionSandbox.execute(LocalDocumentConversionSandbox.java:66)
        	at com.atlassian.confluence.plugins.conversion.impl.sandbox.LocalDocumentConversionSandbox.execute(LocalDocumentConversionSandbox.java:59)
        	at com.atlassian.confluence.plugins.conversion.impl.sandbox.DelegatingDocumentConversionSandbox.execute(DelegatingDocumentConversionSandbox.java:47)
        	at com.atlassian.confluence.plugins.conversion.impl.LocalFileSystemConversionResultSupplier.lambda$performConversionInSandbox$1(LocalFileSystemConversionResultSupplier.java:279)
        	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
        	... 3 more
        Caused by: java.io.IOException: Stream closed
        	at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:170)
        	at java.io.BufferedInputStream.fill(BufferedInputStream.java:214)
        	at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
        	at java.io.DataInputStream.readInt(DataInputStream.java:388)
        	at com.atlassian.confluence.impl.util.sandbox.SandboxMessage.receiveMessage(SandboxMessage.java:42)
        	at com.atlassian.confluence.impl.util.sandbox.SandboxProcess.receiveMessage(SandboxProcess.java:283)
        	at com.atlassian.confluence.impl.util.sandbox.SandboxProcess.execute(SandboxProcess.java:156)
        	... 11 more
        
      3. Even after adding -Ddocument.conversion.sandbox.request.time.limit.secs=1800 as JVM flag, the sandbox still crashes with:
        2021-06-11 15:20:16,346 WARN [http-nio-27122-exec-2] [org.springframework.beans.GenericTypeAwarePropertyDescriptor] getWriteMethodForActualAccess Invalid JavaBean property 'contentPermissionManager' being accessed! Ambiguous write methods found next to actually used [public void com.adaptavist.confluence.naturalchildren.NaturalChildrenAction.setContentPermissionManager(com.atlassian.confluence.internal.ContentPermissionManagerInternal)]: [public void com.atlassian.confluence.pages.actions.AbstractPageAwareAction.setContentPermissionManager(com.atlassian.confluence.core.ContentPermissionManager)]
         -- referer: http://localhost:27122/c7122/display/PD/test+123 | url: /c7122/plugins/pagetree/naturalchildren.action | traceId: 9b50d45349f2ce0a | userName: admin
        2021-06-11 15:20:36,248 WARN [document-conversion-sandbox-launcher-4] [impl.util.sandbox.SandboxProcess] startIfDead Sandbox 1 has died
         -- referer: http://localhost:27122/c7122/display/PD/test+123?preview=/98371/98378/samplepptx.pptx | url: /c7122/rest/documentConversion/0.1/conversion/convert/98378/1 | traceId: 0604643fdfd99b15 | userName: admin
        2021-06-11 15:20:36,249 WARN [document-conversion-sandbox-launcher-4] [impl.util.sandbox.SandboxProcess] startIfDead Attempting to restart the sandbox 1
         -- referer: http://localhost:27122/c7122/display/PD/test+123?preview=/98371/98378/samplepptx.pptx | url: /c7122/rest/documentConversion/0.1/conversion/convert/98378/1 | traceId: 0604643fdfd99b15 | userName: admin
        2021-06-11 15:20:36,274 WARN [ForkJoinPool.commonPool-worker-9] [plugins.conversion.impl.LocalFileSystemConversionResultSupplier] lambda$performConversionInSandbox$2 Error when performing conversion com.atlassian.confluence.plugins.conversion.impl.LocalFileSystemConversionResultSupplier$3@2a994e19[attachment=/download/attachments/98371/samplepptx.pptx?version=1&modificationDate=1623388561452&api=v2,conversionType=THUMBNAIL] in the sandbox
         -- url: /c7122/ | traceId: ee5c9c4e7412ddd5 | userName: admin
        java.util.concurrent.CompletionException: com.atlassian.confluence.util.sandbox.SandboxCrashedException: Sandbox has crashed while serving the request
        	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
        	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
        	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1592)
        	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        	at java.lang.Thread.run(Thread.java:748)
        Caused by: com.atlassian.confluence.util.sandbox.SandboxCrashedException: Sandbox has crashed while serving the request
        	at com.atlassian.confluence.impl.util.sandbox.SandboxProcess.tryToThrowSpecificException(SandboxProcess.java:230)
        	at com.atlassian.confluence.impl.util.sandbox.SandboxProcess.execute(SandboxProcess.java:159)
        	at com.atlassian.confluence.impl.util.sandbox.DefaultSandboxPool.execute(DefaultSandboxPool.java:116)
        	at com.atlassian.confluence.impl.util.sandbox.ConfluenceSandboxPoolFactory$LazySandbox.execute(ConfluenceSandboxPoolFactory.java:72)
        	at com.atlassian.confluence.impl.util.sandbox.DefaultSandbox.execute(DefaultSandbox.java:41)
        	at com.atlassian.confluence.plugins.conversion.impl.sandbox.LocalDocumentConversionSandbox.execute(LocalDocumentConversionSandbox.java:66)
        	at com.atlassian.confluence.plugins.conversion.impl.sandbox.LocalDocumentConversionSandbox.execute(LocalDocumentConversionSandbox.java:59)
        	at com.atlassian.confluence.plugins.conversion.impl.sandbox.DelegatingDocumentConversionSandbox.execute(DelegatingDocumentConversionSandbox.java:47)
        	at com.atlassian.confluence.plugins.conversion.impl.LocalFileSystemConversionResultSupplier.lambda$performConversionInSandbox$1(LocalFileSystemConversionResultSupplier.java:227)
        	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
        	... 3 more
        Caused by: java.io.EOFException
        	at java.io.DataInputStream.readInt(DataInputStream.java:392)
        	at com.atlassian.confluence.impl.util.sandbox.SandboxMessage.receiveMessage(SandboxMessage.java:42)
        	at com.atlassian.confluence.impl.util.sandbox.SandboxProcess.receiveMessage(SandboxProcess.java:283)
        	at com.atlassian.confluence.impl.util.sandbox.SandboxProcess.execute(SandboxProcess.java:156)
        	... 11 more
        

      Diagnosis

      Enabling com.atlassian.confluence.impl.util DEBUG shows:

      2021-06-11 15:47:35,863 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$static$0 worker0: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
      2021-06-11 15:47:35,863 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$static$0 worker0: 	at com.aspose.slides.internal.e9.void.toArray(Unknown Source)
      2021-06-11 15:47:35,863 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$static$0 worker0: 	at com.aspose.slides.internal.mb.try.if(Unknown Source)
      2021-06-11 15:47:35,863 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$static$0 worker0: 	at com.aspose.slides.internal.e7.new.do(Unknown Source)
      2021-06-11 15:47:35,863 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$static$0 worker0: 	at com.aspose.slides.internal.n4.implements.do(Unknown Source)
      2021-06-11 15:47:35,863 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$static$0 worker0: 	at com.aspose.slides.internal.n7.final.do(Unknown Source)
      2021-06-11 15:47:35,863 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$static$0 worker0: 	at com.aspose.slides.internal.n7.final.do(Unknown Source)
      2021-06-11 15:47:35,863 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$static$0 worker0: 	at com.aspose.slides.internal.n7.final.do(Unknown Source)
      2021-06-11 15:47:35,863 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$static$0 worker0: 	at com.aspose.slides.FontsLoader.do(Unknown Source)
      2021-06-11 15:47:35,863 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$static$0 worker0: 	at com.aspose.slides.FontsLoader.loadExternalFonts(Unknown Source)
      2021-06-11 15:47:35,864 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$static$0 worker0: 	at com.atlassian.plugins.conversion.AsposeUtils.configureFonts(AsposeUtils.java:117)
      2021-06-11 15:47:35,864 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$static$0 worker0: 	at com.atlassian.plugins.conversion.AsposeAware.<clinit>(AsposeAware.java:6)
      2021-06-11 15:47:35,864 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$static$0 worker0: 	at com.atlassian.plugins.conversion.sandbox.SandboxConversionTask.<clinit>(SandboxConversionTask.java:33)
      2021-06-11 15:47:35,864 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$static$0 worker0: 	at java.lang.Class.forName0(Native Method)
      2021-06-11 15:47:35,864 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$static$0 worker0: 	at java.lang.Class.forName(Class.java:348)
      2021-06-11 15:47:35,864 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$static$0 worker0: 	at com.atlassian.confluence.impl.util.sandbox.SandboxServer.createTask(SandboxServer.java:81)
      2021-06-11 15:47:35,864 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$static$0 worker0: 	at com.atlassian.confluence.impl.util.sandbox.SandboxServer.run(SandboxServer.java:60)
      2021-06-11 15:47:35,864 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$static$0 worker0: 	at com.atlassian.confluence.impl.util.sandbox.SandboxServer.main(SandboxServer.java:121)
      2021-06-11 15:47:36,262 WARN [document-conversion-sandbox-launcher-1] [impl.util.sandbox.SandboxProcess] startIfDead Sandbox 0 has died
      
      • Increasing the Sandbox memory to 4GB didn't help - still crashes with out of memory
        -Dconversion.sandbox.memory.limit.megabytes=4096
        
      • Increasing the Sandbox memory to 8GB seemed to do the trick!
        -Dconversion.sandbox.memory.limit.megabytes=8192
        

      Workaround

      Try adding these JVM flags and restart Confluence:

      -Ddocument.conversion.sandbox.request.time.limit.secs=300
      -Dconversion.sandbox.memory.limit.megabytes=8192
      -Dconversion.sandbox.java.options="-Dconfluence.document.conversion.slides.convert.timeout=300"
      

      See Configuring System Properties for more details

        1. samplepptx.pptx
          404 kB
          Eric Lam

              Unassigned Unassigned
              hlam@atlassian.com Eric Lam
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: