AEM crashes with OutOfMemoryError caused by PDF upload

Issue

AEM crashes with an OutOfMemoryError in the log files.  After capturing a heap dump and analyzing it using Eclipse Memory Analyzer Tool, the leak suspects report shows a thread similar to the one below consuming most of the heap.

pool-7-thread-1
at java.lang.OutOfMemoryError.<init>()V (OutOfMemoryError.java:48)
at java.util.Arrays.copyOfRange([CII)[C (Arrays.java:3664)
at java.lang.String.<init>([CII)V (String.java:201)
at java.lang.String.substring(II)Ljava/lang/String; (String.java:1956)
at com.adobe.internal.pdftoolkit.pdf.graphics.font.impl.CMapResourceBuilder.splitToUnicodeSubSequence(Ljava/lang/String;)Ljava/util/List; (CMapResourceBuilder.java:581)
at com.adobe.internal.pdftoolkit.pdf.graphics.font.impl.CMapResourceBuilder.parseToUnicodeMap(Ljava/io/InputStream;Z)Ljava/util/HashSet; (CMapResourceBuilder.java:317)
at com.adobe.internal.pdftoolkit.pdf.graphics.font.PDFToUnicodeCMap.<init>(Lcom/adobe/internal/pdftoolkit/core/cos/CosObject;Z)V (PDFToUnicodeCMap.java:317)
at com.adobe.internal.pdftoolkit.pdf.graphics.font.PDFToUnicodeCMap.getInstance(Lcom/adobe/internal/pdftoolkit/core/cos/CosObject;)Lcom/adobe/internal/pdftoolkit/pdf/graphics/font/PDFToUnicodeCMap; (PDFToUnicodeCMap.java:355)
at com.adobe.internal.pdftoolkit.pdf.graphics.font.PDFFontType0.getToUnicodeCMap()Lcom/adobe/internal/pdftoolkit/pdf/graphics/font/PDFToUnicodeCMap; (PDFFontType0.java:163)
at com.adobe.internal.pdftoolkit.pdf.graphics.font.impl.PDFFontUtils.getCharCodes([BZZLcom/adobe/internal/pdftoolkit/pdf/graphics/font/PDFFontType0;Z)Ljava/util/List; (PDFFontUtils.java:1262)
at com.adobe.internal.pdftoolkit.pdf.graphics.font.PDFFontType0.getCharCodes([BZ)Ljava/util/List; (PDFFontType0.java:351)
at com.adobe.internal.pdftoolkit.pdf.content.processor.TextRun.getCharCodesFromFont([BZ)Ljava/util/List; (TextRun.java:760)
at com.adobe.internal.pdftoolkit.pdf.content.processor.TextRun.cacheHorizontalGlyphInfo()V (TextRun.java:839)
at com.adobe.internal.pdftoolkit.pdf.content.processor.TextRun.cacheGlyphInfo()V (TextRun.java:746)
at com.adobe.internal.pdftoolkit.pdf.content.processor.TextRun.init()V (TextRun.java:305)
at com.adobe.internal.pdftoolkit.pdf.content.processor.TextRun.<init>(Lcom/adobe/internal/pdftoolkit/core/types/ASString;Lcom/adobe/internal/pdftoolkit/core/types/ASMatrix;Lcom/adobe/internal/pdftoolkit/pdf/content/processor/GState;Lcom/adobe/internal/pdftoolkit/pdf/content/processor/ActualText;Lcom/adobe/internal/pdftoolkit/pdf/document/PDFDocument;Z)V (TextRun.java:168)
at com.adobe.internal.pdftoolkit.pdf.content.processor.TextObject.addTextRun(Lcom/adobe/internal/pdftoolkit/core/types/ASString;Lcom/adobe/internal/pdftoolkit/pdf/content/processor/GState;Lcom/adobe/internal/pdftoolkit/pdf/content/processor/ActualText;)V (TextObject.java:104)
at com.adobe.internal.pdftoolkit.services.textextraction.impl.TEContentStreamHandler.Tj(Lcom/adobe/internal/pdftoolkit/core/types/ASString;Lcom/adobe/internal/pdftoolkit/pdf/content/Instruction;)V (TEContentStreamHandler.java:448)
at com.adobe.internal.pdftoolkit.pdf.content.processor.TextShowingOperator.process(Lcom/adobe/internal/pdftoolkit/pdf/content/Instruction;Lcom/adobe/internal/pdftoolkit/pdf/content/processor/IOperatorHandler;)V (ContentOperators.java:521)
at com.adobe.internal.pdftoolkit.pdf.content.processor.ContentStreamProcessor.process(Lcom/adobe/internal/pdftoolkit/pdf/content/Instruction;)V (ContentStreamProcessor.java:103)
at com.adobe.internal.pdftoolkit.services.textextraction.impl.TEContentStreamHandler.extractTextObjects(Lcom/adobe/internal/pdftoolkit/pdf/content/Content;)Lcom/adobe/internal/pdftoolkit/pdf/content/processor/TextObjectList; (TEContentStreamHandler.java:298)
at com.adobe.internal.pdftoolkit.services.textextraction.impl.TEContentStreamHandler.extractTextObjects(Lcom/adobe/internal/pdftoolkit/pdf/page/PDFPage;)Ljava/util/List; (TEContentStreamHandler.java:193)
at com.adobe.internal.pdftoolkit.services.textextraction.TextExtractor.extractROTEWords(Lcom/adobe/internal/pdftoolkit/pdf/page/PDFPage;I)Ljava/util/List; (TextExtractor.java:361)
at com.adobe.internal.pdftoolkit.services.textextraction.TextExtractor.getROTEWordsIterator(Lcom/adobe/internal/pdftoolkit/pdf/page/PDFPage;I)Lcom/adobe/internal/pdftoolkit/services/textextraction/WordsIterator; (TextExtractor.java:518)
at com.adobe.internal.pdftoolkit.services.readingorder.ReadingOrderTextExtractor.getReadingOrderedTextFromPDF(Lcom/adobe/internal/pdftoolkit/pdf/document/PDFDocument;Lcom/adobe/internal/pdftoolkit/core/fontset/PDFFontSet;Lcom/adobe/internal/pdftoolkit/pdf/page/PDFPage;I)Ljava/util/List; (ReadingOrderTextExtractor.java:275)
at com.adobe.internal.pdftoolkit.services.readingorder.ReadingOrderTextExtractor.extractParagraphs(Lcom/adobe/internal/pdftoolkit/pdf/page/PDFPage;I)Ljava/util/List; (ReadingOrderTextExtractor.java:567)
at com.adobe.internal.pdftoolkit.services.readingorder.ReadingOrderTextExtractor.getParagraphIterator(Lcom/adobe/internal/pdftoolkit/pdf/page/PDFPage;I)Lcom/adobe/internal/pdftoolkit/services/textextraction/ParagraphIterator; (ReadingOrderTextExtractor.java:466)
at com.adobe.internal.pdf.tika.GibsonParser.parse(Ljava/io/InputStream;Lorg/xml/sax/ContentHandler;Lorg/apache/tika/metadata/Metadata;Lorg/apache/tika/parser/ParseContext;)V (GibsonParser.java:194)
at org.apache.tika.parser.CompositeParser.parse(Ljava/io/InputStream;Lorg/xml/sax/ContentHandler;Lorg/apache/tika/metadata/Metadata;Lorg/apache/tika/parser/ParseContext;)V (CompositeParser.java:242)
at org.apache.tika.parser.CompositeParser.parse(Ljava/io/InputStream;Lorg/xml/sax/ContentHandler;Lorg/apache/tika/metadata/Metadata;Lorg/apache/tika/parser/ParseContext;)V (CompositeParser.java:242)
at org.apache.tika.parser.CompositeParser.parse(Ljava/io/InputStream;Lorg/xml/sax/ContentHandler;Lorg/apache/tika/metadata/Metadata;Lorg/apache/tika/parser/ParseContext;)V (CompositeParser.java:242)
at org.apache.tika.parser.AutoDetectParser.parse(Ljava/io/InputStream;Lorg/xml/sax/ContentHandler;Lorg/apache/tika/metadata/Metadata;Lorg/apache/tika/parser/ParseContext;)V (AutoDetectParser.java:120)
at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.parseStringValue0(Lorg/apache/jackrabbit/oak/api/Blob;Lorg/apache/tika/metadata/Metadata;Ljava/lang/String;)Ljava/lang/String; (LuceneIndexEditor.java:881)
at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.parseStringValue(Lorg/apache/jackrabbit/oak/api/Blob;Lorg/apache/tika/metadata/Metadata;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; (LuceneIndexEditor.java:869)
at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.newBinary(Lorg/apache/jackrabbit/oak/api/PropertyState;Lorg/apache/jackrabbit/oak/spi/state/NodeState;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; (LuceneIndexEditor.java:573)
at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.indexAggregatedNode(Ljava/lang/String;Ljava/util/List;Lorg/apache/jackrabbit/oak/plugins/index/lucene/Aggregate$NodeIncludeResult;)Z (LuceneIndexEditor.java:775)
at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.access$000(Lorg/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexEditor;Ljava/lang/String;Ljava/util/List;Lorg/apache/jackrabbit/oak/plugins/index/lucene/Aggregate$NodeIncludeResult;)Z (LuceneIndexEditor.java:89)
at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor$1.onResult(Lorg/apache/jackrabbit/oak/plugins/index/lucene/Aggregate$NodeIncludeResult;)V (LuceneIndexEditor.java:702)
at org.apache.jackrabbit.oak.plugins.index.lucene.Aggregate$NodeInclude.collectResults(Lorg/apache/jackrabbit/oak/plugins/index/lucene/Aggregate$NodeInclude;Ljava/lang/String;Ljava/lang/String;Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/plugins/index/lucene/Aggregate$ResultCollector;)V (Aggregate.java:261)
at org.apache.jackrabbit.oak.plugins.index.lucene.Aggregate$NodeInclude.collectResults(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/plugins/index/lucene/Aggregate$ResultCollector;)V (Aggregate.java:222)
at org.apache.jackrabbit.oak.plugins.index.lucene.Aggregate$Matcher.collectResults(Lorg/apache/jackrabbit/oak/plugins/index/lucene/Aggregate$ResultCollector;)V (Aggregate.java:539)
at org.apache.jackrabbit.oak.plugins.index.lucene.Aggregate.collectAggregates(Lorg/apache/jackrabbit/oak/spi/state/NodeState;Ljava/util/List;Lorg/apache/jackrabbit/oak/plugins/index/lucene/Aggregate$ResultCollector;)V (Aggregate.java:133)
at org.apache.jackrabbit.oak.plugins.index.lucene.Aggregate.collectAggregates(Lorg/apache/jackrabbit/oak/spi/state/NodeState;Ljava/util/List;Lorg/apache/jackrabbit/oak/plugins/index/lucene/Aggregate$ResultCollector;)V (Aggregate.java:141)
at org.apache.jackrabbit.oak.plugins.index.lucene.Aggregate.collectAggregates(Lorg/apache/jackrabbit/oak/spi/state/NodeState;Ljava/util/List;Lorg/apache/jackrabbit/oak/plugins/index/lucene/Aggregate$ResultCollector;)V (Aggregate.java:141)
at org.apache.jackrabbit.oak.plugins.index.lucene.Aggregate.collectAggregates(Lorg/apache/jackrabbit/oak/spi/state/NodeState;Ljava/util/List;Lorg/apache/jackrabbit/oak/plugins/index/lucene/Aggregate$ResultCollector;)V (Aggregate.java:141)
at org.apache.jackrabbit.oak.plugins.index.lucene.Aggregate.collectAggregates(Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/plugins/index/lucene/Aggregate$ResultCollector;)V (Aggregate.java:83)
at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.indexAggregates(Ljava/lang/String;Ljava/util/List;Lorg/apache/jackrabbit/oak/spi/state/NodeState;)Z (LuceneIndexEditor.java:699)
at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.makeDocument(Ljava/lang/String;Lorg/apache/jackrabbit/oak/spi/state/NodeState;Z)Lorg/apache/lucene/document/Document; (LuceneIndexEditor.java:348)
at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.addOrUpdate(Ljava/lang/String;Lorg/apache/jackrabbit/oak/spi/state/NodeState;Z)Z (LuceneIndexEditor.java:298)
at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.leave(Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeState;)V (LuceneIndexEditor.java:200)
at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.leave(Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeState;)V (CompositeEditor.java:74)
at org.apache.jackrabbit.oak.spi.commit.VisibleEditor.leave(Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeState;)V (VisibleEditor.java:63)
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(Ljava/lang/String;Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeState;)Z (EditorDiff.java:153)
at org.apache.jackrabbit.oak.plugins.segment.MapRecord$2.childNodeChanged(Ljava/lang/String;Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeState;)Z (MapRecord.java:403)
at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(Lorg/apache/jackrabbit/oak/plugins/segment/MapRecord;Lorg/apache/jackrabbit/oak/spi/state/NodeStateDiff;)Z (MapRecord.java:487)
at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(Lorg/apache/jackrabbit/oak/plugins/segment/MapRecord;Lorg/apache/jackrabbit/oak/spi/state/NodeStateDiff;)Z (MapRecord.java:394)
at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeStateDiff;)Z (SegmentNodeState.java:583)
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(Ljava/lang/String;Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeState;)Z (EditorDiff.java:148)
at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(Lorg/apache/jackrabbit/oak/plugins/segment/MapRecord;Lorg/apache/jackrabbit/oak/spi/state/NodeStateDiff;)Z (MapRecord.java:418)
at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeStateDiff;)Z (SegmentNodeState.java:583)
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(Ljava/lang/String;Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeState;)Z (EditorDiff.java:148)
at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(Lorg/apache/jackrabbit/oak/plugins/segment/MapRecord;Lorg/apache/jackrabbit/oak/spi/state/NodeStateDiff;)Z (MapRecord.java:418)
at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeStateDiff;)Z (SegmentNodeState.java:583)
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(Ljava/lang/String;Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeState;)Z (EditorDiff.java:148)
at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(Lorg/apache/jackrabbit/oak/plugins/segment/MapRecord;Lorg/apache/jackrabbit/oak/spi/state/NodeStateDiff;)Z (MapRecord.java:418)
at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeStateDiff;)Z (SegmentNodeState.java:583)
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(Ljava/lang/String;Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeState;)Z (EditorDiff.java:148)
at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(Lorg/apache/jackrabbit/oak/plugins/segment/MapRecord;Lorg/apache/jackrabbit/oak/spi/state/NodeStateDiff;)Z (MapRecord.java:418)
at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeStateDiff;)Z (SegmentNodeState.java:583)
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(Ljava/lang/String;Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeState;)Z (EditorDiff.java:148)
at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(Lorg/apache/jackrabbit/oak/plugins/segment/MapRecord;Lorg/apache/jackrabbit/oak/spi/state/NodeStateDiff;)Z (MapRecord.java:418)
at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeStateDiff;)Z (SegmentNodeState.java:583)
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(Ljava/lang/String;Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeState;)Z (EditorDiff.java:148)
at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(Lorg/apache/jackrabbit/oak/plugins/segment/MapRecord;Lorg/apache/jackrabbit/oak/spi/state/NodeStateDiff;)Z (MapRecord.java:418)
at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeStateDiff;)Z (SegmentNodeState.java:583)
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(Ljava/lang/String;Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeState;)Z (EditorDiff.java:148)
at org.apache.jackrabbit.oak.plugins.segment.MapRecord$2.childNodeChanged(Ljava/lang/String;Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeState;)Z (MapRecord.java:403)
at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(Lorg/apache/jackrabbit/oak/plugins/segment/MapRecord;Lorg/apache/jackrabbit/oak/spi/state/NodeStateDiff;)Z (MapRecord.java:487)
at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(Lorg/apache/jackrabbit/oak/plugins/segment/MapRecord;Lorg/apache/jackrabbit/oak/spi/state/NodeStateDiff;)Z (MapRecord.java:394)
at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeStateDiff;)Z (SegmentNodeState.java:583)
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(Lorg/apache/jackrabbit/oak/spi/commit/Editor;Lorg/apache/jackrabbit/oak/spi/state/NodeState;Lorg/apache/jackrabbit/oak/spi/state/NodeState;)Lorg/apache/jackrabbit/oak/api/CommitFailedException; (EditorDiff.java:52)
at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.updateIndex(Lorg/apache/jackrabbit/oak/spi/state/NodeState;Ljava/lang/String;Lorg/apache/jackrabbit/oak/spi/state/NodeState;Ljava/lang/String;Ljava/lang/String;)Z (AsyncIndexUpdate.java:491)
at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.runWhenPermitted()V (AsyncIndexUpdate.java:433)
at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.run()V (AsyncIndexUpdate.java:325)
at org.apache.sling.commons.scheduler.impl.QuartzJobExecutor.execute(Lorg/quartz/JobExecutionContext;)V (QuartzJobExecutor.java:115)
at org.quartz.core.JobRunShell.run()V (JobRunShell.java:202)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V (ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run()V (ThreadPoolExecutor.java:617)
at java.lang.Thread.run()V (Thread.java:745)

Cause

This is due to a known product bug.

Resolution

There are three options to solve this issue:

  1. Disable indexing of the contents of PDF documents by following the steps in this article.
  2. Contact AEM Customer Care and request product hotfix 12186.
  3. Apply the latest service pack and cumulative fix pack and it would fix the issue as well.

 Adobe

รับความช่วยเหลือได้เร็วและง่ายกว่าเดิม

หากคุณเป็นผู้ใช้ใหม่

Adobe MAX 2024

Adobe MAX
การประชุมความคิดสร้างสรรค์

14-16 ต.ค. Miami Beach และออนไลน์

Adobe MAX

การประชุมความคิดสร้างสรรค์

14-16 ต.ค. Miami Beach และออนไลน์

Adobe MAX 2024

Adobe MAX
การประชุมความคิดสร้างสรรค์

14-16 ต.ค. Miami Beach และออนไลน์

Adobe MAX

การประชุมความคิดสร้างสรรค์

14-16 ต.ค. Miami Beach และออนไลน์