[erlang-bugs] ssh2_msg_channel_failure

Attila Rajmund Nohl <>
Tue Apr 24 12:27:02 CEST 2012


Hello!

Am I correct that this patch is not in R15B01?

2012/4/24 Ingela Anderton Andin <>:
> Hi!
>
> This might be a symptom of the "close race-condition"-bug  reported by
> Daniel. The patch for that bug is
>
> diff --git a/lib/ssh/src/ssh_channel.erl b/lib/ssh/src/ssh_channel.erl
> index 7b600ed..1938858 100644
> --- a/lib/ssh/src/ssh_channel.erl
> +++ b/lib/ssh/src/ssh_channel.erl
> @@ -1,7 +1,7 @@
> %%
> %% %CopyrightBegin%
> %%
> -%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
> +%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
> %%
> %% The contents of this file are subject to the Erlang Public License,
> %% Version 1.1, (the "License"); you may not use this file except in
> @@ -215,7 +215,7 @@ handle_info({ssh_cm, ConnectionManager, {closed,
> ChannelId}},
>                  close_sent = false} = State) ->
>    %% To be on the safe side, i.e. the manager has already been terminated.
>    (catch ssh_connection:close(ConnectionManager, ChannelId)),
> -    {stop, normal, State};
> +    {stop, normal, State#state{close_sent = true}};
>
> handle_info({ssh_cm, _, _} = Msg, #state{cm = ConnectionManager,
>                       channel_cb = Module,
> diff --git a/lib/ssh/src/ssh_connection_manager.erl
> b/lib/ssh/src/ssh_connection_manager.erl
> index e993f59..8c1f88e 100644
> --- a/lib/ssh/src/ssh_connection_manager.erl
> +++ b/lib/ssh/src/ssh_connection_manager.erl
> @@ -384,9 +384,10 @@ handle_call({close, ChannelId}, _,
>           #state{connection = Pid, connection_state =
>                  #connection{channel_cache = Cache}} = State) ->
>    case ssh_channel:cache_lookup(Cache, ChannelId) of
> -       #channel{remote_id = Id} ->
> +       #channel{remote_id = Id} = Channel ->
>           send_msg({connection_reply, Pid,
>                     ssh_connection:channel_close_msg(Id)}),
> +           ssh_channel:cache_update(Cache, Channel#channel{sent_close =
> true}),
>           {reply, ok, State};
>       undefined ->
>           {reply, ok, State}
>
>
> Regards Ingela Erlang/OTP  team - Ericsson AB
>
> Daniel Goertzen wrote:
>>
>> Under Putty Session->Logging can you turn on "SSH Packets" and post the
>> log showing the error?
>>
>> Dan.
>>
>> On Sun, Apr 22, 2012 at 3:58 AM, Fyodor Ustinov <
>> <mailto:>> wrote:
>>
>>    Hi!
>>
>>    Windows ssh client PuTTY show message  "Disconnected: Received
>>    SSH2_MSG_CHANNEL_FAILURE for nonexistent channel 0" while working
>>    with erlang ssh daemon.
>>
>>    Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:8:8]
>>    [async-threads:0] [kernel-poll:false]
>>
>>    WBR,
>>       Fyodor.
>>
>>    _______________________________________________
>>    erlang-bugs mailing list
>>     <mailto:>
>>    http://erlang.org/mailman/listinfo/erlang-bugs
>>
>>
>>
>>
>> --
>> *Daniel Goertzen | Senior Software Engineer*
>> Office: 828.610.4596 | Fax: 828.322.5294 |
>>  <mailto:>
>> *Network Integrity Systems | We Bring Security To Light™*
>>
>>
>> 1937 Tate Blvd. SE
>>
>> Hickory, North Carolina, USA 28602
>>
>> /Network Integrity Systems’ INTERCEPTOR™ Optical Network Security System
>> is a Smart-PDS™ that ensures superior protection and cost effectiveness of
>> classified networks.  For more information, visit our website
>> at:www.networkintegritysystems.com
>> <http://www.networkintegritysystems.com/>./
>>
>>
>>
>> __________________________________________
>> INTERCEPTOR™ Optical Network Security System is made in the USA for the
>> USA. Although not an export controlled item, because of the role it plays in
>> the assurance of the safety and integrity of National Security Information,
>> Network Integrity Systems (NIS) is committed to compliance with the U.S.
>> Export Administration Act. Accordingly, NIS will not ship INTERCEPTOR
>> products to certain foreign government end users without U.S. government
>> approval and will refuse transactions with individuals or entities that have
>> been denied export privileges.
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> _______________________________________________
>> erlang-bugs mailing list
>> 
>> http://erlang.org/mailman/listinfo/erlang-bugs
>>
>
>
> _______________________________________________
> erlang-bugs mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-bugs


More information about the erlang-bugs mailing list