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

Confluence crashes visualizing a PDF with diagrams which have cubic c curve

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 5.3.1, 5.5
    • 4.1.10, 4.3.7, 5.2.3, 5.4.3, 5.4.4
    • None
    • Reproducible in:

      • Confluence 4.1.10 with Office Connector 2.1.10
      • Confluence 4.3.2 with Office Connector 2.1.12
      • Confluence 5.2.3 with Office Connector 3.1.1

      Steps to reproduce:
      1. Upload this PDF file to Confluence page: Panasonic_NiMH_HHR70AAAJ.pdf
      2. Go to Insert > Other Macros > PDF
      3. Try to preview this PDF.
      4. Confluence will crash.

      Error in atlassian-confluence.log:

      2013-09-10 16:33:01,427 WARN [http-8523-3] [com.benryan.conversion.PPTSlideServlet] doGet Conversion task timed out for attachment : Panasonic_NiMH_HHR70AAAJ.pdf with page number 0, waited : 300, now executing in background.
       -- url: /confluence/plugins/servlet/pptslide | userName: admin
      2013-09-10 16:33:01,750 WARN [http-8523-3] [com.benryan.conversion.PPTSlideServlet] doGet Conversion task timed out for attachment : Panasonic_NiMH_HHR70AAAJ.pdf with page number 0, waited : 300, now executing in background.
       -- url: /confluence/plugins/servlet/pptslide | userName: admin
      2013-09-10 16:33:02,069 WARN [http-8523-3] [com.benryan.conversion.PPTSlideServlet] doGet Conversion task timed out for attachment : Panasonic_NiMH_HHR70AAAJ.pdf with page number 0, waited : 300, now executing in background.
       -- url: /confluence/plugins/servlet/pptslide | userName: admin
      2013-09-10 16:33:02,384 WARN [http-8523-3] [com.benryan.conversion.PPTSlideServlet] doGet Conversion task timed out for attachment : Panasonic_NiMH_HHR70AAAJ.pdf with page number 0, waited : 300, now executing in background.
       -- url: /confluence/plugins/servlet/pptslide | userName: admin
      2013-09-10 16:33:37,774 WARN [http-8523-3] [com.benryan.conversion.PPTSlideServlet] doGet Conversion task timed out for attachment : Panasonic_NiMH_HHR70AAAJ.pdf with page number 0, waited : 300, now executing in background.
       -- url: /confluence/plugins/servlet/pptslide | userName: admin.
      

      Tomcat window freezed:

      Java process hanged:

      Workaround:

      Insert the PDF file into Confluence page using HTML macro in combination with iframe:

      1. Enable HTML macro module ((html-xhtml) from Manage Add-Ons > System Plugins > Confluence HTML Macros
      2. Go to a Confluence page > Insert > Other Macros > HTML
      3. Inside the HTML tag include the following iframe:
        <iframe src="http://confluence.atlassian.com/confluence/download/attachments/1114129/Panasonic_NiMH_HHR70AAAJ.pdf?api=v2" width="100%" style="height:50em" />
        
      4. Save page
      5. Result: The PDF is rendered fine in the page and Confluence is not crashing

      Note: You may replace the attachment link accordingly

      In 5.2.3, you'll need to check/tick the 'Insecure: Display all attachments inline' setting in Confluence Admin > Security Configurations > Attachment Download Security Policy so that Confluence will not try to download the PDF file into your local machine and just render it in the page.

      While this may be a legit workaround it has two major problems:

      1. PDF only gets rendered if you have an Adobe Reader Plugin or you use Firefox which uses pdf.js
      2. Confluence can crash any time since a user can upload a PDF and try to render it using viewxls.

      Possible Workaround one of customers reported that upgrading java to version 7u55 stabilised the instance from the occurrence of crashes.

        1. CCTV IBC 1.pdf
          175 kB
        2. java.jpg
          java.jpg
          30 kB
        3. Panasonic_NiMH_HHR70AAAJ.pdf
          19 kB
        4. SCRUM basics (1).pptx
          366 kB
        5. stack.txt
          258 kB
        6. tomcat.jpg
          tomcat.jpg
          87 kB

            [CONFSERVER-30711] Confluence crashes visualizing a PDF with diagrams which have cubic c curve

            That's great news. Until then... what workaround is recommended to show my PDFs? While nothing freezes or crashes, some PDFs just aren't rendered.
            Will setting the "Insecure: Display all attachments inline" option still come with the possibility of crashing our Confluence instance?

            Benjamin Horst added a comment - That's great news. Until then... what workaround is recommended to show my PDFs? While nothing freezes or crashes, some PDFs just aren't rendered. Will setting the "Insecure: Display all attachments inline" option still come with the possibility of crashing our Confluence instance?

            ingomar https://jira.atlassian.com/browse/CONF-26417 was resolved as 'Won't Fix' two years ago. A lot changed since that time - pdf.js matured and server side rendering is not that much efficient anymore.

            One of teams is currently working on client side renderring of pdf/word/excel and other document types. pdf.js is one of technologies used. There is no ETA on release date though.

            Petro Semeniuk (Inactive) added a comment - ingomar https://jira.atlassian.com/browse/CONF-26417 was resolved as 'Won't Fix' two years ago. A lot changed since that time - pdf.js matured and server side rendering is not that much efficient anymore. One of teams is currently working on client side renderring of pdf/word/excel and other document types. pdf.js is one of technologies used. There is no ETA on release date though.

            kgbvax added a comment -

            Since this is a never ending story and it's so dead-simply to apply, maybe you guys should reconsider https://jira.atlassian.com/browse/CONF-26417 (rendering in browser using pdf.js?) it's wicked library.

            kgbvax added a comment - Since this is a never ending story and it's so dead-simply to apply, maybe you guys should reconsider https://jira.atlassian.com/browse/CONF-26417 (rendering in browser using pdf.js?) it's wicked library.

            Hi All

            There still seems to be rather a lot of discussion around this issue and I wanted to provide an update. I've update the fix version of this issue as there were further changes made after the release of 5.3.1. We believe that we have now fixed the specific issue relating to Confluence crashing when visualising a PDF with Diagrams that have cubic bezier curves and as such this issue will remain resolved.

            We are aware that there are still issues in the rendering of PDF documents. A number of you have commented that you're are seeing a lot of noise in your log files. We are currently tracking these issues: https://jira.atlassian.com/browse/CONF-32266 (ArrayIndexOutOfBoundsException), https://jira.atlassian.com/browse/CONF-33107 (NullPointerException).

            For those of you with issues relating to the instability caused by the office connector there is a separate issue for this: https://jira.atlassian.com/browse/CONF-25421.

            I hope that this helps clear some of the noise around this issue. We are working hard on improving the stability of this feature. Please keep watching the other tickets listed here for further updates.

            Regards
            Steve Haffenden
            Confluence Bugmaster
            Atlassian

            Steve Haffenden (Inactive) added a comment - Hi All There still seems to be rather a lot of discussion around this issue and I wanted to provide an update. I've update the fix version of this issue as there were further changes made after the release of 5.3.1. We believe that we have now fixed the specific issue relating to Confluence crashing when visualising a PDF with Diagrams that have cubic bezier curves and as such this issue will remain resolved. We are aware that there are still issues in the rendering of PDF documents. A number of you have commented that you're are seeing a lot of noise in your log files. We are currently tracking these issues: https://jira.atlassian.com/browse/CONF-32266 (ArrayIndexOutOfBoundsException), https://jira.atlassian.com/browse/CONF-33107 (NullPointerException). For those of you with issues relating to the instability caused by the office connector there is a separate issue for this: https://jira.atlassian.com/browse/CONF-25421 . I hope that this helps clear some of the noise around this issue. We are working hard on improving the stability of this feature. Please keep watching the other tickets listed here for further updates. Regards Steve Haffenden Confluence Bugmaster Atlassian

            What is the solution for this bug? The ticket status says Resolved, but besides the workaround (which, I prefer not to comment on that...) I couldn't find the instructions to resolve the issue. Please, can anybody point me out to the instructions to solve this issue?

            Deleted Account (Inactive) added a comment - What is the solution for this bug? The ticket status says Resolved, but besides the workaround (which, I prefer not to comment on that...) I couldn't find the instructions to resolve the issue. Please, can anybody point me out to the instructions to solve this issue?

            I'm also seeing errors on Confluence 5.5 and Office Connector 3.3.3

            Confluence is not crashing, but it fails to preview certain PDFs and logs the following error:

            [com.benryan.conversion.PPTSlideServlet] doGet Conversion task timed out for attachment : Bonusbond_Retailer_Checksheet.pdf with page number 0, waited : 300, now executing in background.

            Andrew Frayling added a comment - I'm also seeing errors on Confluence 5.5 and Office Connector 3.3.3 Confluence is not crashing, but it fails to preview certain PDFs and logs the following error: [com.benryan.conversion.PPTSlideServlet] doGet Conversion task timed out for attachment : Bonusbond_Retailer_Checksheet.pdf with page number 0, waited : 300, now executing in background.

            We've had 650 instances of this since my server restart this morning. We're running Confluence 5.5 with Office Connector 3.3.3.

            Chris Collins added a comment - We've had 650 instances of this since my server restart this morning. We're running Confluence 5.5 with Office Connector 3.3.3.

            Stephen Gramm added a comment - - edited

            Using Confluence 5.2.5

            We have upgraded the Office Connector Plugin to version 3.14.1 and disabled the viewfile and viewppt macros. This solution appears to have stopped the problem that caused the application to fail when viewing the PDF files, but it is less than 'acceptable'.

            If these macros are enabled the application still hangs up when viewing some pptx files especially if the Powerpoint presentations have bullet points. PPT files do not seem to have this problem, but some PPTX files appear to have an adverse impact.

            It is just not acceptable to have a plugin macro enabled if the result causes application instability. We also found that if these macros are enabled and the content wont render then a bunch of threads get created. These threads just keep running until a restart without returning to the thread pool.

            Please let me known when an if this plugin works correctly in Confluence.

            Stephen Gramm added a comment - - edited Using Confluence 5.2.5 We have upgraded the Office Connector Plugin to version 3.14.1 and disabled the viewfile and viewppt macros. This solution appears to have stopped the problem that caused the application to fail when viewing the PDF files, but it is less than 'acceptable'. If these macros are enabled the application still hangs up when viewing some pptx files especially if the Powerpoint presentations have bullet points. PPT files do not seem to have this problem, but some PPTX files appear to have an adverse impact. It is just not acceptable to have a plugin macro enabled if the result causes application instability. We also found that if these macros are enabled and the content wont render then a bunch of threads get created. These threads just keep running until a restart without returning to the thread pool. Please let me known when an if this plugin works correctly in Confluence.

            HERCULES pointed me to this ticket on the mentioned error message in the log file,
            though the file mentioned is a pptx, not a pdf !
            (though it is PPTSlideServlet as in this ticket)

            2014-06-04 13:38:35,181 WARN [http-8180-80] [com.benryan.conversion.PPTSlideServlet] doGet Conversion task timed out for attachment : testfile.pptx with page number 0, waited : 300, now executing in background.
            

            Our Confluence version is 5.4.4, so according to this ticket, the issue should have been resolved already.

            What does this error mean? Is it critical, as this ticket indicates?
            Is it the same issue or a different one?
            Is it a Hercules mistake pointing to this ticket?

            Hans-Peter Geier added a comment - HERCULES pointed me to this ticket on the mentioned error message in the log file, though the file mentioned is a pptx, not a pdf ! (though it is PPTSlideServlet as in this ticket) 2014-06-04 13:38:35,181 WARN [http-8180-80] [com.benryan.conversion.PPTSlideServlet] doGet Conversion task timed out for attachment : testfile.pptx with page number 0, waited : 300, now executing in background. Our Confluence version is 5.4.4, so according to this ticket, the issue should have been resolved already. What does this error mean? Is it critical, as this ticket indicates? Is it the same issue or a different one? Is it a Hercules mistake pointing to this ticket?

            I have the same Issue, We run CF 5.2.5 and Office Connector 3.1.1
            We need a fix, urgency

            Thomas Strempel added a comment - I have the same Issue, We run CF 5.2.5 and Office Connector 3.1.1 We need a fix, urgency

              psemeniuk Petro Semeniuk (Inactive)
              hsuhailah Hanis Suhailah (Inactive)
              Affected customers:
              2 This affects my team
              Watchers:
              39 Start watching this issue

                Created:
                Updated:
                Resolved: