You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Kevin Conaway (JIRA)" <ji...@apache.org> on 2008/09/11 21:07:44 UTC
[jira] Created: (FTPSERVER-177) Passive port ranges are not
properly released
Passive port ranges are not properly released
---------------------------------------------
Key: FTPSERVER-177
URL: https://issues.apache.org/jira/browse/FTPSERVER-177
Project: FtpServer
Issue Type: Bug
Affects Versions: 1.0
Reporter: Kevin Conaway
Priority: Critical
Attachments: FTPSERVER-177.patch
When using a range of passive ports, the passive ports are not appropriately released. This leads to a deadlock after all the ports in the range have been filled up.
I believe that this is because the QUIT command should be calling session.getDataConnection().closeDataConnection(); which in turn calls session.getListener().getDataConnectionConfiguration().releasePassivePort(<portNumber>);
In the attached patch, I've modified the org.apache.ftpserver.clienttests.PasvTest testcase to use a 1-value range of passive ports which exposes this issue. I've also added the session.getDataConnection().closeDataConnection() to the QUIT command
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (FTPSERVER-177) Passive port ranges are not
properly released
Posted by "Kevin Conaway (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FTPSERVER-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Conaway updated FTPSERVER-177:
------------------------------------
Attachment: FTPSERVER-177.patch
Attaching patch and test case
> Passive port ranges are not properly released
> ---------------------------------------------
>
> Key: FTPSERVER-177
> URL: https://issues.apache.org/jira/browse/FTPSERVER-177
> Project: FtpServer
> Issue Type: Bug
> Affects Versions: 1.0
> Reporter: Kevin Conaway
> Priority: Critical
> Attachments: FTPSERVER-177.patch
>
>
> When using a range of passive ports, the passive ports are not appropriately released. This leads to a deadlock after all the ports in the range have been filled up.
> I believe that this is because the QUIT command should be calling session.getDataConnection().closeDataConnection(); which in turn calls session.getListener().getDataConnectionConfiguration().releasePassivePort(<portNumber>);
> In the attached patch, I've modified the org.apache.ftpserver.clienttests.PasvTest testcase to use a 1-value range of passive ports which exposes this issue. I've also added the session.getDataConnection().closeDataConnection() to the QUIT command
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FTPSERVER-177) Passive port ranges are not
properly released
Posted by "Kevin Conaway (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FTPSERVER-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630553#action_12630553 ]
Kevin Conaway commented on FTPSERVER-177:
-----------------------------------------
We haven't noticed it but our use cases are very simple and we're not using any commands other than STOR or QUIT
Thanks for your quick response.
> Passive port ranges are not properly released
> ---------------------------------------------
>
> Key: FTPSERVER-177
> URL: https://issues.apache.org/jira/browse/FTPSERVER-177
> Project: FtpServer
> Issue Type: Bug
> Affects Versions: 1.0
> Reporter: Kevin Conaway
> Assignee: Niklas Gustavsson
> Priority: Critical
> Fix For: 1.0-M4
>
> Attachments: FTPSERVER-177.patch
>
>
> When using a range of passive ports, the passive ports are not appropriately released. This leads to a deadlock after all the ports in the range have been filled up.
> I believe that this is because the QUIT command should be calling session.getDataConnection().closeDataConnection(); which in turn calls session.getListener().getDataConnectionConfiguration().releasePassivePort(<portNumber>);
> In the attached patch, I've modified the org.apache.ftpserver.clienttests.PasvTest testcase to use a 1-value range of passive ports which exposes this issue. I've also added the session.getDataConnection().closeDataConnection() to the QUIT command
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (FTPSERVER-177) Passive port ranges are not properly
released
Posted by "Niklas Gustavsson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FTPSERVER-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niklas Gustavsson closed FTPSERVER-177.
---------------------------------------
Resolution: Fixed
Fix Version/s: 1.0-M4
Assignee: Niklas Gustavsson
Applied fix but wrote a different test for it.
Do you see this in any other case than when calling QUIT before a data transfer command (like STOR)?
svn commit "/media/big/home/svn/apache/ftpserver-trunk/core" "/media/big/home/svn/apache/ftpserver-trunk/ftplet-api" -m "Fixes issue where the data connection is not closed if QUIT is called before a data transfer command is sent (FTPSERVER-177)" --username "ngn"
M /media/big/home/svn/apache/ftpserver-trunk/core/src/examples/java/org/apache/ftpserver/examples/EmbeddingFtpServer.java
M /media/big/home/svn/apache/ftpserver-trunk/core/src/main/java/org/apache/ftpserver/command/impl/QUIT.java
M /media/big/home/svn/apache/ftpserver-trunk/core/src/test/java/org/apache/ftpserver/clienttests/PasvTest.java
M /media/big/home/svn/apache/ftpserver-trunk/core/src/test/java/org/apache/ftpserver/test/TestUtil.java
M /media/big/home/svn/apache/ftpserver-trunk/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/DataConnectionFactory.java
Transmitting file data: /media/big/home/svn/apache/ftpserver-trunk/core/src/examples/java/org/apache/ftpserver/examples/EmbeddingFtpServer.java
Transmitting file data: /media/big/home/svn/apache/ftpserver-trunk/core/src/main/java/org/apache/ftpserver/command/impl/QUIT.java
Transmitting file data: /media/big/home/svn/apache/ftpserver-trunk/core/src/test/java/org/apache/ftpserver/clienttests/PasvTest.java
Transmitting file data: /media/big/home/svn/apache/ftpserver-trunk/core/src/test/java/org/apache/ftpserver/test/TestUtil.java
Transmitting file data: /media/big/home/svn/apache/ftpserver-trunk/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/DataConnectionFactory.java
Committed revision 694474
> Passive port ranges are not properly released
> ---------------------------------------------
>
> Key: FTPSERVER-177
> URL: https://issues.apache.org/jira/browse/FTPSERVER-177
> Project: FtpServer
> Issue Type: Bug
> Affects Versions: 1.0
> Reporter: Kevin Conaway
> Assignee: Niklas Gustavsson
> Priority: Critical
> Fix For: 1.0-M4
>
> Attachments: FTPSERVER-177.patch
>
>
> When using a range of passive ports, the passive ports are not appropriately released. This leads to a deadlock after all the ports in the range have been filled up.
> I believe that this is because the QUIT command should be calling session.getDataConnection().closeDataConnection(); which in turn calls session.getListener().getDataConnectionConfiguration().releasePassivePort(<portNumber>);
> In the attached patch, I've modified the org.apache.ftpserver.clienttests.PasvTest testcase to use a 1-value range of passive ports which exposes this issue. I've also added the session.getDataConnection().closeDataConnection() to the QUIT command
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.