Hi,
+-From: Pan Li <[email protected]> ------
|_Date: Thu, 11 Jun 2009 12:55:30 +0800 __
|
I'm interested in this problem.
|2 infinite loop in Session.java
|Under very rare condition, Session.java can be stuck in a infinite loop.
|I believe it is caused by a possible bug in Session.java.
|We had to copy timeout checking code from other JSCH class.
...
|--- com/jcraft/jsch/Session.java (revision 1977)
|+++ com/jcraft/jsch/Session.java (working copy)
|@@ -1142,7 +1142,15 @@
| public void write(Packet packet) throws Exception{
| // System.err.println("in_kex="+in_kex+" "+(packet.buffer.getCommand
|()));
|- while(in_kex){
|+ long timeout = this.getTimeout();
|+ // in_kex can be always true in some case
|+ long start = System.currentTimeMillis();
|+ while(in_kex){
|+ if (
|+ timeout>0L &&
|+ (System.currentTimeMillis()-start)>timeout) {
|+ throw new JSchException("timeout writting to packet");
|+ }
| byte command=packet.buffer.getCommand();
| //System.err.println("command: "+command);
| if(command==SSH_MSG_KEXINIT ||
It seems that it has happed in the rare condition, but is it reproducible?
I guess it has happened in the rekeying. If you enable the logger
like Logger.java[1], messages like
SSH_MSG_KEXINIT sent
SSH_MSG_NEWKEYS sent
will appear before that problem.
It is easy to drop the session in such a case, but the rekeying should be
successfully finished if possible. Are there informations to reproduce
that problem? Which sshd server are you connecting to?
As for other reported problems, I'll resolve them in the next release.
Thank you for your feedback.
Sincerely,
--
Atsuhiko Yamanaka
JCraft,Inc.
1-14-20 HONCHO AOBA-KU,
SENDAI, MIYAGI 980-0014 Japan.
Tel +81-22-723-2150
+1-415-578-3454
Skype callto://jcraft/
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users