<div dir="ltr"><div><div>Hi!<br><br></div>If you apply the following patch to 17.3 it might help. The SNI-contribution that we included in this release had missed the detail, that the server may optionally send a<br></div>SNI-extension that must be empty. <br><div><div><div><br>diff --git a/lib/ssl/src/ssl_handshake.<div class="gmail_extra">erl b/lib/ssl/src/ssl_handshake.erl<br>index 22673e4..eee33ef 100644<br>--- a/lib/ssl/src/ssl_handshake.erl<br>+++ b/lib/ssl/src/ssl_handshake.erl<br>@@ -1732,6 +1732,9 @@ dec_hello_extensions(<<?UINT16(?EC_POINT_FORMATS_EXT), ?UINT16(Len),<br> #ec_point_formats{ec_point_format_list =<br> ECPointFormats}});<br> <br>+dec_hello_extensions(<<?UINT16(?SNI_EXT), ?UINT16(Len), Rest/binary>>, Acc) when Len == 0 -> <br>+ dec_hello_extensions(Rest, Acc#hello_extensions{sni = ""}); %% Server may send an empy SNI<br>+<br> dec_hello_extensions(<<?UINT16(?SNI_EXT), ?UINT16(Len),<br> ExtData:Len/binary, Rest/binary>>, Acc) -><br> <<?UINT16(_), NameList/binary>> = ExtData,<br></div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-09-30 16:10 GMT+02:00 a a <span dir="ltr"><<a href="mailto:tauceti100@gmail.com" target="_blank">tauceti100@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<br><br>I use Erlang 17.3 downloaded from<br><a href="https://www.erlang-solutions.com/downloads/download-erlang-otp" target="_blank">https://www.erlang-solutions.com/downloads/download-erlang-otp</a><br><br>When I am trying to stop the ssl_hello_world example from cowboy I have encountered a strange behaviour.<br><br>$ git clone <a href="https://github.com/ninenines/cowboy" target="_blank">https://github.com/ninenines/cowboy</a><br>$ cd cowboy<br>$ git checkout 1.0.0<br>$ cd examples/ssl_hello_world<br>$ make<br>$ ./_rel/ssl_hello_world_example/bin/ssl_hello_world_example console<br><br>Erlang/OTP 17 [erts-6.2] [source-5c974be] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]<br><br>Eshell V6.2 (abort with ^G)<br>(<a href="mailto:ssl_hello_world_example@127.0.0.1" target="_blank">ssl_hello_world_example@127.0.0.1</a>)1> application:which_applications().<br>[{ssl_hello_world,"Cowboy Hello World example with SSL.",<br> "1"},<br> {ssl,"Erlang/OTP SSL application","5.3.6"},<br> {cowboy,"Small, fast, modular HTTP server.","1.0.0"},<br> {cowlib,"Support library for manipulating Web protocols.",<br> "1.0.0"},<br> {public_key,"Public key infrastructure","0.22.1"},<br> {crypto,"CRYPTO","3.4.1"},<br> {ranch,"Socket acceptor pool for TCP protocols.","1.0.0"},<br> {asn1,"The Erlang ASN1 compiler version 3.0.2","3.0.2"},<br> {stdlib,"ERTS CXC 138 10","2.2"},<br> {kernel,"ERTS CXC 138 10","3.0.3"}]<br>(<a href="mailto:ssl_hello_world_example@127.0.0.1" target="_blank">ssl_hello_world_example@127.0.0.1</a>)2> init:stop().<br>ok<br>(<a href="mailto:ssl_hello_world_example@127.0.0.1" target="_blank">ssl_hello_world_example@127.0.0.1</a>)3><br>=ERROR REPORT==== 29-Sep-2014::16:49:15 ===<br>Error in process <0.69.0> on node '<a href="mailto:ssl_hello_world_example@127.0.0.1" target="_blank">ssl_hello_world_example@127.0.0.1</a>' with exit value: {{case_clause,{error,closed}},[{ranch_acceptor,loop,3,[{file,"src/ranch_acceptor.erl"},{line,28}]}]}<br>...<br>=ERROR REPORT==== 29-Sep-2014::16:49:15 ===<br>Error in process <0.164.0> on node '<a href="mailto:ssl_hello_world_example@127.0.0.1" target="_blank">ssl_hello_world_example@127.0.0.1</a>' with exit value: {{case_clause,{error,closed}},[{ranch_acceptor,loop,3,[{file,"src/ranch_acceptor.erl"},{line,28}]}]}<br><br>The listener socket has been closed.<br>It seems the node is still running, but:<br><br>(<a href="mailto:ssl_hello_world_example@127.0.0.1" target="_blank">ssl_hello_world_example@127.0.0.1</a>)3> application:which_applications().<br>** exception exit: {timeout,{gen_server,call,<br> [application_controller,which_applications]}}<br> in function gen_server:call/2 (gen_server.erl, line 182)<br><br>If I change this line<br><a href="https://github.com/ninenines/ranch/blob/1.0.0/src/ranch_acceptor.erl#L40" target="_blank">https://github.com/ninenines/ranch/blob/1.0.0/src/ranch_acceptor.erl#L40</a><br>to<br> {error, _Reason} -> ok<br>the acceptor processes do not crash after calling init:stop/0, and the node shuts down correctly.<br><br>This behavour appears only in Erlang 17.3 (I have tried it in Debian 7.6, Ubuntu 12.04.5, OS X 10.9.5). In Erlang R16B03 everything seems to work correctly.<br><br>What else can I do to reveal the cause of this issue?<br></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>