Exception in thread "DisposableGC" java.lang.IllegalStateException: g0:: size < 0 :: culprit=JMemoryReference[prev=null, next=null]
at org.jnetpcap.nio.LinkSequence.remove(Unknown Source)
at org.jnetpcap.nio.DisposableGC.sortGenerations(Unknown Source)
at org.jnetpcap.nio.DisposableGC.drainRefQueueLoop(Unknown Source)
at org.jnetpcap.nio.DisposableGC$2.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)
I will have a fix for this soon. Trying to reproduce the errors in heavily multi-threaded junit testcase right now. This will affect both 1.3 and 1.4.
Nice.
I'm having trouble reproducing this error. Our jUnit testcase starts up 10 threads and allocates, peers, unpeers and does everything else possible with the memory all at once. Memory is also deallocated and allocated at the same time from multiple threads with no errors.
Can you please contact us at support@slytechs.com so we can get more information about the condition under which the exception occurred? This would be very helpful in narrowing down, how DisposableGC arrived at this inconsistent state.
I still have not been able to reproduce this error, but you are not the only developer to report it. I realize the problem does exist.
I believe this error is a synchronization issue with allocate, dispose and DisposableGC cleanup thread. I have gone through all the methods and made sure that they synchornize properly on all the objects they operate on. Especially around the allocation/dispose methods which modify the native JMemory usage counters which are big factor in the cleanup algorithm as these counters impact cleanup and generation tracking.
I have checked all the changes into the 1.3.1 branch as (r1334). I will continue to test and try and duplicate this exception, but its not an easy one to catch even with very heavily multi-threaded junit testscase that runs over long period of time.
This bug might be fixed now because of updates to JMemory/JMemoryReference/DisposableGC. I have never been able to reproduce this error, thus unable to say for certain that it is fixed. However a couple of related bugs have been fixed that synchronize access to counters which I believe were also responsible for this error.
Therefore, only user testing will verify for certain that this error has been fixed.
The group for this issue has been changed to 1.3 as it affects 1.3 and above.
This is fixed now.