-
Type:
Bug
-
Resolution: Fixed
-
Priority:
High
-
Affects Version/s: 5.6.0
-
Component/s: Assets - Core experiences
-
None
-
1
-
Severity 2 - Major
Issue Summary
Exporting Object Schema via Assets >> Configure >> Import/Export may fail with OutOfMemoryError if the total attachments in the Object Schema when zipped goes >2GB.
Please be aware that this OutOfMemoryError will not create a heapdump since it's a programmatic OOM and not a real JVM OOME.
This is reproducible on Data Center: yes
Steps to Reproduce
- Setting Xmx to greater than 2GB e.g. -Xmx8g
- Creating enough attachments that the total size of attachments for a schema is >2GB
Expected Results
Schema is exported correctly
Actual Results
- In the insight_objectschema_export.log it records this programmatic OutOfMemoryError:
2023-07-18 18:15:40,693 [Thread-37019] | Error when exporting attachments for object schema id: 8 java.lang.OutOfMemoryError: null at java.io.ByteArrayOutputStream.hugeCapacity(ByteArrayOutputStream.java:125) ~[?:?] at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:119) ~[?:?] at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:95) ~[?:?] at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:156) ~[?:?] at net.lingala.zip4j.io.CipherOutputStream.encryptAndWrite(CipherOutputStream.java:262) ~[insight-8.11.1.jar:?] at net.lingala.zip4j.io.CipherOutputStream.write(CipherOutputStream.java:251) ~[insight-8.11.1.jar:?] at net.lingala.zip4j.io.DeflaterOutputStream.deflate(DeflaterOutputStream.java:77) ~[insight-8.11.1.jar:?] at net.lingala.zip4j.io.DeflaterOutputStream.closeEntry(DeflaterOutputStream.java:104) ~[insight-8.11.1.jar:?] at com.riadalabs.jira.plugins.insight.util.Zip4jFileUtil.addFileToZip(Zip4jFileUtil.java:57) ~[insight-8.11.1.jar:?] at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaExportManager.exportAttachmentsToZip(ObjectSchemaExportManager.java:473) ~[insight-8.11.1.jar:?] at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaExportManager.exportData(ObjectSchemaExportManager.java:427) ~[insight-8.11.1.jar:?] at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaExportManager.exportSchemaToServerAsync(ObjectSchemaExportManager.java:679) ~[insight-8.11.1.jar:?] at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaExportManager.lambda$exportSchemaWithObjectsToServer$1(ObjectSchemaExportManager.java:640) ~[insight-8.11.1.jar:?] at java.lang.Thread.run(Thread.java:829) ~[?:?]
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available