[erlang-bugs] ssl:setopts hangs indefinitely

Ingela Anderton Andin <>
Fri Sep 28 11:00:01 CEST 2012


Hello!

Hi maybe you could use observer application to investigate your 
scenario, it would be interesting to know what the ssl gen_fsm-process 
is doing as it is not answering the setopts-request. Use observer to 
find the pid and do erlang:process_info(Pid, [current_stacktrace]).

Michael Gebetsroither wrote:
> Hello,
> 
> We have a lot of gen_server processes locked up here and we suspect ssl:setopts is the cause.
> The erlang vm version used is R15B01 from debian, and i'm currently testing R15B02 packages from esl.
> (confirmed, R15B02 from esl also has this problem)
> 
> The gen_server hang can be reproduced if we connect from a remote host over ssl to the server and remove the network
> plug, during communication. Though we couldn't reproduce the error with a local client.
> The hanging gen_server is the server process doing all the communication and housekeeping tasks on the socket.
> 
> After applying our fix all locked up gen_server processes are gone, because they now terminate on the 2 seconds timeout
> wrapped around ssl:setopts.
> 
> IMHO the problematic code part is ssl_connection.erl:242 from R15B02 git tag (thought it seems it is not the root cause,
> only the effect).
> 
> 
> # ssl_connection.erl:242
> set_opts(ConnectionPid, Options) ->
>     sync_send_all_state_event(ConnectionPid, {set_opts, Options}).
> 


If a timeout is actually needed for setopts that could be easily 
accomplished by changing that line to
  Timeout = %% Some reasonable timeout value,
  sync_send_all_state_event(ConnectionPid, {set_opts, Options}, Timeout).
But I am not sure I think that is the right thing to do! We need to 
understand the cause of the problem better.

[...]

Regards Ingela Erlang/OTP team - Ericsson AB



More information about the erlang-bugs mailing list