Messages loop infinitely

We are seeing a problem where messages suddenly will start looping: If I’m chatting with user A, I will be receiving all of his messages over and over, at 3-4 seconds interval. If user A types “hello” and then “how are you?” then I will be receiving “hello” and “how are you?” endlessly until he quits.

At the same intervals as the repeats, Openfire will log the following:

2008.02.04 20:09:54 [org.jivesoftware.openfire.handler.IQHandler.process(IQHandler.java:68)] Internal server error
java.lang.IllegalArgumentException: IQ must be of type 'set' or 'get'. Original IQ: <iq type="result" id="112-29" to="XXXXX" from="XXXXX"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="client" type="pc" name="pidgin"></identity><feature var="jabber:iq:last"></feature><feature var="jabber:iq:oob"></feature><feature var="jabber:iq:time"></feature><feature var="xmpp:urn:time"></feature><feature var="jabber:iq:version"></feature><feature var="jabber:x:conference"></feature><feature var="http://jabber.org/protocol/bytestreams"></feature><feature var="http://jabber.org/protocol/disco#info"></feature><feature var="http://jabber.org/protocol/disco#items"></feature><feature var="http://jabber.org/protocol/muc"></feature><feature var="http://jabber.org/protocol/muc#user"></feature><feature var="http://jabber.org/protocol/si"></feature><feature var="http://jabber.org/protocol/si/profile/file-transfer"></feature><feature var="http://jabber.org/protocol/xhtml-im"></feature><feature var="urn:xmpp:ping"></feature><feature var="http://www.xmpp.org/extensions/xep-0199.html#ns"></feature><feature var="http://jabber.org/protocol/mood"></feature><feature var="http://jabber.org/protocol/mood+notify"></feature><feature var="http://jabber.org/protocol/nick"></feature><feature var="http://jabber.org/protocol/nick+notify"></feature><feature var="http://jabber.org/protocol/tune"></feature><feature var="http://jabber.org/protocol/tune+notify"></feature><feature var="http://www.xmpp.org/extensions/xep-0084.html#ns-metadata"></feature><feature var="http://www.xmpp.org/extensions/xep-0084.html#ns-data"></feature><feature var="http://www.xmpp.org/extensions/xep-0224.html#ns"></feature><feature var="http://www.xmpp.org/extensions/xep-0084.html#ns-metadata+notify"></feature><feature var="http://jabber.org/protocol/commands"></feature></query></iq>
     at org.xmpp.packet.IQ.createResultIQ(IQ.java:355)
     at org.jivesoftware.openfire.disco.IQDiscoInfoHandler.handleIQ(IQDiscoInfoHandler.java:99)
     at org.jivesoftware.openfire.handler.IQHandler.process(IQHandler.java:48)
     at org.jivesoftware.openfire.IQRouter.handle(IQRouter.java:348)
     at org.jivesoftware.openfire.IQRouter.route(IQRouter.java:100)
     at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:67)
     at org.jivesoftware.openfire.net.StanzaHandler.processIQ(StanzaHandler.java:303)
     at org.jivesoftware.openfire.net.ClientStanzaHandler.processIQ(ClientStanzaHandler.java:78)
     at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:268)
     at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:167)
     at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:132)
     at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:570)
     at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
     at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
     at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
     at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimpleProtocolDecoderOutput.java:58)
     at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:173)
     at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
     at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
     at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
     at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:239)
     at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:283)
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
     at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
     at java.lang.Thread.run(Thread.java:619)

It seems to only occur with Adium, so it may be a client problem. I’m working on getting a sniffer in place to get a dump of the XML stream.

This is Openfire 3.4.4 with PostgreSQL on Linux, Sun Java 1.6.0.

It seems that Adium is causing the errant IQ packets. However, this does not explain why messages are looping, or why Openfire is consuming so much CPU and memory when the problem occurs.

I have tried debugging with Wireshark, but Openfire insists on using TLS even though I have set the TLS property to false. Any way to turn off TLS completely?

I was able to get the my memory problem and CPU flood to stop by diabling Message Auditing.

Set Message Audit Policy

Possibly this problem is related. However, for me this does not stop when the user does signs off.

Edit: I’m not using Message Auditing.