- 
        15. Re: HORNETQ-469 is making the server leaktimfox Sep 14, 2010 4:44 AM (in response to timfox)Ok, I wrote a simple test case that sends and consumes messages (10K) in size. Can't see any leak. I'm going to wait until someone creates a real JUnit test case that replicates the problem since I'm just wasting my time here. 
- 
        16. Re: HORNETQ-469 is making the server leakclebert.suconic Sep 14, 2010 4:30 PM (in response to timfox)Procedures to replicate the issue: - Using Trunk - build a distribution (You will need maven on the PATH, otherwise it's failing ATM) - Unzip tx-leaks under ./build/hornetq-2.2.0.CR1/examples/soak - Change the run.sh, make MaxMemory to 2G, and add verbose:gc (I have attached a version of run.sh just for your convenience here) - Start the server with this option: ./run.sh /path-to-build-output/hornetq-2.2.0.CR1/examples/soak/tx-leaks/server0 - Run tx-leaks with ./build.sh runRemote It should fail in 10 minutes The same will never fail with Branch_2_1. (I have tried it with 512M maxMemory) It seems something gets into a redelivery loop until all the memory is consumed. Notice the test is using diverts. And I have disabled paging for this test. - 
            
                            
            run.sh 1.5 KB
- 
            
                            
            tx-leaks.zip 42.7 KB
 
- 
            
                            
            
- 
        17. Re: HORNETQ-469 is making the server leakclebert.suconic Sep 14, 2010 6:09 PM (in response to clebert.suconic)@Tim: BTW: isn't this task going to break JDK 1.5 support? It seems you replaced a class that's only available on jdk 1.6+. Maybe it would be better to keep it as is on the client classes? 
- 
        18. Re: HORNETQ-469 is making the server leakclebert.suconic Sep 14, 2010 7:54 PM (in response to clebert.suconic)Actually, I just committed org.hornetq.tests.soak.client.ClientSoakTest It would be interesting to add -verbose:gc to your VM options when running the test on Eclipse (run->RunConfiguration->ClientsoakTest).. (You will need to run it at least once before adding the option). The same test will OME on trunk, and it will run forever on Branch_2_1. I'm not sure if the divert used here will have any play on the issue. I'm just reproducing the exact same case I had on /soak/tx-leaks 
- 
        19. Re: HORNETQ-469 is making the server leakclebert.suconic Sep 14, 2010 8:40 PM (in response to clebert.suconic)Nothing to do with Diverts. I've added org.hornetq.tests.soak.client.ClientNonDivertedSoakTest which also fails on trunk. This test is doing inVM, without diverts. 
- 
        20. Re: HORNETQ-469 is making the server leakclebert.suconic Sep 15, 2010 3:23 PM (in response to clebert.suconic)@Tim: We talked earlier that a possible fix on LinkedListImpl is to change removeAfter like this: private void removeAfter(Node<E> after){Node<E> toRemove = after.next;after.next = toRemove.next;if (toRemove.next != null){toRemove.next.prev = after;}if (toRemove == tail){tail = after;}size--;if (toRemove.iterCount != 0){LinkedListImpl.this.nudgeIterators(toRemove);}toRemove.next = null;toRemove.val = null;toRemove.prev = null;}private void removeAfter(Node<E> after) { Node<E> toRemove = after.next; after.next = toRemove.next; if (toRemove.next != null) { toRemove.next.prev = after; } if (toRemove == tail) { tail = after; } size--; if (toRemove.iterCount != 0) { LinkedListImpl.this.nudgeIterators(toRemove); } toRemove.next = null; toRemove.val = null; toRemove.prev = null; } i.e., setting those fields to null at the end of the method. I probably misunderstood the change you asked me to do, as all the tests on org.hornetq.tests.integration.client,PagingTest are failing after I do that. Something related to receve(TIMEOUT) returning null (missing messages) (not being related to paging itself of course). So, I just wanted to point you that. If you run the testsuite and it's passing, then you're safe (and I probably misunderstood the fix). 
- 
        21. Re: HORNETQ-469 is making the server leakclebert.suconic Sep 15, 2010 4:27 PM (in response to clebert.suconic)I also tried to set .val to null what made the LInkedListImplTest to pass, however the SoakTest was failing. Besides, I also added a new test that would fail if toRemove.val was set to true (Look at SimpleSendReceiveSoakTest, which is a simple test, very similar to the LinkedListTest one, always keeping 1000 elements on the queue and sending and consuming elements) 
- 
        22. Re: HORNETQ-469 is making the server leaktimfox Sep 16, 2010 5:11 AM (in response to clebert.suconic)Clebert Suconic wrote: (Look at SimpleSendReceiveSoakTest, which is a simple test, very similar to the LinkedListTest one, always keeping 1000 elements on the queue and sending and consuming elements) I guess it was a typo, but this test is calling commit(), but the session is auto commit. 
- 
        23. Re: HORNETQ-469 is making the server leaktimfox Sep 16, 2010 5:16 AM (in response to clebert.suconic)The tests seem to pass if I do: private void removeAfter(Node<E> after) { Node<E> toRemove = after.next; after.next = toRemove.next; if (toRemove.next != null) { toRemove.next.prev = after; } if (toRemove == tail) { tail = after; } size--; if (toRemove.iterCount != 0) { LinkedListImpl.this.nudgeIterators(toRemove); } toRemove.next = null; toRemove.prev = null; } 
- 
        24. Re: HORNETQ-469 is making the server leaktimfox Sep 16, 2010 8:57 AM (in response to timfox)This fix seems to work, tests pass etc and is committed. I am currently fixing a related intermittent ordering issue, should be done by end of day. 
- 
        25. Re: HORNETQ-469 is making the server leaktimfox Sep 16, 2010 11:52 AM (in response to timfox)This should be fixed in TRUNK now. I'd like to see this merged into the 2_1 branch so it's in the next release for EAP too. 
 
    