ejabberd - Comments for "BOSH infinite loop followed by an ejabberd crash." https://www.ejabberd.im/node/4407 en I applied the patch on our https://www.ejabberd.im/node/4407#comment-56839 <p>I applied the patch on our dev environments and it's looking really great. Thanks!</p> Tue, 30 Nov 2010 18:54:53 +0000 max kalika comment 56839 at https://www.ejabberd.im max kalika wrote: Would https://www.ejabberd.im/node/4407#comment-56833 <div class="quote-msg"> <div class="quote-author"><em>max kalika</em> wrote:</div> <p>Would anyone here have any ideas on how to track this down further?</p></div> <p>Thanks to you and Aleksey Shchepin, the bug now has a fix, and it's very short, see <noindex><a href="https://support.process-one.net/browse/EJAB-1358" title="https://support.process-one.net/browse/EJAB-1358" rel="nofollow" >https://support.process-one.net/browse/EJAB-1358</a></noindex></p> Fri, 26 Nov 2010 16:20:42 +0000 mfoss comment 56833 at https://www.ejabberd.im In the mean time, do you https://www.ejabberd.im/node/4407#comment-56828 <p>In the mean time, do you think it would be too horrible to make a small module that will track these processes and kill any long-running ones? Is there anything terrible in just doing "exit(Pid, kill)" on these? I.e. will that actually destroy the bosh sessions of valid clients?</p> Tue, 23 Nov 2010 16:59:50 +0000 max kalika comment 56828 at https://www.ejabberd.im Just a quick note: the https://www.ejabberd.im/node/4407#comment-56827 <p>Just a quick note: the infinite loop can be produced by applying this patch to ejabberd 2.1.5, and login with any BOSH client:</p> <pre> --- a/src/web/ejabberd_http_bind.erl +++ b/src/web/ejabberd_http_bind.erl @@ -903,6 +903,7 @@ update_shaper(ShaperState, PayloadSize) -&gt; end. prepare_response(Sess, Rid, OutputEls, StreamStart) -&gt; + ?INFO_MSG("prepare_response called with OutputEls: ~n~p", [OutputEls]), receive after Sess#http_bind.process_delay -&gt; ok end, case catch http_get(Sess, Rid) of {ok, cancel} -&gt; @@ -926,6 +927,7 @@ prepare_response(Sess, Rid, OutputEls, StreamStart) -&gt; %% Send output payloads on establised sessions prepare_outpacket_response(Sess, _Rid, OutPacket, false) -&gt; + ?INFO_MSG("prepare_outpacket_response called with OutPacket: ~n~p", [OutPacket]), case catch send_outpacket(Sess, OutPacket) of {'EXIT', _Reason} -&gt; {200, ?HEADER, @@ -1015,8 +1017,12 @@ prepare_outpacket_response(#http_bind{id=Sid, wait=Wait, http_get(#http_bind{pid = FsmRef, wait = Wait, hold = Hold}, Rid) -&gt; - gen_fsm:sync_send_all_state_event( - FsmRef, {http_get, Rid, Wait, Hold}, 2 * ?MAX_WAIT * 1000). + {ok, [{xmlstreamstart, "stream:stream", + [{"xml:lang","en"}, + {"xmlns","jabber:client"}, + {"xmlns:stream", "http://etherx.jabber.org/streams"}, + {"id","4224552436"}, + {"from", ""}]}]}. send_outpacket(#http_bind{pid = FsmRef}, OutPacket) -&gt; case OutPacket of </pre> Tue, 23 Nov 2010 16:17:39 +0000 mfoss comment 56827 at https://www.ejabberd.im