[ejabberd] order of packets in http-bind module

Pablo Platt pablo.platt at yahoo.com
Tue Aug 19 00:54:11 MSD 2008


After I verified that this issue was fixed in openfire:
http://www.igniterealtime.org/issues/browse/JM-1412

I submitted a bug report:
https://support.process-one.net/browse/EJAB-724



----- Original Message ----
From: Pablo Platt <pablo.platt at yahoo.com>
To: ejabberd at jabber.ru
Sent: Monday, August 18, 2008 8:21:19 PM
Subject: [ejabberd] order of packets in http-bind module


Hello,

When ejabberd is busy and a client sends packets fast they might arrive in the wrong order.
When using BOSH, usually only two packets can be sent by the client simultaneously.

According to the BOSH specs, the server should allow out of order packets and should respond in the rid order.

I've performed a simple test and sent message with rid:
rid = 100
rid = 102
rid = 101

Ejabberd immediately ended the session when it received the rid=101 packet and the error in the log is:
=ERROR REPORT==== 2008-08-18 13:04:15 ===
** State machine <0.14284.0> terminating 
** Last message in was  {'$gen_sync_all_state_event',
                           {<0.14287.0>,#Ref<0.0.0.95112>},
                           {http_put,110,
                               [{"xmlns",
                                  "http://jabber.org/protocol/httpbind"},
                                {"rid","110"},
                                {"sid",
                                 "f9c3b1a43c4a450ea1b7fd82c159f924cc53ff88"}],
                                [[60,"presence",
                                 [[32,"xmlns",61,39,"jabber:client",39]],
                                 62,
                                 [[60,"show",[],62,["dnd"],60,47,"show",62],
                                   [60,"status",[],62,
                                   ["dnd"],
                                   60,47,"status",62]],
                                 60,47,"presence",62]],
                               1,[]}}
** When State == loop
**      Data  ==  {state,"f9c3b1a43c4a450ea1b7fd82c159f924cc53ff88",111,[],[],
                        [],
                        {<0.14285.0>,ok},
                        <0.14285.0>,1219079047990189,
                        {<0.14282.0>,#Ref<0.0.0.95107>},
                         #Ref<0.0.0.95108>,1219079047990189,undefined,0,
                        [{hbr,111,[],[],[]}]}
** Reason for termination = 
** {{badmatch,[]},
    [{ejabberd_http_bind,handle_sync_event,4},
     {gen_fsm,handle_msg,7},
     {proc_lib,init_p,5}]}

Ejabberd should delay the processing of rid=102 until it receive the rid=101 packet.

Should I submit a bug report on this?

>From the specs:
When a client makes simultaneous requests, the connection manager might receive them out of order. The connection manager MUST forward the stanzas to the server and respond to the client requests in the order specified by the 'rid' attributes. The client MUST process responses received from the connection manager in the order the requests were  made.

Thanks


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20080818/8e042024/attachment.htm>


More information about the ejabberd mailing list