[erlang-bugs] Twisty turny gen_server hang

Emad El-Haraty elharaty@REDACTED
Fri Jul 27 23:46:08 CEST 2007


On 7/27/07, Matthew Dempsky <matthew@REDACTED> wrote:
> Here's a simpler test case:
>
>     -module(bloop2).
>     -compile(export_all).
>
>     start() ->
>         gen_server:start(?MODULE, [], []).
>
>     init([]) ->
>         exit(self(), burlap).
>


The simplest reproduction of this hanging problem is:
proc_lib:start(erlang, exit, [die]).

proc_lib is expecting to receive either an ack or 'EXIT' but since the
process is not linked to anything, it will never receive the 'EXIT'.

Setting up proc_lib to use a monitor of some sort should allow
proc_lib to catch DOWN which would then produce the appropriate
behavior.



More information about the erlang-bugs mailing list