You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Roelof Naude (JIRA)" <ji...@apache.org> on 2014/08/06 10:21:15 UTC
[jira] [Updated] (THRIFT-2649) TAsyncManager leak the selector
[ https://issues.apache.org/jira/browse/THRIFT-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roelof Naude updated THRIFT-2649:
---------------------------------
iff -u TAsyncManager.java TAsyncManager_fixed.java
--- TAsyncManager.java 2014-08-06 10:06:28.241035884 +0200
+++ TAsyncManager_fixed.java 2014-08-06 10:07:33.762758671 +0200
@@ -117,6 +117,12 @@
LOGGER.error("Ignoring uncaught exception in SelectThread", exception);
}
}
+
+ try {
+ selector.close();
+ } catch (IOException ex) {
+ //ignore. not much to do
+ } //try
}
> TAsyncManager leak the selector
> -------------------------------
>
> Key: THRIFT-2649
> URL: https://issues.apache.org/jira/browse/THRIFT-2649
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Affects Versions: 0.9.1
> Environment: uname -a
> Linux segfault 3.14.13-100.fc19.x86_64 #1 SMP Fri Jul 18 02:36:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
> java -version
> java version "1.7.0_65"
> OpenJDK Runtime Environment (fedora-2.5.1.2.fc19-x86_64 u65-b17)
> Reporter: Roelof Naude
> Priority: Critical
> Labels: easyfix
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> TAsyncManager's SelectThread never closes the selector when shutting down. This results in leaking file descriptors.
> Consider the diff in output from /proc/pid/fd/. The diff was created directly after startup and directly before shutdown:
> +lr-x------. 1 roelof roelof 64 Aug 6 09:10 191 -> pipe:[46800]
> +l-wx------. 1 roelof roelof 64 Aug 6 09:10 192 -> pipe:[46800]
> +lrwx------. 1 roelof roelof 64 Aug 6 09:10 193 -> anon_inode:[eventpoll]
--
This message was sent by Atlassian JIRA
(v6.2#6252)