You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Mikael Svahn (JIRA)" <ji...@apache.org> on 2008/11/11 08:30:44 UTC
[jira] Created: (FTPSERVER-219) The STOR command hangs thread in
passive mode
The STOR command hangs thread in passive mode
---------------------------------------------
Key: FTPSERVER-219
URL: https://issues.apache.org/jira/browse/FTPSERVER-219
Project: FtpServer
Issue Type: Bug
Components: Core
Affects Versions: 1.0-M3, 1.0-M4
Environment: Debian Linux
Jdk 1.6.0_10
Reporter: Mikael Svahn
If a client does not disconnect a STOR command correct, for instance due to bad transmission the reader thread might hang. I think there must be a timeout on socket read.
- java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) @bci=0 (Interpreted frame)
- java.net.SocketInputStream.read(byte[], int, int) @bci=84, line=129 (Interpreted frame)
- java.io.BufferedInputStream.fill() @bci=175, line=218 (Compiled frame)
- java.io.BufferedInputStream.read1(byte[], int, int) @bci=44, line=258 (Compiled frame)
- java.io.BufferedInputStream.read(byte[], int, int) @bci=49, line=317 (Interpreted frame)
- java.io.FilterInputStream.read(byte[]) @bci=5, line=90 (Interpreted frame)
- org.apache.ftpserver.impl.IODataConnection.transfer(org.apache.ftpserver.ftplet.FtpSession, boolean, java.io.InputStream, java.io.OutputStream, int) @bci=133, line=236 (Interpreted frame)
- org.apache.ftpserver.impl.IODataConnection.transferFromClient(org.apache.ftpserver.ftplet.FtpSession, java.io.OutputStream) @bci=51, line=129 (Interpreted frame)
- org.apache.ftpserver.command.impl.STOR.execute(org.apache.ftpserver.impl.FtpIoSession, org.apache.ftpserver.impl.FtpServerContext, org.apache.ftpserver.ftplet.FtpRequest) @bci=344, line=147 (Interpreted frame)
- org.apache.ftpserver.impl.DefaultFtpHandler.messageReceived(org.apache.ftpserver.impl.FtpIoSession, org.apache.ftpserver.ftplet.FtpRequest) @bci=160, line=135 (Interpreted frame)
- org.apache.ftpserver.listener.nio.FtpHandlerAdapter.messageReceived(org.apache.mina.core.session.IoSession, java.lang.Object) @bci=33, line=62 (Interpreted frame)
- org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(org.apache.mina.core.filterchain.IoFilter$NextFilter, org.apache.mina.core.session.IoSession, java.lang.Object) @bci=51, line=752 (Inte
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FTPSERVER-219) The STOR command hangs thread in
passive mode
Posted by "David Latorre (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FTPSERVER-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12648176#action_12648176 ]
David Latorre commented on FTPSERVER-219:
-----------------------------------------
Fixed in #714088. I think you can close this niklas. I was checking if my write permission to the repo was ok; but I forgot about jira permissions.
> The STOR command hangs thread in passive mode
> ---------------------------------------------
>
> Key: FTPSERVER-219
> URL: https://issues.apache.org/jira/browse/FTPSERVER-219
> Project: FtpServer
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0-M3, 1.0-M4
> Environment: Debian Linux
> Jdk 1.6.0_10
> Reporter: Mikael Svahn
>
> If a client does not disconnect a STOR command correct, for instance due to bad transmission the reader thread might hang. I think there must be a timeout on socket read.
> - java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) @bci=0 (Interpreted frame)
> - java.net.SocketInputStream.read(byte[], int, int) @bci=84, line=129 (Interpreted frame)
> - java.io.BufferedInputStream.fill() @bci=175, line=218 (Compiled frame)
> - java.io.BufferedInputStream.read1(byte[], int, int) @bci=44, line=258 (Compiled frame)
> - java.io.BufferedInputStream.read(byte[], int, int) @bci=49, line=317 (Interpreted frame)
> - java.io.FilterInputStream.read(byte[]) @bci=5, line=90 (Interpreted frame)
> - org.apache.ftpserver.impl.IODataConnection.transfer(org.apache.ftpserver.ftplet.FtpSession, boolean, java.io.InputStream, java.io.OutputStream, int) @bci=133, line=236 (Interpreted frame)
> - org.apache.ftpserver.impl.IODataConnection.transferFromClient(org.apache.ftpserver.ftplet.FtpSession, java.io.OutputStream) @bci=51, line=129 (Interpreted frame)
> - org.apache.ftpserver.command.impl.STOR.execute(org.apache.ftpserver.impl.FtpIoSession, org.apache.ftpserver.impl.FtpServerContext, org.apache.ftpserver.ftplet.FtpRequest) @bci=344, line=147 (Interpreted frame)
> - org.apache.ftpserver.impl.DefaultFtpHandler.messageReceived(org.apache.ftpserver.impl.FtpIoSession, org.apache.ftpserver.ftplet.FtpRequest) @bci=160, line=135 (Interpreted frame)
> - org.apache.ftpserver.listener.nio.FtpHandlerAdapter.messageReceived(org.apache.mina.core.session.IoSession, java.lang.Object) @bci=33, line=62 (Interpreted frame)
> - org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(org.apache.mina.core.filterchain.IoFilter$NextFilter, org.apache.mina.core.session.IoSession, java.lang.Object) @bci=51, line=752 (Inte
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FTPSERVER-219) The STOR command hangs thread in
passive mode
Posted by "Mikael Svahn (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FTPSERVER-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646546#action_12646546 ]
Mikael Svahn commented on FTPSERVER-219:
----------------------------------------
Yes, I hope this patch will solve the problem. I'm currently running some tests to verify it.
Here is the patch:
Index: src/main/java/org/apache/ftpserver/impl/IODataConnectionFactory.java
===================================================================
--- src/main/java/org/apache/ftpserver/impl/IODataConnectionFactory.java (revision 712407)
+++ src/main/java/org/apache/ftpserver/impl/IODataConnectionFactory.java (working copy)
@@ -311,6 +311,7 @@
} else {
LOG.debug("Opening passive data connection");
dataSoc = servSoc.accept();
+ dataSoc.setSoTimeout(dataConfig.getIdleTime() * 1000);
LOG.debug("Passive data connection opened");
}
} catch (Exception ex) {
> The STOR command hangs thread in passive mode
> ---------------------------------------------
>
> Key: FTPSERVER-219
> URL: https://issues.apache.org/jira/browse/FTPSERVER-219
> Project: FtpServer
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0-M3, 1.0-M4
> Environment: Debian Linux
> Jdk 1.6.0_10
> Reporter: Mikael Svahn
>
> If a client does not disconnect a STOR command correct, for instance due to bad transmission the reader thread might hang. I think there must be a timeout on socket read.
> - java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) @bci=0 (Interpreted frame)
> - java.net.SocketInputStream.read(byte[], int, int) @bci=84, line=129 (Interpreted frame)
> - java.io.BufferedInputStream.fill() @bci=175, line=218 (Compiled frame)
> - java.io.BufferedInputStream.read1(byte[], int, int) @bci=44, line=258 (Compiled frame)
> - java.io.BufferedInputStream.read(byte[], int, int) @bci=49, line=317 (Interpreted frame)
> - java.io.FilterInputStream.read(byte[]) @bci=5, line=90 (Interpreted frame)
> - org.apache.ftpserver.impl.IODataConnection.transfer(org.apache.ftpserver.ftplet.FtpSession, boolean, java.io.InputStream, java.io.OutputStream, int) @bci=133, line=236 (Interpreted frame)
> - org.apache.ftpserver.impl.IODataConnection.transferFromClient(org.apache.ftpserver.ftplet.FtpSession, java.io.OutputStream) @bci=51, line=129 (Interpreted frame)
> - org.apache.ftpserver.command.impl.STOR.execute(org.apache.ftpserver.impl.FtpIoSession, org.apache.ftpserver.impl.FtpServerContext, org.apache.ftpserver.ftplet.FtpRequest) @bci=344, line=147 (Interpreted frame)
> - org.apache.ftpserver.impl.DefaultFtpHandler.messageReceived(org.apache.ftpserver.impl.FtpIoSession, org.apache.ftpserver.ftplet.FtpRequest) @bci=160, line=135 (Interpreted frame)
> - org.apache.ftpserver.listener.nio.FtpHandlerAdapter.messageReceived(org.apache.mina.core.session.IoSession, java.lang.Object) @bci=33, line=62 (Interpreted frame)
> - org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(org.apache.mina.core.filterchain.IoFilter$NextFilter, org.apache.mina.core.session.IoSession, java.lang.Object) @bci=51, line=752 (Inte
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FTPSERVER-219) The STOR command hangs thread in
passive mode
Posted by "David Latorre (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FTPSERVER-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646531#action_12646531 ]
David Latorre commented on FTPSERVER-219:
-----------------------------------------
I don't have the code here but it should be easy - just use setSoTimeout , right ? a patch will be welcome if you have already fixed this!
> The STOR command hangs thread in passive mode
> ---------------------------------------------
>
> Key: FTPSERVER-219
> URL: https://issues.apache.org/jira/browse/FTPSERVER-219
> Project: FtpServer
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0-M3, 1.0-M4
> Environment: Debian Linux
> Jdk 1.6.0_10
> Reporter: Mikael Svahn
>
> If a client does not disconnect a STOR command correct, for instance due to bad transmission the reader thread might hang. I think there must be a timeout on socket read.
> - java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) @bci=0 (Interpreted frame)
> - java.net.SocketInputStream.read(byte[], int, int) @bci=84, line=129 (Interpreted frame)
> - java.io.BufferedInputStream.fill() @bci=175, line=218 (Compiled frame)
> - java.io.BufferedInputStream.read1(byte[], int, int) @bci=44, line=258 (Compiled frame)
> - java.io.BufferedInputStream.read(byte[], int, int) @bci=49, line=317 (Interpreted frame)
> - java.io.FilterInputStream.read(byte[]) @bci=5, line=90 (Interpreted frame)
> - org.apache.ftpserver.impl.IODataConnection.transfer(org.apache.ftpserver.ftplet.FtpSession, boolean, java.io.InputStream, java.io.OutputStream, int) @bci=133, line=236 (Interpreted frame)
> - org.apache.ftpserver.impl.IODataConnection.transferFromClient(org.apache.ftpserver.ftplet.FtpSession, java.io.OutputStream) @bci=51, line=129 (Interpreted frame)
> - org.apache.ftpserver.command.impl.STOR.execute(org.apache.ftpserver.impl.FtpIoSession, org.apache.ftpserver.impl.FtpServerContext, org.apache.ftpserver.ftplet.FtpRequest) @bci=344, line=147 (Interpreted frame)
> - org.apache.ftpserver.impl.DefaultFtpHandler.messageReceived(org.apache.ftpserver.impl.FtpIoSession, org.apache.ftpserver.ftplet.FtpRequest) @bci=160, line=135 (Interpreted frame)
> - org.apache.ftpserver.listener.nio.FtpHandlerAdapter.messageReceived(org.apache.mina.core.session.IoSession, java.lang.Object) @bci=33, line=62 (Interpreted frame)
> - org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(org.apache.mina.core.filterchain.IoFilter$NextFilter, org.apache.mina.core.session.IoSession, java.lang.Object) @bci=51, line=752 (Inte
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (FTPSERVER-219) The STOR command hangs thread in
passive mode
Posted by "Niklas Gustavsson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FTPSERVER-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niklas Gustavsson closed FTPSERVER-219.
---------------------------------------
Resolution: Fixed
Fix Version/s: 1.0-M4
Assignee: David Latorre
Closed, David you know got access to close issues yourself.
> The STOR command hangs thread in passive mode
> ---------------------------------------------
>
> Key: FTPSERVER-219
> URL: https://issues.apache.org/jira/browse/FTPSERVER-219
> Project: FtpServer
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0-M3, 1.0-M4
> Environment: Debian Linux
> Jdk 1.6.0_10
> Reporter: Mikael Svahn
> Assignee: David Latorre
> Fix For: 1.0-M4
>
>
> If a client does not disconnect a STOR command correct, for instance due to bad transmission the reader thread might hang. I think there must be a timeout on socket read.
> - java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) @bci=0 (Interpreted frame)
> - java.net.SocketInputStream.read(byte[], int, int) @bci=84, line=129 (Interpreted frame)
> - java.io.BufferedInputStream.fill() @bci=175, line=218 (Compiled frame)
> - java.io.BufferedInputStream.read1(byte[], int, int) @bci=44, line=258 (Compiled frame)
> - java.io.BufferedInputStream.read(byte[], int, int) @bci=49, line=317 (Interpreted frame)
> - java.io.FilterInputStream.read(byte[]) @bci=5, line=90 (Interpreted frame)
> - org.apache.ftpserver.impl.IODataConnection.transfer(org.apache.ftpserver.ftplet.FtpSession, boolean, java.io.InputStream, java.io.OutputStream, int) @bci=133, line=236 (Interpreted frame)
> - org.apache.ftpserver.impl.IODataConnection.transferFromClient(org.apache.ftpserver.ftplet.FtpSession, java.io.OutputStream) @bci=51, line=129 (Interpreted frame)
> - org.apache.ftpserver.command.impl.STOR.execute(org.apache.ftpserver.impl.FtpIoSession, org.apache.ftpserver.impl.FtpServerContext, org.apache.ftpserver.ftplet.FtpRequest) @bci=344, line=147 (Interpreted frame)
> - org.apache.ftpserver.impl.DefaultFtpHandler.messageReceived(org.apache.ftpserver.impl.FtpIoSession, org.apache.ftpserver.ftplet.FtpRequest) @bci=160, line=135 (Interpreted frame)
> - org.apache.ftpserver.listener.nio.FtpHandlerAdapter.messageReceived(org.apache.mina.core.session.IoSession, java.lang.Object) @bci=33, line=62 (Interpreted frame)
> - org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(org.apache.mina.core.filterchain.IoFilter$NextFilter, org.apache.mina.core.session.IoSession, java.lang.Object) @bci=51, line=752 (Inte
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.