Bug report: MUC OccupantManager.registerActivity isn't thread safe

Openfire version: 4.7.0

OccupantManager.registerActivity is not thread safe.

2022-03-17 04:32:56,441 [TaskEngine-pool-799] ERROR org.jivesoftware.openfire.muc.spi.MultiUserChatServiceImpl - Internal server error
java.util.ConcurrentModificationException: null
	at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1561) ~[?:1.8.0_202]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0_202]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_202]
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:1.8.0_202]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:1.8.0_202]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_202]
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[?:1.8.0_202]
	at org.jivesoftware.openfire.muc.spi.OccupantManager.registerActivity(OccupantManager.java:450) ~[xmppserver-4.7.0.jar:4.7.0]
	at org.jivesoftware.openfire.muc.spi.MultiUserChatServiceImpl.processPacket(MultiUserChatServiceImpl.java:430) ~[xmppserver-4.7.0.jar:4.7.0]
	at org.jivesoftware.openfire.component.InternalComponentManager$RoutableComponents.process(InternalComponentManager.java:863) ~[xmppserver-4.7.0.jar:4.7.0]
	at org.jivesoftware.openfire.spi.RoutingTableImpl.routeToComponent(RoutingTableImpl.java:541) ~[xmppserver-4.7.0.jar:4.7.0]
	at org.jivesoftware.openfire.spi.RoutingTableImpl.routePacket(RoutingTableImpl.java:354) ~[xmppserver-4.7.0.jar:4.7.0]
	at org.jivesoftware.openfire.PresenceRouter.handle(PresenceRouter.java:165) ~[xmppserver-4.7.0.jar:4.7.0]

Thank you for reporting this. I have created a new ticket for this issue at [OF-2421] - Ignite Realtime Jira

1 Like

Hi,I have the same problem, have you solved it?

I have provided a link to the JIRA ticket that was created for this bug. I did that for people to be able to look up the status of the issue for themselves. :slight_smile: The issue remains unresolved at the time of writing.

1 Like