[erlang-questions] Mystery exit message in ejabberd_odbc

Devdutt Sheth <>
Fri Aug 22 19:03:36 CEST 2014


I realize that, but just by reading my code I am not able to establish where a port is being spawned? I am doing an erlang:ports() call in a tight loop but do not see the PID in question.
Is  there some utility/function that will list all the ports that have been in existence for a specified period of time ( either currently alive or recently exited)?
If not, is there some utility/debugger that would help me with this?

Thanks.

From: Dmitry Kolesnikov <<mailto:>>
Date: Thursday, August 21, 2014 at 10:08 PM
To: Devdutt Sheth <<mailto:>>
Cc: "<mailto:>" <<mailto:>>
Subject: Re: [erlang-questions] Mystery exit message in ejabberd_odbc

If port exit signal is delivered to you process then it is an port owner. Should you be able to trace the place where it is created at given code?

Best Regards,
Dmitry >-|-|-(*>


On 22.8.2014, at 0.53, Devdutt Sheth <<mailto:>> wrote:

I seem to be getting a ton of - {'EXIT',#Port<0.1079543>,normal} ( the pid of course varies) messages in my ejabberd_odbc message queue.
I understand that since we have process_flags(trap_exit, true) EXIT signals from linked processes are turned into messages and placed
In ejabberd_odbc's message queue.
My question is -
How do we determine what exactly is #Port<0.1079543> - doing/executing?
I obviously cannot do a port_info on this PID since it has already exited, nor am I able to see when it is spawned. I have tried to print out all the ports in the vm
via a call to erlang:ports() every second, but I do not see the port that I am receiving the exit message from. This leads me to believe that the port exists for a very brief period ( maybe atomically).
Any clues on how I can track down the source of this exit message?

Thanks.
_______________________________________________
erlang-questions mailing list
<mailto:>
http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140822/b6ce5ab8/attachment.html>


More information about the erlang-questions mailing list