<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div dir="ltr" id="yui_3_16_0_1_1426407702398_2774">Thank you Jesper,</div><div dir="ltr" id="yui_3_16_0_1_1426407702398_2950">the message is sent inside my node to a very busy process. </div><div dir="ltr" id="yui_3_16_0_1_1426407702398_5130">Does it mean that the busy process has a "full buffer"?</div><div dir="ltr" id="yui_3_16_0_1_1426407702398_5131">How do you guard from such a thing on a regular gen_server?</div><div dir="ltr" id="yui_3_16_0_1_1426407702398_5129">The message queue was flushed out once I sent (from shell) a bang to a completely different process.</div><div dir="ltr" id="yui_3_16_0_1_1426407702398_5132">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.</div><div dir="ltr" id="yui_3_16_0_1_1426407702398_5128">Is it plausable?</div> <br><div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"> <font size="2" face="Arial"> On Thursday, March 12, 2015 8:49 PM, Jesper Louis Andersen <jesper.louis.andersen@gmail.com> wrote:<br> </font> </div> <br><br> <div class="y_msg_container"><div id="yiv0442973403"><div><div dir="ltr">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.<div><br clear="none"></div><div>Processes might get suspended on a send for two reasons:</div><div><br clear="none"></div><div>* 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.</div><div>* 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.</div><div><br clear="none"></div></div><div class="yiv0442973403gmail_extra"><br clear="none"><div class="yiv0442973403gmail_quote">On Thu, Mar 12, 2015 at 10:52 AM, Dror Mein <span dir="ltr"><<a href="mailto:drormein@yahoo.com" shape="rect" rel="nofollow" target="_blank" ymailto="mailto:drormein@yahoo.com">drormein@yahoo.com</a>></span> wrote:<br clear="none"><blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" class="yiv0442973403gmail_quote"><div id="yiv0442973403yqt65551" class="yiv0442973403yqt9873248079"><div><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"><div dir="ltr">hi all,</div><div dir="ltr">I have a gen_server process who is suspended. it's stack trace has him currently trying to send a message with a bang. </div><div dir="ltr">my first question is why? why a process gets suspended? current function: erlang:bif_return_trap/1</div><div dir="ltr">the destination process is ok.</div><div dir="ltr">second question: how do you guard from a situation like this?</div><div dir="ltr"><br clear="none"></div><div dir="ltr">Thanks,</div><div dir="ltr">Dror</div></div></div></div><br clear="none">_______________________________________________<br clear="none">
erlang-questions mailing list<br clear="none">
<a href="mailto:erlang-questions@erlang.org" shape="rect" rel="nofollow" target="_blank" ymailto="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br clear="none">
<a href="http://erlang.org/mailman/listinfo/erlang-questions" shape="rect" rel="nofollow" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"><br clear="all"><div><br clear="none"></div>-- <br clear="none"><div class="yiv0442973403gmail_signature">J.</div>
</div></div></div><br><br></div> </div> </div> </div></div></body></html>