You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2017/01/26 15:12:05 UTC

[Bug 60140] OOM caused by Memory Leak in FileBackedDataSource

https://bz.apache.org/bugzilla/show_bug.cgi?id=60140

--- Comment #4 from Marcus Lundblad <ma...@primekey.se> ---
Luis Filip Nassif:

Hi did you have any progress on the patch to reduce the number of mmappings?
We get some OOM exception in FileBackedDataSource.

Trying to create an NPOIFileSystem like this:

result = new NPOIFSFileSystem(file, false);

Then reading entries from the file to compute a hash over all content and at
the end appending an additional DocumentEntry.

But we get an OOMException when reading the data (the data is read
piece-by-piece into a 1024 byte buffer and is not kept around).

Caused by: java.io.IOException: Map failed
        at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:940)
[rt.jar:1.8.0_111]
        at
org.apache.poi.poifs.nio.FileBackedDataSource.read(FileBackedDataSource.java:94)
[poi-3.16-beta1.jar:3.16-beta1]
        at
org.apache.poi.poifs.filesystem.NPOIFSFileSystem.getBlockAt(NPOIFSFileSystem.java:484)
[poi-3.16-beta1.jar:3.16-beta1]
        at
org.apache.poi.poifs.filesystem.NPOIFSStream$StreamBlockByteBufferIterator.next(NPOIFSStream.java:169)
[poi-3.16-beta1.jar:3.16-beta1]
        ... 85 more
Caused by: java.lang.OutOfMemoryError: Map failed
        at sun.nio.ch.FileChannelImpl.map0(Native Method) [rt.jar:1.8.0_111]
        at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:937)
[rt.jar:1.8.0_111]
        ... 88 more

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org