Community
Participate
Working Groups
Steps to reproduce: 1) Start uploading a file to the remote host; 2) While upload is still in progress, pull out the ethernet cable or shutdown the corresponding network interface(for instance, "ifconfig eth0 down" on Linux). After that upload hangs(that is expected) and canceling the monitor doesn't help. It seems like the hang occurs in ChannelSftp.checkStatus, and since it doesn't have a monitor as a parameter, it cannot be canceled.
I have not checked the internal of RSE yet, but com.jcraft.jsch.Session#setServerAliveInterval(int interval) has been used?
No, we don't use this API anywhere from what I know.
Another point is that it's not clear that using this API will make cancellation via IProgressMonitor actually work.
(In reply to comment #3) > Another point is that it's not clear that using this API will make cancellation > via IProgressMonitor actually work. By using that API, such network problems will be detected, and SftpFileService#upload will be stopped.
I think we put a hardcoded 5 minute alive interval into RSE a while back: See bug 155026 comment 6
... and we made it use-configurable in bug 218880 . Please check if using the UI (in the connection wizard : properties) helps.
Of course, setting the timeout to 1 second will cause the launch to terminate after 1 second. However, it seems that terminating launch should work regardless of what is the value of the timeout is.
I would like to note that https://bugs.eclipse.org/bugs/show_bug.cgi?id=363076 is a related (most-likely duplicate) bug. Timeouts seem to have no effect whatsoever. It can hang for upwards of 20 minutes. This is reproduceable easily and becomes a huge issue. The workspace cannot shut down properly.
I believe this bug is solidly important