-
Bug
-
Resolution: Fixed
-
Low
-
7.4.8, 7.9.3
-
None
-
2
-
Severity 1 - Critical
-
15
-
Problem
XLSX files can cause OutOfMemoryError on Confluence server during the file conversion.
Environment
- Confluence server
Steps to Reproduce
- Attach an XLSX file to a page
- The file used to replicate the problem had around 3.8k rows of floating-point numbers and around 80 graphs
- Save the page
- Try to preview the file by opening it
Expected Results
The file is converted and the preview loads without errors or memory pressure.
Actual Results
Heap usage spikes instantly and this is observed in the application logs:
2021-04-15 10:38:15,534 ERROR [conversion-thread-0] [plugins.conversion.impl.TimeoutConversionRunnable] run Cannot convert. Execution error:
-- referer: http://localhost:8090/pages/resumedraft.action?draftId=1111111&draftShareId=623dbdcd-53c4-49c9-9a2e-111111111& | url: /rest/tinymce/1/macro/placeholder | traceId: 6b0fe3c05047bce4 | userName: admin
java.lang.OutOfMemoryError: Java heap space
at java.base/java.util.Arrays.copyOf(Arrays.java:3689)
at java.base/java.util.ArrayList.grow(ArrayList.java:238)
at java.base/java.util.ArrayList.grow(ArrayList.java:243)
at java.base/java.util.ArrayList.add(ArrayList.java:486)
at java.base/java.util.ArrayList.add(ArrayList.java:499)
at com.aspose.cells.b.a.a.zf.a(Unknown Source)
at com.aspose.cells.ziz.c(Unknown Source)
at com.aspose.cells.ziz.a(Unknown Source)
at com.aspose.cells.ziz.a(Unknown Source)
at com.aspose.cells.ziz.a(Unknown Source)
at com.aspose.cells.ziz.b(Unknown Source)
at com.aspose.cells.zjf.aq(Unknown Source)
at com.aspose.cells.zav.n(Unknown Source)
at com.aspose.cells.zkq.b(Unknown Source)
at com.aspose.cells.Chart.F(Unknown Source)
at com.aspose.cells.zat.c(Unknown Source)
at com.aspose.cells.zat.a(Unknown Source)
at com.aspose.cells.zat.a(Unknown Source)
at com.aspose.cells.zat.a(Unknown Source)
at com.aspose.cells.zat.a(Unknown Source)
at com.aspose.cells.zat.b(Unknown Source)
at com.aspose.cells.zat.c(Unknown Source)
at com.aspose.cells.zat.a(Unknown Source)
at com.aspose.cells.a.d.zfo.a(Unknown Source)
at com.aspose.cells.zbzn.a(Unknown Source)
at com.aspose.cells.zbzn.a(Unknown Source)
at com.aspose.cells.zbzn.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)
at com.atlassian.plugins.conversion.convert.image.CellsConverter.convertToPDF(CellsConverter.java:139)
at com.atlassian.plugins.conversion.convert.image.CellsConverter.convertDocDirect(CellsConverter.java:113)
Inspecting the heap dump, we can see a huge array with 354 million elements using most of the memory:
Workaround
If you can't migrate to DC or if the migration will take a while to happen, one possibility to avoid this issue is to disable the conversion service. This can be achieved as follows:
- Go to Cog Icon > Add-ons
- Locate the Confluence Document Conversion Library system add-on
- Disable the File Conversions (file-conversions) module
That will disable the file preview macro. It is also important to disable the Office Excel macro as follows:
- Go to Cog Icon > Add-ons
- Locate the Office Connector plugin system add-on
- Disable the viewxls (viewxls-legacy) and viewxls (viewxls) modules
In that scenario, we have the conversion service disabled for all file types, so the Preview (view-file) macro will no longer work. Also, the Office Excel macro will be disabled, but other file types can still be previewed with their respective macros (Office Word, Office PowerPoint, and PDF).
Notes
This issue does not affect Confluence Data Center as the file conversion is handled on the external process pool:
Also, this bug does not affect versions 7.10 and newer of Confluence server. This is due to an upgrade in the Aspose library which mitigates the memory pressure observed in older versions.
- is related to
-
CONFSERVER-61143 Simple PPTX file can cause OOME when using view powerpoint macro or from preview generation
- Closed
- is resolved by
-
CONFSERVER-39441 File Preview Macro Showing Garbled Characters for Office Documents Containing Certain Special Characters
- Closed
- relates to
-
CONFSERVER-46542 XLSX File Conversion Service causes OutOfMemory
- Closed
-
PSR-624 Loading...