You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by punwinger <gi...@git.apache.org> on 2015/04/09 10:01:10 UTC
[GitHub] thrift pull request: [THRIFT-3088] TThreadPoolServer with Sasl aut...
GitHub user punwinger opened a pull request:
https://github.com/apache/thrift/pull/432
[THRIFT-3088] TThreadPoolServer with Sasl auth may leak CLOSE_WAIT socket
Start TThreadPoolServer to server with TSaslServerTransport.Factory as transportFactory. While using nc to test the specified port whether reachable, it will leak CLOSE_WAIT socket.That's because nc will close socket at once while successful connect TThreadPoolServer, but the server still try using sasl protocol to build an inputTransport which of course failed at once. However inputTransport is null which makes it can't close socket properly which lead to CLOSE_WAIT socket.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/punwinger/thrift THRIFT-3088
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/432.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 #432
----
commit c6067aabe8d1c209020633bb20a3d3144559a917
Author: Winger Pun <pu...@gmail.com>
Date: 2015-04-09T07:56:54Z
THRIFT-3088 TThreadPoolServer with Sasl auth may leak CLOSE_WAIT socket
TThreadPoolServer with Sasl auth may leak CLOSE_WAIT socket
----
---
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.
---
[GitHub] thrift pull request #432: [THRIFT-3088] TThreadPoolServer with Sasl auth may...
Posted by jfarrell <gi...@git.apache.org>.
Github user jfarrell closed the pull request at:
https://github.com/apache/thrift/pull/432
---
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.
---
[GitHub] thrift pull request: [THRIFT-3088] TThreadPoolServer with Sasl aut...
Posted by jeking3 <gi...@git.apache.org>.
Github user jeking3 commented on a diff in the pull request:
https://github.com/apache/thrift/pull/432#discussion_r28375520
--- Diff: lib/java/src/org/apache/thrift/server/TThreadPoolServer.java ---
@@ -303,6 +303,10 @@ public void run() {
if (outputTransport != null) {
outputTransport.close();
}
+
+ if (client_.isOpen()) {
--- End diff --
Does TSimpleServer in java need the same change?
---
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.
---
[GitHub] thrift pull request: [THRIFT-3088] TThreadPoolServer with Sasl aut...
Posted by jeking3 <gi...@git.apache.org>.
Github user jeking3 commented on a diff in the pull request:
https://github.com/apache/thrift/pull/432#discussion_r28361223
--- Diff: lib/java/src/org/apache/thrift/server/TThreadPoolServer.java ---
@@ -303,6 +303,10 @@ public void run() {
if (outputTransport != null) {
outputTransport.close();
}
+
+ if (client_.isOpen()) {
--- End diff --
This was also addressed in THRIFT-3083 where the Simple, Threaded, and ThreadPool server serve() routine was consolidated; some servers closed the client and some did not.
---
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.
---
[GitHub] thrift pull request: [THRIFT-3088] TThreadPoolServer with Sasl aut...
Posted by jeking3 <gi...@git.apache.org>.
Github user jeking3 commented on the pull request:
https://github.com/apache/thrift/pull/432#issuecomment-99567451
This was committed on Apr 12 and can be closed, however please check the TServer variants in Java and see that they use the same logic to close all resources.
---
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.
---
[GitHub] thrift issue #432: [THRIFT-3088] TThreadPoolServer with Sasl auth may leak C...
Posted by jeking3 <gi...@git.apache.org>.
Github user jeking3 commented on the issue:
https://github.com/apache/thrift/pull/432
@jfarrell this can be closed - it was fixed a while back.
---
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.
---