threading problem with SSH2SFTPClient
Daire Garvey
dairegarvey@yahoo.co.uk
Tue, 4 Feb 2003 05:59:32 -0800 (PST)
--0-1444483173-1044367172=:15224
Content-Type: text/plain; charset=us-ascii
Thanks very much for that MaF - I have made the patch and recompiled Mindterm however the thread leak behavior is unchanged. :( It still seems to leak a thread per file transfer - both for transmitting a file and for receiving one.
The patch you sent me only seems to modify the transmit behavior of SSH2SFTPClient, however thread leaks occur both when transmitting and receiving. Is that intentional?
I am also getting an intermittent exception (about once for every 10 or so transfers):
java.lang.NullPointerException
at com.mindbright.ssh2.SSH2SFTPClient.sftpReceiveLoop(SSH2SFTPClient.java:753)
at com.mindbright.ssh2.SSH2SFTPClient.access$700(SSH2SFTPClient.java:29)
at com.mindbright.ssh2.SSH2SFTPClient$2.run(SSH2SFTPClient.java:717)
at java.lang.Thread.run(Thread.java:536)
I do not think these exceptions are anything to do with the thread leak - the leak occurs regardless of whether or not this exception happens.
Do you have any suggestions of what other changes to SSH2SFTPClient are necessary to fix the thread leak? Perhaps there is another class that requires patching? The source code I am using is version 2.3.1.
Also any ideas what the cause of the above exception may be? In truth I can live with that exception happening, it does not happen very often. I do however need the thread leak solved somehow. :)
Thanks for your help!
Best regards,
Daire Garvey.
> maf@appgate.com wrote:
> Yes, SSH2SFTPClient leaks a thread for each connection. The attached
> patch should fix it.
>
> /MaF
> --
> Martin Forssen Development Manager
> Phone: +46 31 7744361 AppGate Network Security ABIndex:
---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
--0-1444483173-1044367172=:15224
Content-Type: text/html; charset=us-ascii
<P>Thanks very much for that MaF - I have made the patch and recompiled Mindterm however the thread leak behavior is unchanged. :( It still seems to leak a thread per file transfer - both for transmitting a file and for receiving one.
<P>The patch you sent me only seems to modify the transmit behavior of SSH2SFTPClient, however thread leaks occur both when transmitting and receiving. Is that intentional?</P>
<P>I am also getting an intermittent exception (about once for every 10 or so transfers):
<P>java.lang.NullPointerException<BR> at com.mindbright.ssh2.SSH2SFTPClient.sftpReceiveLoop(SSH2SFTPClient.java:753)<BR> at com.mindbright.ssh2.SSH2SFTPClient.access$700(SSH2SFTPClient.java:29)<BR> at com.mindbright.ssh2.SSH2SFTPClient$2.run(SSH2SFTPClient.java:717)<BR> at java.lang.Thread.run(Thread.java:536)
<P>I do not think these exceptions are anything to do with the thread leak - the leak occurs regardless of whether or not this exception happens.</P>
<P>Do you have any suggestions of what other changes to SSH2SFTPClient are necessary to fix the thread leak? Perhaps there is another class that requires patching? The source code I am using is version 2.3.1. </P>
<P>Also any ideas what the cause of the above exception may be? In truth I can live with that exception happening, it does not happen very often. I do however need the thread leak solved somehow. :)</P>
<P>Thanks for your help!</P>
<P>Best regards,</P>
<P>Daire Garvey.</P>
<P>> <B><I>maf@appgate.com</I></B> wrote:<BR>> Yes, SSH2SFTPClient leaks a thread for each connection. The attached<BR>> patch should fix it.<BR>> <BR>> /MaF<BR>> -- <BR>> Martin Forssen <MAF@APPGATE.COM>Development Manager<BR>> Phone: +46 31 7744361 AppGate Network Security ABIndex: </P><p><br><hr size=1>Do you Yahoo!?<br>
<a href="http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com">Yahoo! Mail Plus</a> - Powerful. Affordable. <a href="http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com">Sign up now</a>
--0-1444483173-1044367172=:15224--