[erlang-questions] process suspended on bif_return_trap/1
Sun Mar 15 09:58:51 CET 2015
Thank you Jesper,the message is sent inside my node to a very busy process. Does it mean that the busy process has a "full buffer"?How do you guard from such a thing on a regular gen_server?The message queue was flushed out once I sent (from shell) a bang to a completely different process.That got me thinking that perhaps the problem was somehow caused by the fact that I had dbg:trace on the sending process, plus was running with observer on the node.Is it plausable?
On Thursday, March 12, 2015 8:49 PM, Jesper Louis Andersen <jesper.louis.andersen@REDACTED> wrote:
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/1the destination process is ok.second question: how do you guard from a situation like this?
erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions