You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by jbertram <gi...@git.apache.org> on 2018/10/05 19:13:16 UTC

[GitHub] activemq-artemis pull request #2347: ARTEMIS-2111 ManagementContext can leak

GitHub user jbertram opened a pull request:

    https://github.com/apache/activemq-artemis/pull/2347

    ARTEMIS-2111 ManagementContext can leak

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jbertram/activemq-artemis ARTEMIS-2111

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/2347.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2347
    
----
commit cbc4acdbc94692b570ad5a592aecacf6ae24a52c
Author: Justin Bertram <jb...@...>
Date:   2018-10-05T18:39:07Z

    ARTEMIS-2111 ManagementContext can leak

----


---

[GitHub] activemq-artemis pull request #2347: ARTEMIS-2111 ManagementContext can leak

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/activemq-artemis/pull/2347


---

[GitHub] activemq-artemis issue #2347: ARTEMIS-2111 ManagementContext can leak

Posted by jbertram <gi...@git.apache.org>.
Github user jbertram commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2347
  
    I couldn't find a way to write a test for this so I tested manually using the `forceFailover()` management method on the `ActiveMQServerControl`.  If anybody has any clever ideas I'd love to hear them.


---

[GitHub] activemq-artemis issue #2347: ARTEMIS-2111 ManagementContext can leak

Posted by michalxo <gi...@git.apache.org>.
Github user michalxo commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2347
  
    I have managed to reproduced this issue on VM by simply adding extra hdd, formatting it, and making Artemis to use it for bindings, journal, (etc..). Started broker, waited for all components to go up and simply deleted hdd from virt-manager. 


---

[GitHub] activemq-artemis pull request #2347: ARTEMIS-2111 ManagementContext can leak

Posted by michalxo <gi...@git.apache.org>.
Github user michalxo commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2347#discussion_r225120812
  
    --- Diff: artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java ---
    @@ -233,6 +237,21 @@ public void testWebConfig() throws Exception {
           assertEquals("password2", trustPass);
        }
     
    +   @Test
    +   public void testStopManagementContext() throws Exception {
    +      Run.setEmbedded(true);
    +      File instance1 = new File(temporaryFolder.getRoot(), "instance_user");
    +      System.setProperty("java.security.auth.login.config", instance1.getAbsolutePath() + "/etc/login.config");
    +      Artemis.main("create", instance1.getAbsolutePath(), "--silent", "--no-autotune", "--no-web", "--no-amqp-acceptor", "--no-mqtt-acceptor", "--no-stomp-acceptor", "--no-hornetq-acceptor");
    --- End diff --
    
    Can we enhance this test (better to copy this one) and use by default web console as well?
    Else Artemis process hangs as well.


---

[GitHub] activemq-artemis issue #2347: ARTEMIS-2111 ManagementContext can leak

Posted by jbertram <gi...@git.apache.org>.
Github user jbertram commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2347
  
    @michalxo, in your test is it the management context that's leaking or something else?


---

[GitHub] activemq-artemis issue #2347: ARTEMIS-2111 ManagementContext can leak

Posted by franz1981 <gi...@git.apache.org>.
Github user franz1981 commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2347
  
    You can take a weak reference of the ManagementContext instance you want to test the leak, force a GC + run finalizer (we have a method in the test suite for that) and then verify that the instance is being GCed..TBH it doesn't worth the effort ^^


---

[GitHub] activemq-artemis issue #2347: ARTEMIS-2111 ManagementContext can leak

Posted by jbertram <gi...@git.apache.org>.
Github user jbertram commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2347
  
    @franz1981, thanks for the suggestion, but I don't think this is *that* kind of leak.  I came up with a way to test it and updated the PR.


---