You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2013/12/08 21:56:22 UTC
[jira] [Commented] (THRIFT-2274) TNonblockingServer and
TThreadedSelectorServer do not close their channel selectors on exit and
leak file descriptors
[ https://issues.apache.org/jira/browse/THRIFT-2274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13842705#comment-13842705 ]
Hudson commented on THRIFT-2274:
--------------------------------
SUCCESS: Integrated in Thrift #950 (See [https://builds.apache.org/job/Thrift/950/])
THRIFT-2274 java: TNonblockingServer and TThreadedSelectorServer do not close their channel selectors on exit and leak file descriptors (roger: rev 4f00134cf989aa09a255b550b7fca0e3ef3d22f9)
* lib/java/src/org/apache/thrift/server/TNonblockingServer.java
* lib/java/src/org/apache/thrift/server/TThreadedSelectorServer.java
> TNonblockingServer and TThreadedSelectorServer do not close their channel selectors on exit and leak file descriptors
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: THRIFT-2274
> URL: https://issues.apache.org/jira/browse/THRIFT-2274
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Reporter: Thomas Kielbus
> Assignee: Roger Meier
> Attachments: thrift-2274.patch
>
>
> TNonblockingServer and TThreadedSelectorServer do not close their channel selectors on exit and do not release all ressources.
> This is an issue especially when such server implementations are started and stopped repeatedly within the same JVM. In our use case, we see hundreds of file descriptors being leaked on each Thrift server restart. We hit the OS limit on the number of open files pretty quickly.
> The attached patch fixes the issue by simply calling Selector.close() when the relevant select threads exit (TNonBlockingServer::SelectAcceptThread, TThreadedSelectorServer::SelectorThread, TThreadedSelectorServer::AcceptThread)
--
This message was sent by Atlassian JIRA
(v6.1#6144)