You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was investigating a race condition with file truncation and as I was constantly writing to a file and truncating it from another thread, this happened:
Exception in thread "pool-1-thread-1" java.lang.OutOfMemoryError: Requested array size exceeds VM limit
at java.base/java.util.Arrays.copyOf(Arrays.java:3745)
at java.base/java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:120)
at java.base/java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:95)
at java.base/java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:137)
at com.teragrep.rlo_13.MonitoredFileConsumer.readFile(MonitoredFileConsumer.java:88)
at com.teragrep.rlo_13.MonitoredFileConsumer.accept(MonitoredFileConsumer.java:129)
at com.teragrep.rlo_13.MonitoredFileConsumer.accept(MonitoredFileConsumer.java:32)
at com.teragrep.rlo_12.FileTask.run(FileTask.java:63)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
--apparent-size
print apparent sizes rather than device usage; although the apparent size is usually smaller, it may be
larger due to holes in ('sparse') files, internal fragmentation, indirect blocks, and the like
I was investigating a race condition with file truncation and as I was constantly writing to a file and truncating it from another thread, this happened:
Not a big file by any means:
The text was updated successfully, but these errors were encountered: