FAQ
GitHub user jbertram opened a pull request:

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

     Fix possible leaks in LDAP tests



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

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

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

     https://github.com/apache/activemq-artemis/pull/573.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 #573

----
commit f68fdb2c4e1e56dfbb6ccbc048f77221844df5d3
Author: jbertram <jbertram@apache.org>
Date: 2016-06-08T19:09:58Z

     Fix possible leaks in LDAP tests

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Search Discussions

  • Clebertsuconic at Jun 9, 2016 at 1:36 am
    Github user clebertsuconic commented on the issue:

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

         @jbertram

         I will merge it, but if I added this following line in one of these tests:

         ```java
            @Rule
            public ThreadLeakCheckRule leakCheckRule = new ThreadLeakCheckRule();

         ```


         The test will have leaked threads from some executor:


         ```
         LEAKING THREADS
         =============================================================================
         Thread Thread[NioProcessor-1,5,main] is still alive with the following stackTrace:
         sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method)
         sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:198)
         sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:103)
         sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
         sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
         org.apache.mina.transport.socket.nio.NioProcessor.select(NioProcessor.java:69)
         org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:961)
         org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
         java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
         java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
         java.lang.Thread.run(Thread.java:745)
         =============================================================================
         Thread Thread[pool-4-thread-1,5,main] is still alive with the following stackTrace:
         sun.misc.Unsafe.park(Native Method)
         java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
         java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
         java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
         org.apache.mina.filter.executor.UnorderedThreadPoolExecutor$Worker.fetchTask(UnorderedThreadPoolExecutor.java:461)
         org.apache.mina.filter.executor.UnorderedThreadPoolExecutor$Worker.run(UnorderedThreadPoolExecutor.java:413)
         java.lang.Thread.run(Thread.java:745)
         =============================================================================
         Thread Thread[Thread-1,5,main] is still alive with the following stackTrace:
         java.net.SocketInputStream.socketRead0(Native Method)
         java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
         java.net.SocketInputStream.read(SocketInputStream.java:170)
         java.net.SocketInputStream.read(SocketInputStream.java:141)
         java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
         java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
         java.io.BufferedInputStream.read(BufferedInputStream.java:345)
         com.sun.jndi.ldap.Connection.run(Connection.java:860)
         java.lang.Thread.run(Thread.java:745)

         ```


    ---
    If your project is set up for it, you can reply to this email and have your
    reply appear on GitHub as well. If your project does not have this feature
    enabled and wishes so, or if the feature is enabled but not working, please
    contact infrastructure at infrastructure@apache.org or file a JIRA ticket
    with INFRA.
    ---
  • Clebertsuconic at Jun 9, 2016 at 1:39 am
    Github user clebertsuconic commented on the issue:

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

         actually since this is only affecting tests (not any production code) it's better until the release is out (tomorrow) to merge it.

         I know Martyn will be respining the release. So better to wait, as we have the tests run.. and everything.


    ---
    If your project is set up for it, you can reply to this email and have your
    reply appear on GitHub as well. If your project does not have this feature
    enabled and wishes so, or if the feature is enabled but not working, please
    contact infrastructure at infrastructure@apache.org or file a JIRA ticket
    with INFRA.
    ---
  • Jbertram at Jun 9, 2016 at 3:01 am
    Github user jbertram commented on the issue:

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

         The issue with the threads is that org.apache.directory.server.core.integ.FrameworkRunner which is being used for @RunWith is managing the LDAP server and I believe by the time the thread check executes the LDAP server hasn't been shutdown completely. If we want to keep the thread checker then I think we'll have to find another way to manage the LDAP server.


    ---
    If your project is set up for it, you can reply to this email and have your
    reply appear on GitHub as well. If your project does not have this feature
    enabled and wishes so, or if the feature is enabled but not working, please
    contact infrastructure at infrastructure@apache.org or file a JIRA ticket
    with INFRA.
    ---
  • Mtaylor at Jun 9, 2016 at 8:25 am
    Github user mtaylor commented on the issue:

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

         @jbertram @clebertsuconic I've had issues with the thread checker when using JDBC. Often the driver will create some background thread that manages dead connections, clean up etc... and is closed down on VM shutdown. For these cases I add the thread name to the allowed threads. I would do the same here.


    ---
    If your project is set up for it, you can reply to this email and have your
    reply appear on GitHub as well. If your project does not have this feature
    enabled and wishes so, or if the feature is enabled but not working, please
    contact infrastructure at infrastructure@apache.org or file a JIRA ticket
    with INFRA.
    ---
  • Clebertsuconic at Jun 9, 2016 at 6:05 pm
    Github user clebertsuconic commented on the issue:

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

         @jbertram there are methods on the thread-leack-checker to add known thread names as well.


    ---
    If your project is set up for it, you can reply to this email and have your
    reply appear on GitHub as well. If your project does not have this feature
    enabled and wishes so, or if the feature is enabled but not working, please
    contact infrastructure at infrastructure@apache.org or file a JIRA ticket
    with INFRA.
    ---
  • Asfgit at Jun 9, 2016 at 6:08 pm
    Github user asfgit closed the pull request at:

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


    ---
    If your project is set up for it, you can reply to this email and have your
    reply appear on GitHub as well. If your project does not have this feature
    enabled and wishes so, or if the feature is enabled but not working, please
    contact infrastructure at infrastructure@apache.org or file a JIRA ticket
    with INFRA.
    ---

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriesactivemq
postedJun 8, '16 at 7:10p
activeJun 9, '16 at 6:08p
posts7
users1
websiteactivemq.apache.org

1 user in discussion

Asfgit: 7 posts

People

Translate

site design / logo © 2018 Grokbase