You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@directmemory.apache.org by "Krieg, Andreas" <An...@oce.com> on 2012/09/07 14:08:48 UTC

EHCache Integration Test Exception

Hello,
 
I start digging into the DirectMemory project for some use cases and I
played with the EHCache integration tests that I've put in a Java
Application:
 
Executing the testOffHeapExceedMemory() gives me some Exceptions after a
while:
 
3981 [main] INFO net.sf.ehcache.pool.impl.DefaultSizeOfEngine - using
Unsafe sizeof engine

OnHeapSize=34800, OnHeapElements=30

OffHeapSize=104856384, OffHeapElements=78368

DiskStoreSize=0, DiskStoreElements=0

10367 [Timer-0] INFO org.apache.directmemory.cache.CacheServiceImpl -
begin scheduled disposal

10460 [Timer-0] INFO org.apache.directmemory.cache.CacheServiceImpl -
scheduled disposal complete

20375 [Timer-0] INFO org.apache.directmemory.cache.CacheServiceImpl -
begin scheduled disposal

Exception in thread "Timer-0" java.lang.IllegalArgumentException: The
buffer java.nio.DirectByteBuffer[pos=1338 lim=1338 cap=1338] seems not
to belong to this allocator

at
org.apache.directmemory.memory.allocator.MergingByteBufferAllocatorImpl.
free(MergingByteBufferAllocatorImpl.java:161)

at
org.apache.directmemory.memory.MemoryManagerServiceImpl.free(MemoryManag
erServiceImpl.java:199)

at
org.apache.directmemory.memory.MemoryManagerServiceImpl.free(MemoryManag
erServiceImpl.java:307)

at
org.apache.directmemory.memory.MemoryManagerServiceImpl.collectLFU(Memor
yManagerServiceImpl.java:297)

at
org.apache.directmemory.cache.CacheServiceImpl.collectLFU(CacheServiceIm
pl.java:255)

at
org.apache.directmemory.cache.CacheServiceImpl$1.run(CacheServiceImpl.ja
va:77)

at java.util.TimerThread.mainLoop(Unknown Source)

at java.util.TimerThread.run(Unknown Source)

 

Maybe the testcase should wait a while to show that error?

Any solution for that?

Regards, Andreas



This message and attachment(s) are intended solely for use by the addressee and may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law.

If you are not the intended recipient or agent thereof responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.

If you have received this communication in error, please notify the sender immediately by telephone and with a 'reply' message.

Thank you for your co-operation.


Re: EHCache Integration Test Exception

Posted by Benoit Perroud <be...@noisette.ch>.
Thanks for reporting this issue. I'm currently looking at it, keep you
posted ASAP.

Benoit.


2012/9/7 Krieg, Andreas <An...@oce.com>:
> Hello,
>
> I start digging into the DirectMemory project for some use cases and I
> played with the EHCache integration tests that I've put in a Java
> Application:
>
> Executing the testOffHeapExceedMemory() gives me some Exceptions after a
> while:
>
>
> 3981 [main] INFO net.sf.ehcache.pool.impl.DefaultSizeOfEngine - using Unsafe
> sizeof engine
>
> OnHeapSize=34800, OnHeapElements=30
>
> OffHeapSize=104856384, OffHeapElements=78368
>
> DiskStoreSize=0, DiskStoreElements=0
>
> 10367 [Timer-0] INFO org.apache.directmemory.cache.CacheServiceImpl - begin
> scheduled disposal
>
> 10460 [Timer-0] INFO org.apache.directmemory.cache.CacheServiceImpl -
> scheduled disposal complete
>
> 20375 [Timer-0] INFO org.apache.directmemory.cache.CacheServiceImpl - begin
> scheduled disposal
>
> Exception in thread "Timer-0"
>
> java.lang.IllegalArgumentException: The buffer
> java.nio.DirectByteBuffer[pos=1338 lim=1338 cap=1338] seems not to belong to
> this allocator
>
> at
> org.apache.directmemory.memory.allocator.MergingByteBufferAllocatorImpl.free(
>
> MergingByteBufferAllocatorImpl.java:161)
>
> at org.apache.directmemory.memory.MemoryManagerServiceImpl.free(
>
> MemoryManagerServiceImpl.java:199)
>
> at org.apache.directmemory.memory.MemoryManagerServiceImpl.free(
>
> MemoryManagerServiceImpl.java:307)
>
> at org.apache.directmemory.memory.MemoryManagerServiceImpl.collectLFU(
>
> MemoryManagerServiceImpl.java:297)
>
> at org.apache.directmemory.cache.CacheServiceImpl.collectLFU(
>
> CacheServiceImpl.java:255)
>
> at org.apache.directmemory.cache.CacheServiceImpl$1.run(
>
> CacheServiceImpl.java:77)
>
> at java.util.TimerThread.mainLoop(Unknown Source)
>
> at java.util.TimerThread.run(Unknown Source)
>
>
>
> Maybe the testcase should wait a while to show that error?
>
> Any solution for that?
>
> Regards, Andreas
>
>
> This message and attachment(s) are intended solely for use by the addressee
> and may contain information that is privileged, confidential or otherwise
> exempt from disclosure under applicable law. If you are not the intended
> recipient or agent thereof responsible for delivering this message to the
> intended recipient, you are hereby notified that any dissemination,
> distribution or copying of this communication is strictly prohibited. If you
> have received this communication in error, please notify the sender
> immediately by telephone and with a 'reply' message. Thank you for your
> co-operation.