accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jared Winick (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-2113) Verify that The Hammer approach to resource leak is a viable short term fix
Date Mon, 30 Dec 2013 22:47:51 GMT

    [ https://issues.apache.org/jira/browse/ACCUMULO-2113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13859149#comment-13859149
] 

Jared Winick commented on ACCUMULO-2113:
----------------------------------------

Per conversation on chat, it appears that the proposed code linked in the description is not
fully functional on its own and additional code is needed to shutdown the resources internal
to the ThriftTransportPool and ZooSession.

For the ThriftTransportPool, it seems like there is a static close() method that could be
used, but it will not block until the cleanup has happened as it runs in the Closer thread.


For ZooSession, it appears you would need to reach in via reflection and iterate over the
_sessions_ member to get references to the ZooKeeper objects to call close on them. As we
found out in 1858, calling close() on a ZooKeeper is not blocking either (see https://issues.apache.org/jira/browse/ZOOKEEPER-1816).


The issue with non-blocking close() methods invoked during the undeployment of a web application
is that there can be a race condition between the threads doing the asynchronous cleanup and
the application server unloading the classes. A potential workaround is to have the proposed
ClientThreads.shutdownNow() method sleep for a short period of time after closing internal
resources and before returning. See the comment at https://github.com/jaredwinick/accumulo-1858-test/blob/master/src/main/java/com/koverse/ApplicationServletContextListener.java
for more detail.

> Verify that The Hammer approach to resource leak is a viable short term fix
> ---------------------------------------------------------------------------
>
>                 Key: ACCUMULO-2113
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2113
>             Project: Accumulo
>          Issue Type: Task
>    Affects Versions: 1.4.5, 1.5.1, 1.6.0
>            Reporter: Sean Busbey
>            Assignee: Jared Winick
>            Priority: Blocker
>             Fix For: 1.4.5, 1.5.1, 1.6.0
>
>
> ACCUMULO-1858 contains a link to a test harness for verifying that we aren't leaking
resources in e.g. Tomcat.
> We need someone to take "The Hammer" approach [proposed by Keith|http://mail-archives.apache.org/mod_mbox/accumulo-dev/201312.mbox/%3CCAGUtCHrThjFW-u%2BJK%2BZYALB-qut2VNd5AH1Sb8o7UcQFUXM4xA%40mail.gmail.com%3E]
and verify that it successfully stops the leak.
> Afterwords, results should be linked to on the mailing list so we can come to consensus
on how to handle the API change for releases.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message