carrotdata / carrot-cache

In-Out-Process Java cache (L1/L2 off-heap, scalable, ZeroGC) with full SSD support
Apache License 2.0
3 stars 0 forks source link

[BUG] RollingWindowCounter bug during testing with MALLOC_DEBUG enabled #377

Closed VladRodionov closed 3 weeks ago

VladRodionov commented 4 months ago
Exception in thread "Thread-53" java.lang.ArrayIndexOutOfBoundsException: Index -2 out of bounds for length 60
    at com.carrotdata.cache.util.RollingWindowCounter.increment(RollingWindowCounter.java:48)
    at com.carrotdata.cache.io.Segment$Info.access(Segment.java:413)
    at com.carrotdata.cache.io.Segment.access(Segment.java:1146)
    at com.carrotdata.cache.io.IOEngine.access(IOEngine.java:884)
    at com.carrotdata.cache.io.IOEngine.get(IOEngine.java:997)
    at com.carrotdata.cache.Cache.getKeyValue(Cache.java:1900)
    at com.carrotdata.cache.Cache.getKeyValue(Cache.java:1877)
    at com.carrotdata.cache.TestCacheMultithreadedZipfBase.verifyMemoryStream(TestCacheMultithreadedZipfBase.java:334)
    at com.carrotdata.cache.TestCacheMultithreadedZipfBase.runMemoryStreamZipf(TestCacheMultithreadedZipfBase.java:243)
    at com.carrotdata.cache.TestCacheMultithreadedZipfBase.lambda$1(TestCacheMultithreadedZipfBase.java:390)
    at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "Thread-55" java.lang.ArrayIndexOutOfBoundsException: Index -2 out of bounds for length 60
    at com.carrotdata.cache.util.RollingWindowCounter.increment(RollingWindowCounter.java:50)
    at com.carrotdata.cache.io.Segment$Info.access(Segment.java:413)
    at com.carrotdata.cache.io.Segment.access(Segment.java:1146)
    at com.carrotdata.cache.io.IOEngine.access(IOEngine.java:884)
    at com.carrotdata.cache.io.IOEngine.get(IOEngine.java:997)
    at com.carrotdata.cache.Cache.getKeyValue(Cache.java:1900)
    at com.carrotdata.cache.Cache.getKeyValue(Cache.java:1877)
    at com.carrotdata.cache.TestCacheMultithreadedZipfBase.verifyMemoryStream(TestCacheMultithreadedZipfBase.java:334)
    at com.carrotdata.cache.TestCacheMultithreadedZipfBase.runMemoryStreamZipf(TestCacheMultithreadedZipfBase.java:243)
    at com.carrotdata.cache.TestCacheMultithreadedZipfBase.lambda$1(TestCacheMultithreadedZipfBase.java:390)
    at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "Thread-56" java.lang.ArrayIndexOutOfBoundsException: Index -2 out of bounds for length 60
    at com.carrotdata.cache.util.RollingWindowCounter.increment(RollingWindowCounter.java:50)
    at com.carrotdata.cache.io.Segment$Info.access(Segment.java:413)
    at com.carrotdata.cache.io.Segment.access(Segment.java:1146)
    at com.carrotdata.cache.io.IOEngine.access(IOEngine.java:884)
    at com.carrotdata.cache.io.IOEngine.get(IOEngine.java:997)
    at com.carrotdata.cache.Cache.getKeyValue(Cache.java:1900)
    at com.carrotdata.cache.Cache.getKeyValue(Cache.java:1877)
    at com.carrotdata.cache.TestCacheMultithreadedZipfBase.verifyMemoryStream(TestCacheMultithreadedZipfBase.java:334)
    at com.carrotdata.cache.TestCacheMultithreadedZipfBase.runMemoryStreamZipf(TestCacheMultithreadedZipfBase.java:243)
    at com.carrotdata.cache.TestCacheMultithreadedZipfBase.lambda$1(TestCacheMultithreadedZipfBase.java:390)
    at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "Thread-54" java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 60
    at com.carrotdata.cache.util.RollingWindowCounter.increment(RollingWindowCounter.java:48)
    at com.carrotdata.cache.io.Segment$Info.access(Segment.java:413)
    at com.carrotdata.cache.io.Segment.access(Segment.java:1146)
    at com.carrotdata.cache.io.IOEngine.access(IOEngine.java:884)
    at com.carrotdata.cache.io.IOEngine.get(IOEngine.java:997)
    at com.carrotdata.cache.Cache.getKeyValue(Cache.java:1900)
    at com.carrotdata.cache.Cache.getKeyValue(Cache.java:1877)
    at com.carrotdata.cache.TestCacheMultithreadedZipfBase.verifyMemoryStream(TestCacheMultithreadedZipfBase.java:334)
    at com.carrotdata.cache.TestCacheMultithreadedZipfBase.runMemoryStreamZipf(TestCacheMultithreadedZipfBase.java:243)
    at com.carrotdata.cache.TestCacheMultithreadedZipfBase.lambda$1(TestCacheMultithreadedZipfBase.java:390)
    at java.base/java.lang.Thread.run(Thread.java:834)
VladRodionov commented 4 months ago

Consider removing RWC. It is not used. Test is TestCacheMultithreadedZipfBase

VladRodionov commented 3 weeks ago

Removed RWC.