'Infinispan file index cache thread leaks
I have a thread leak on a Java application using Infinispan for index file caching. I think it is related to this stack trace (lot of occurrences) :
org.infinispan.persistence.spi.PersistenceException: ISPN029019: Cannot load key SimpleKey [/* OBFUSCATED FOR STACKOVERFLOW */] from index.
at org.infinispan.persistence.sifs.NonBlockingSoftIndexFileStore.lambda$load$17(NonBlockingSoftIndexFileStore.java:601)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.IllegalStateException: Error reading from 0:4936138
at org.infinispan.persistence.sifs.EntryRecord.readEntryHeader(EntryRecord.java:93)
at org.infinispan.persistence.sifs.IndexNode$LeafNode.getHeaderAndKey(IndexNode.java:1033)
at org.infinispan.persistence.sifs.IndexNode$LeafNode.loadRecord(IndexNode.java:1063)
at org.infinispan.persistence.sifs.IndexNode$ReadOperation$1.apply(IndexNode.java:224)
at org.infinispan.persistence.sifs.IndexNode$ReadOperation$1.apply(IndexNode.java:221)
at org.infinispan.persistence.sifs.IndexNode.applyOnLeaf(IndexNode.java:295)
at org.infinispan.persistence.sifs.Index.getRecord(Index.java:120)
at org.infinispan.persistence.sifs.Index.getRecord(Index.java:106)
at org.infinispan.persistence.sifs.NonBlockingSoftIndexFileStore.lambda$load$17(NonBlockingSoftIndexFileStore.java:592)
... 6 common frames omitted
This exception should be thrown by org.infinispan.persistence.sifs.EntryHeader class at line 42
public EntryHeader(ByteBuffer buffer, boolean oldFormat) {
if (!oldFormat && buffer.get() != MAGIC) {
throw new IllegalStateException();
}
// ...
}
In what direction should I go to solve this problem ? Any help will be appreciated.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
