[jitsi-dev] [jitsi] Optimized groupNode (sorted) add operations. (e5e6d99)


#1

my apology, problem still exist. Turns out the deadlock might occurs in MessageSourceService::getIndex(MessageSourceContact messageSourceContact). With that the program has some descent opportunity to run into deadlock. When I commented out the synchronization in getIndex method the program disappears.

The deadlock might occurs between GroupNode::compare which comes from GroupNode::sortedAddContact->binarySearch and int currentIndex = parentNode.getIndex(contactNode) in TreeContactList::contactChanged which both try to getIndex and lock recentMessages. I'm guessing this because whenever I change
    int index1 = node1.getSourceIndex();
    int index2 = node2.getSourceIndex(); to
    int index1 = 1;
    int index2 = 2;

  the problem disappears.

I'm not sure exactly how this is happening, the only thing I know is whenever I commented out either of the two aforementioned area the problem disappears. That's all I got for now.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi/commit/e5e6d999c5e3ad19022c861b54bff5013d465ff7#commitcomment-8635514