Have you tried reproducing this using the latest daily build? I just did and am unable to reproduce this issue anymore.
It may have been already fixed in 5.1pre1.

On Sun, Jan 20, 2013 at 9:54 AM, Richard Urwin <soronlin@googlemail.com> wrote:

Hypersearch w/ network VFS leaks SFTP connections - ID: 2873889 says:
> Open a remote file over SFTP (e.g. sftp://server:22/home/user/file.txt).
> Select "Search" -> "Search in directory", enter some text to search for, click
> "Synchronize", check "Hypersearch" and click "Find". Answer "Yes" in the
> warning message box. On the remote machine watch the process list. Every
> time a new search is performed a new sshd process is spawned and stays
> there until jEdit exits. Java heap also grows noticeably, so apparently the
> SFTP connections are not closed (or released to the pool).
> This is also true for saving files after waiting several minutes (eg. 30).
> Then a new SSH connections is created but the old sshd is still running.
> Seen on Debian SSH Server.

I've just fallen foul of the saving files aspect of the above bug. (It isn't 30 minutes; I think it's 1 minute.) If you keep working over sftp you leak connections, which leaves SSHD processes clutering up the remote system. Since my remote system is a Raspberry Pi with only 256MB of RAM, I can crash it this way.

I can, and am, recreating this bug on jEdit 5.0.0, FTP 1.0.2

I have done some googling and some looking at source code. The problem seems to arise when, after 60 seconds of inactivity, a timer closes the SSH connection (see ConnectionManager.java). The underlying TCP stream is not closed (wireshark told me).

I am not a Java programmer, and don't know ssh, so I am pretty much at sea, but it seems to me that SFtpConnection.SFtpConnection() opens both a session and a connection, and SFtpConnection.logout() only closes the connection; the session is left open.

Any chance of a fix?


Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
jEdit Developers' List