We're updating the issue view to help you get more done. 

Issue with JabberNet and massive subscription requests from the server

Description

reported at: http://www.igniterealtime.org/community/thread/38876

"...When I add from Example-app user2 to user1's roster, after I click accept in spark (to accept the subscription), Example-app keeps on getting presence subscribe requests from server, and my processor is 100% busy..."

"Looking at the RFC, i think openfire is incorrectly not ignoring the last subscribed message.
http://tools.ietf.org/html/rfc3921#section-7

9. Upon receiving the presence stanza of type "subscribed", the user
SHOULD acknowledge receipt of that subscription state
notification through either "affirming" it by sending a presence
stanza of type "subscribe" to the contact or "denying" it by
sending a presence stanza of type "unsubscribe" to the contact;
this step does not necessarily affect the subscription state (see
Subscription States (Section 9) for details), but instead lets
the user's server know that it MUST no longer send notification
of the subscription state change to the user (see Section 9.4).

When openfire gets this affirmation "subscribe", it starts the subscribe process over again instead of ignoring the response."

"Looking at the code and the rfc http://xmpp.org/rfcs/rfc3921.html#roster

I think the issue is in the PresenceSubscribeHandler line 141 where it auto-delivers a "subscribed" packet if the user is already subscribed to a roster. I don't think it should do this because it will break number 9 in the rfc under roster, where it the client sends out the "subscribe" to an already subscribed contact and the server eats it."

Environment

None

Acceptance Test - Entry

None

Activity

Show:
wroot
September 4, 2009, 12:37 AM

This seems to be not related to Jabber-Net only. I have just compiled the latest Openfire version. And i have logged with JBother (Smack based) and Exodus. After i have added Exodus user in JBother server's console was constatly flooded with subscribe messages and my CPU was always under 50% load (though this will vary on different processors). This didnt change even after i closed JBother.

But i wasnt able to recreate this situation with Spark and JBother. Exodus seems to drive Openfire mad. Every time i launch Exodus my PC speaker starts to beep madly and console is filling with strange unreadable messages.

Ian McEwan
October 6, 2009, 7:03 PM

Referencing http://www.igniterealtime.org/community/thread/39630.

In my opinion,

org.jivesoftware.openfire.handler.PresenceSubscribeHandler line 141should be removed.

//deliverer.deliver(reply)

Kevin Labecot
October 19, 2009, 8:03 PM

We have this issue too. Any planned fix ?

Guus der Kinderen
January 3, 2010, 1:08 AM

The code has now been modified in such a way that no new 'subscribed' is returned on behalf or the recipient of a 'subscribe' stanza, if the roster of the recipient was not changed as a result of the stanza.

Assignee

Guus der Kinderen

Reporter

wroot

Labels

None

Expected Effort

None

Ignite Forum URL

None

Components

Fix versions

Affects versions

Priority

Minor
Configure