R13B-1 hanging processes in ssh

Jonas Boberg jonas.boberg@REDACTED
Tue Aug 4 16:05:25 CEST 2009


Hi,

On Erlang R13B-1 (erts-5.7.2) the ssh application leaves two processes and one socket hanging when opening and closing a connection.

How to reproduce:
------------------------
-module(ssh_test).

-export([test/0]).

test() ->
    application:start(crypto),
    application:start(ssh),
    Host = "127.0.0.1",
    Port = 22,
    User = "username-here",
    Password = "password-here",
    {ok, C} =  ssh:connect(Host, Port, [{user, User},
                                        {password, Password},
                                        {silently_accept_hosts, true}]),
    ssh:close(C).
------------------------

> ssh_test:test()
ok
> {length(erlang:processes()), length(erlang:ports())}.
{47, 22}
> ssh_test:test().
ok
> {length(erlang:processes()), length(erlang:ports())}.
{49,23}

I've also confirmed this by looking at the process tree
with the appmon application.
Two processes under the sshc_sup supervisor are left behind.

In our application, eventually thousands of processes and ports are left open after running for a few hours.

Regards
Jonas


More information about the erlang-bugs mailing list