[erlang-bugs] ssh2_msg_channel_failure

Fyodor Ustinov ufm@REDACTED
Tue Apr 24 18:22:06 CEST 2012


Hi!

I added this patch - did not help.

http://blog.ufm.su/putty.log - this putty log.

> 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 <ufm@REDACTED 
>> <mailto:ufm@REDACTED>> 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
>>     erlang-bugs@REDACTED <mailto:erlang-bugs@REDACTED>
>>     http://erlang.org/mailman/listinfo/erlang-bugs
>>
>>
>>
>>
>> -- 
>> *Daniel Goertzen | Senior Software Engineer*
>> Office: 828.610.4596 | Fax: 828.322.5294 | 
>> dang@REDACTED 
>> <mailto:dang@REDACTED>
>> *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
>> erlang-bugs@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-bugs
>




More information about the erlang-bugs mailing list