[erlang-questions] How to debug handle_info EXIT message?

Martin Dimitrov <>
Wed Apr 25 14:07:30 CEST 2012


The puzzling thing is that this message appears 1-2 sec after the start
of the gen_server without any further interaction with it. At the end of
Module:init/1 function I try to print information about this process:

process_info(list_to_pid("<0.2637.0>"))

but returns 'undefined'.

On 4/25/2012 11:42 AM, Ladislav Lenart wrote:
> Hello.
>
> The process <0.2637.0> terminated with reason 'normal'. Your gen_server process
> received the 'EXIT' message because:
>  * <0.2637.0> and your gen_server were linked together AND
>  * your gen_server is trapping exits, i.e. it invoked process_flag(trap_exit,
> true) in its init/1.
>
> See also the following documentation:
>  * process_flag/2 - http://www.erlang.org/doc/man/erlang.html#process_flag-2
>  * spawn_link/1 - http://www.erlang.org/doc/man/erlang.html#spawn_link-1
>  * link/1 - http://www.erlang.org/doc/man/erlang.html#link-1
>
>
> HTH,
>
> Ladislav Lenart
>
>
> On 25.4.2012 09:49, Martin Dimitrov wrote:
>> Hello,
>>
>> I receive in a module implementing gen_server behavior in the function
>> handle_info/2 the following message:
>>
>> {'EXIT',<0.2637.0>,normal}
>>
>> What is the reason to receive this message? The process <0.2637.0> was
>> spawned by this gen_server and then died? Is it possible to get more
>> information about this process after it has died since process_info/1
>> returns undefined?
>>
>> Thank you very much for looking at this.
>>
>> Best Regards,
>>
>> Martin
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>




More information about the erlang-questions mailing list