[ https://issues.apache.org/jira/browse/IGNITE-19980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vladimir Steshin updated IGNITE-19980: -------------------------------------- Release Note: Out of memory of the defragmantation region doesn't produce NPE exception any more. > NPE within OOM exception during defragmentation. > ------------------------------------------------ > > Key: IGNITE-19980 > URL: https://issues.apache.org/jira/browse/IGNITE-19980 > Project: Ignite > Issue Type: Bug > Affects Versions: 2.12 > Reporter: Vladimir Steshin > Assignee: Vladimir Steshin > Priority: Minor > Attachments: IgnitePdsDefragmentationTest.java > > Time Spent: 1h 10m > Remaining Estimate: 0h > > When defragmentating a partition, we can run out of the defragmentation > region. Then, a OOM exception arises by > {code:java} > IgniteOutOfMemoryException PageMemoryImpl#oomException(String reason) { > DataRegionConfiguration dataRegionCfg = > getDataRegionConfiguration(); > return new IgniteOutOfMemoryException("Failed to find a page for > eviction (" + reason + ") [" + > "segmentCapacity=" + loadedPages.capacity() + > ", loaded=" + loadedPages.size() + > ", maxDirtyPages=" + maxDirtyPages + > ", dirtyPages=" + dirtyPagesCntr + > ", cpPages=" + (checkpointPages() == null ? 0 : > checkpointPages().size()) + > ", pinned=" + acquiredPages() + > ']' + U.nl() + "Out of memory in data region [" + > "name=" + dataRegionCfg.getName() + > ", initSize=" + > U.readableSize(dataRegionCfg.getInitialSize(), false) + > ", maxSize=" + U.readableSize(dataRegionCfg.getMaxSize(), > false) + > ", persistenceEnabled=" + > dataRegionCfg.isPersistenceEnabled() + "] Try the following:" + U.nl() + > " ^-- Increase maximum off-heap memory size > (DataRegionConfiguration.maxSize)" + U.nl() + > " ^-- Enable eviction or expiration policies" > ); > } > {code} > The problem is that > {code:java} > DataRegionConfiguration dataRegionCfg = getDataRegionConfiguration(); > {code} > is actually null. @see `PageMemoryImpl#getDataRegionConfiguration()`. > Stacktrace: > {code:java} > [defragmentation-thread][CachePartitionDefragmentationManager] > Defragmentation process failed. > > org.apache.ignite.internal.processors.cache.persistence.freelist.CorruptedFreeListException: > Failed to insert data row > at > org.apache.ignite.internal.processors.cache.persistence.freelist.AbstractFreeList.insertDataRow(AbstractFreeList.java:600) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.freelist.CacheFreeList.insertDataRow(CacheFreeList.java:74) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.freelist.CacheFreeList.insertDataRow(CacheFreeList.java:35) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.defragmentation.CachePartitionDefragmentationManager.lambda$copyPartitionData$4(CachePartitionDefragmentationManager.java:741) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.defragmentation.TreeIterator.iterate(TreeIterator.java:83) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.defragmentation.CachePartitionDefragmentationManager.copyPartitionData(CachePartitionDefragmentationManager.java:718) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.defragmentation.CachePartitionDefragmentationManager.defragmentOnePartition(CachePartitionDefragmentationManager.java:565) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.defragmentation.CachePartitionDefragmentationManager.lambda$executeDefragmentation$66155109$1(CachePartitionDefragmentationManager.java:382) > ~[classes/:?] > at > org.apache.ignite.internal.util.IgniteUtils.lambda$doInParallel$3(IgniteUtils.java:11661) > ~[classes/:?] > at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) > ~[?:?] > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) > ~[?:?] > at java.lang.Thread.run(Thread.java:829) [?:?] > Suppressed: > org.apache.ignite.internal.processors.cache.persistence.freelist.CorruptedFreeListException: > Failed to insert data row > at > org.apache.ignite.internal.processors.cache.persistence.freelist.AbstractFreeList.insertDataRow(AbstractFreeList.java:600) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.freelist.CacheFreeList.insertDataRow(CacheFreeList.java:74) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.freelist.CacheFreeList.insertDataRow(CacheFreeList.java:35) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.defragmentation.CachePartitionDefragmentationManager.lambda$copyPartitionData$4(CachePartitionDefragmentationManager.java:741) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.defragmentation.TreeIterator.iterate(TreeIterator.java:83) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.defragmentation.CachePartitionDefragmentationManager.copyPartitionData(CachePartitionDefragmentationManager.java:718) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.defragmentation.CachePartitionDefragmentationManager.defragmentOnePartition(CachePartitionDefragmentationManager.java:565) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.defragmentation.CachePartitionDefragmentationManager.lambda$executeDefragmentation$66155109$1(CachePartitionDefragmentationManager.java:382) > ~[classes/:?] > at > org.apache.ignite.internal.util.IgniteUtils.lambda$doInParallel$3(IgniteUtils.java:11661) > ~[classes/:?] > at java.util.concurrent.FutureTask.run(FutureTask.java:264) > ~[?:?] > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) > ~[?:?] > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) > ~[?:?] > at java.lang.Thread.run(Thread.java:829) [?:?] > Caused by: java.lang.NullPointerException > at > org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl$Segment.oomException(PageMemoryImpl.java:2367) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.pagemem.ClockPageReplacementPolicy.replace(ClockPageReplacementPolicy.java:94) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl$Segment.removePageForReplacement(PageMemoryImpl.java:2341) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl$Segment.access$900(PageMemoryImpl.java:1981) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl.allocatePage(PageMemoryImpl.java:587) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.freelist.AbstractFreeList.allocateDataPage(AbstractFreeList.java:580) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.freelist.AbstractFreeList.writeSinglePage(AbstractFreeList.java:698) > ~[classes/:?] > at > org.apache.ignite.internal.processors.cache.persistence.freelist.AbstractFreeList.insertDataRow(AbstractFreeList.java:592) > ~[classes/:?] > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)