History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: EJAB-474
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Christophe Romain
Reporter: Badlop
Votes: 2
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
ejabberd development

mod_caps: cache also negative responses, so buggy clients are not continually asked

Created: 22/Dec/07 12:42 AM   Updated: 29/Apr/08 07:08 PM
Component/s: Personal Eventing via Pubsub
Affects Version/s: None
Fix Version/s: ejabberd 2.1.0, ejabberd 2.0.1

Time Tracking:
Not Specified

File Attachments: 1. Text File EJAB-474.patch (1 kb)

Issue Links:
Relation
 

Participants: Badlop, Christophe Romain and Jonathan Schleifer
Company: process-one.net (Find related issues)
Labels:
Sequential: 3


 Description  « Hide
When mod_caps receives a response to a iq:query with interesting info, it stores in mnesia [1]. When the answer is an error, for example due to a buggy client, then mod_caps does not cache that response.

This means that a buggy client will be asked continually. The correct behaviour would be no cache also negative responses, so those clients are not asked never again.


[1] see function handle_cast({disco_response...

 All   Comments   Work Log   Change History   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Christophe Romain - 21/Mar/08 05:40 PM

Example of clients that don't support Caps: transports and gmail:

 =ERROR REPORT==== 2008-03-20 13:37:15 ===
E(<0.298.0>:mod_caps:254) : Error IQ reponse IQ from ***@icq.webkeks.org:
[{xmlelement,"query",
             [{"xmlns","http://jabber.org/protocol/disco#info"}],
             []},
 {xmlelement,"error",
             [{"code","405"},{"type","cancel"}],
             [{xmlelement,"not-allowed",
                          [{"xmlns","urn:ietf:params:xml:ns:xmpp-stanzas"}],
                          []}]}]

 =ERROR REPORT==== 2008-03-20 13:38:55 ===
E(<0.298.0>:mod_caps:254) : Error IQ reponse IQ from ***@gmail.com/Talk.v104378E6A20:
[{xmlelement,"query",
             [{"xmlns","http://jabber.org/protocol/disco#info"}],
             []},
 {xmlelement,"error",
             [{"code","501"},{"type","cancel"}],
             [{xmlelement,"feature-not-implemented",
                          [{"xmlns","urn:ietf:params:xml:ns:xmpp-stanzas"}],
                          []}]}]

Jonathan Schleifer - 22/Mar/08 10:20 PM
This bug is really annoying. I still think that sending presences and PEP events should be sent threaded, it won't hurt even on big servers since erlang threads are very lightweight and you can have millions of them without problems.

Jonathan Schleifer - 22/Mar/08 10:21 PM
Oh, forgot to mention that this bug causes a huge delay in sending PEP events. Happens that you have to wait a few minutes until the PEP event is received because for example all ICQ transport contacts are queried again on *every* PEP event.

Christophe Romain - 11/Apr/08 03:21 PM
I have no scenario to test it.
attached is a simple patch. any tester or scenario is welcome

Christophe Romain - 11/Apr/08 03:23 PM
the patch assumes buggy clients to have empty list of features.
i guess is soves the problem, but did not had time to check mod_caps code deeper.

Jonathan Schleifer - 11/Apr/08 03:46 PM
PEP events are less delayed now, but still sometimes laggy when I'm connected to the ICQ Gateway. Before this patch, it sometimes took minutes, while now it are seconds. I guess this fix did the trick, but there's still some other bug to be fixed.

Christophe Romain - 11/Apr/08 04:07 PM
Thanks for testing ! good to ear it helps.
I'm aware PEP needs optimization. this will be performed in coming
weeks on trunk. ejabberd-2.0.x will keep that version anyway.

if you have any details on the environment that generates the delay,
feel free to create a new ticket related to PEP performances. i'll
take your logs into account.


Jonathan Schleifer - 11/Apr/08 04:08 PM
I don't know the exact reason for the delays and I'm still debugging it, I also talked with badlop about it, so you might also want to talk to him. I'll let you know as soon as I know more and create bug reports then.

Christophe Romain - 14/Apr/08 02:03 PM
patch applied, but uncomplete.
we still need to handle case when mod_caps never receives response.

Christophe Romain - 23/Apr/08 12:59 PM
see EJAB-608 for incoming improvements

Christophe Romain - 29/Apr/08 07:07 PM
reopen for changing fix version