[erlang-questions] ssh application leaks processes(?)
Attila Rajmund Nohl
attila.r.nohl@REDACTED
Wed Aug 25 23:48:49 CEST 2010
I've patched our local installation about a year ago to use
'permanent'. It works fine.
2010/8/25, Stefan Grundmann <sg2342@REDACTED>:
> Hi,
> while using the ssh-2.0 application i encountered the following problem:
>
> The ssh_system_sup supervisor (created via ssh:daemon/1,2,3) has as
> children
> the ssh_acceptor_sup supervisor and for every connected client an
> ssh_subsystem_sup supervisor. When a client connection is closed one would
> expect that all processes in the supervision tree of this connection die -
> which is not the case: the ssh_subsystem_sup process and one child
> (ssh_channel_sup) stay alive.
>
> The reason for this behavior is that the child specs of the ssh_channel_sup
> and ssh_connection_sup in lib/ssh-2.0/src/ssh_subsystem_sup,erl (line 75 and
> line 88) define a 'transient' Restart and while the subtree supervised by
> ssh_connection_sup as well as the ssh_connection_sup process itself
> terminates
> on connection close, the ssh_channel_sup process does not. Which leaves 2
> processes alive that won't be of any further use.
>
> If the Restart is changed to 'permanent' the problem goes away.
>
> Since lib/ssh-2.0/src/ssh_subsystem_sup,erl contains (line 76 and line 89)
> commented out code that sets Restart to permanent; i would like to know what
> the reason for a transient Restart might be.
>
> best regards
> Stefan Grundmann
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>
>
More information about the erlang-questions
mailing list