Smack 4.4.0 Synchronized (selector) access in SmackReactor class is holding back normal process execution; leading to android OS "Long monitor contention"

Thanks for the clarification.

Sorry, case #1 is a bad example get included. Actually I know the cause and already put the checkDeliveryReceiptSupport() on a new thread so it does not interfere with the main thread.

As for case #2, I am still unable to figure out what is holding back. However further down in the traces, both thread #21 and #22 are blocked and involved smackReactor?
Any advice how to find the cause?


“Smack DefaultReactor Thread #1” tid=22 Blocked

  • waiting to lock <0x00365e43> (a sun.nio.ch.PollSelectorImpl) held by thread 21

“Smack DefaultReactor Thread #0” tid=21 Native
at org.jivesoftware.smack.SmackReactor$Reactor.handleScheduledActionsOrPerformSelect (SmackReactor.java:252)

=================================
By the way I see there is no update on topics below. Did your team manage to find the cause of the ping problem and fix. aTalk is still using last proposed patch for ping to work. I would like to remove the patch if it has been fixed by other mean.