[erlang-questions] The node (with release using ssl) does not shut down after calling init:stop/0 in Erlang 17.3
a a
tauceti100@REDACTED
Tue Sep 30 16:10:38 CEST 2014
Hello,
I use Erlang 17.3 downloaded from
https://www.erlang-solutions.com/downloads/download-erlang-otp
When I am trying to stop the ssl_hello_world example from cowboy I have
encountered a strange behaviour.
$ git clone https://github.com/ninenines/cowboy
$ cd cowboy
$ git checkout 1.0.0
$ cd examples/ssl_hello_world
$ make
$ ./_rel/ssl_hello_world_example/bin/ssl_hello_world_example console
Erlang/OTP 17 [erts-6.2] [source-5c974be] [64-bit] [smp:4:4]
[async-threads:10] [hipe] [kernel-poll:false]
Eshell V6.2 (abort with ^G)
(ssl_hello_world_example@REDACTED)1> application:which_applications().
[{ssl_hello_world,"Cowboy Hello World example with SSL.",
"1"},
{ssl,"Erlang/OTP SSL application","5.3.6"},
{cowboy,"Small, fast, modular HTTP server.","1.0.0"},
{cowlib,"Support library for manipulating Web protocols.",
"1.0.0"},
{public_key,"Public key infrastructure","0.22.1"},
{crypto,"CRYPTO","3.4.1"},
{ranch,"Socket acceptor pool for TCP protocols.","1.0.0"},
{asn1,"The Erlang ASN1 compiler version 3.0.2","3.0.2"},
{stdlib,"ERTS CXC 138 10","2.2"},
{kernel,"ERTS CXC 138 10","3.0.3"}]
(ssl_hello_world_example@REDACTED)2> init:stop().
ok
(ssl_hello_world_example@REDACTED)3>
=ERROR REPORT==== 29-Sep-2014::16:49:15 ===
Error in process <0.69.0> on node 'ssl_hello_world_example@REDACTED' with
exit value:
{{case_clause,{error,closed}},[{ranch_acceptor,loop,3,[{file,"src/ranch_acceptor.erl"},{line,28}]}]}
...
=ERROR REPORT==== 29-Sep-2014::16:49:15 ===
Error in process <0.164.0> on node 'ssl_hello_world_example@REDACTED' with
exit value:
{{case_clause,{error,closed}},[{ranch_acceptor,loop,3,[{file,"src/ranch_acceptor.erl"},{line,28}]}]}
The listener socket has been closed.
It seems the node is still running, but:
(ssl_hello_world_example@REDACTED)3> application:which_applications().
** exception exit: {timeout,{gen_server,call,
[application_controller,which_applications]}}
in function gen_server:call/2 (gen_server.erl, line 182)
If I change this line
https://github.com/ninenines/ranch/blob/1.0.0/src/ranch_acceptor.erl#L40
to
{error, _Reason} -> ok
the acceptor processes do not crash after calling init:stop/0, and the node
shuts down correctly.
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.
What else can I do to reveal the cause of this issue?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140930/7b318d1d/attachment.htm>
More information about the erlang-questions
mailing list