[erlang-bugs] ssl:setopts hangs indefinitely

Michael Gebetsroither <>
Wed Oct 3 15:11:42 CEST 2012

On 2012-10-01 14:38, Ingela Anderton Andin wrote:

>> 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.
> We think that the problem might be that a fsm-process hangs in an ongoing gen_tcp:send, when the network connection is
> lost, and waiting for the tcp timeout (which is long) and hence the following setopts-call will hang as the fsm-process
> is busy waiting for the tcp timeout. If this is the case setting the tcp-option send_timeout in ssl:connet/accept should
> help your cause and the timeout will be in the logical place! It would be good if you can test our theory.

Thx for your thoughts about the problem!

I'll add logging and see if the processes still get killed by our manual ssl:setopts timeout or
if the tcp connection of ssl is teared down by the timeout.

Michael Gebetsroither

More information about the erlang-bugs mailing list