[erlang-questions] process suspended on bif_return_trap/1

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Thu Mar 12 19:49:46 CET 2015


The bif_return_trap/1 is a trampoline function used by bifs that suspend in
order to graft them onto the normal interpreter later on. It's purpose is
to make the BIF look like a normal function.

Processes might get suspended on a send for two reasons:

* The process you are looking for is in another castle (read: on a foreign
node). If the TCP buffer for the distribution protocol is full the process
gets suspend until there is room.
* The port you are sending to is currently busy. What this means depends on
the type of port, but usually this is a full buffer of some kind as well.


On Thu, Mar 12, 2015 at 10:52 AM, Dror Mein <drormein@REDACTED> wrote:

> hi all,
> I have a gen_server process who is suspended. it's stack trace has him
> currently trying to send a message with a bang.
> my first question is why? why a process gets suspended? current function:
> erlang:bif_return_trap/1
> the destination process is ok.
> second question: how do you guard from a situation like this?
>
> Thanks,
> Dror
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>


-- 
J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150312/c9dbce02/attachment.htm>


More information about the erlang-questions mailing list